diff --git a/src/Mod/CAM/Gui/Resources/panels/PathEdit.ui b/src/Mod/CAM/Gui/Resources/panels/PathEdit.ui index dd8c783eee..117227880a 100644 --- a/src/Mod/CAM/Gui/Resources/panels/PathEdit.ui +++ b/src/Mod/CAM/Gui/Resources/panels/PathEdit.ui @@ -6,15 +6,15 @@ 0 0 - 581 - 785 + 737 + 809 Job Edit - 1 + 2 @@ -31,8 +31,8 @@ 0 0 - 561 - 675 + 707 + 648 @@ -110,8 +110,8 @@ 0 0 - 98 - 28 + 100 + 30 @@ -161,7 +161,7 @@ if %S is included, you can specify where the number occurs. Without it, the num %S ... Sequence Number The following example store all files with the same name as the document the directory /home/freecad (please remove quotes): -"/home/cnc/%d.g-code" +"/home/cnc/%d.g-code" See the file save policy below on how to deal with name conflicts. @@ -443,8 +443,8 @@ If <span style=" font-style:italic;">order by</span> is se 0 0 - 548 - 929 + 688 + 1368 @@ -502,6 +502,26 @@ If <span style=" font-style:italic;">order by</span> is se + + + + + 0 + 0 + + + + Assign Stock Material + + + + + + + :/icons/MaterialWorkbench.svg:/icons/MaterialWorkbench.svg + + + @@ -523,6 +543,9 @@ If <span style=" font-style:italic;">order by</span> is se + + + @@ -1010,8 +1033,8 @@ If <span style=" font-style:italic;">order by</span> is se 0 0 - 252 - 354 + 707 + 648 @@ -1113,7 +1136,7 @@ Default: OpToolDiameter Expression set as ClearanceHeight for new operations. -Default: "OpStockZMax+SetupSheet.ClearanceHeightOffset" +Default: "OpStockZMax+SetupSheet.ClearanceHeightOffset" @@ -1138,7 +1161,7 @@ Default: 3 mm Expression set as SafeHeight for new operations. -Default: "OpStockZMax+SetupSheet.SafeHeightOffset" +Default: "OpStockZMax+SetupSheet.SafeHeightOffset" @@ -1147,7 +1170,7 @@ Default: "OpStockZMax+SetupSheet.SafeHeightOffset" SafeHeightOffset can be for expressions to set the SafeHeight for new operations. -Default: "5mm" +Default: "5mm" @@ -1207,8 +1230,8 @@ Default: "5mm" 0 0 - 561 - 675 + 707 + 648 @@ -1311,8 +1334,8 @@ Default: "5mm" 0 0 - 151 - 119 + 512 + 183 @@ -1579,6 +1602,8 @@ Default: "5mm" + + diff --git a/src/Mod/CAM/Path/Main/Gui/Job.py b/src/Mod/CAM/Path/Main/Gui/Job.py index 227aaaf9eb..e25c8fc453 100644 --- a/src/Mod/CAM/Path/Main/Gui/Job.py +++ b/src/Mod/CAM/Path/Main/Gui/Job.py @@ -41,6 +41,10 @@ import PathScripts.PathUtils as PathUtils import json import math import traceback +from PySide import QtWidgets + +import MatGui +import Materials # lazily loaded modules from lazy_loader.lazy_loader import LazyLoader @@ -346,6 +350,52 @@ class ViewProvider: menu.addAction(action) +class MaterialDialog(QtWidgets.QDialog): + def __init__(self, parent=None): + super(MaterialDialog, self).__init__(parent) + + self.setWindowTitle("Assign Material") + + self.materialTree = FreeCADGui.UiLoader().createWidget( + "MatGui::MaterialTreeWidget" + ) + self.materialTreeWidget = MatGui.MaterialTreeWidget(self.materialTree) + + material_filter = Materials.MaterialFilter() + material_filter.Name = "Machining Materials" + material_filter.RequiredModels = [Materials.UUIDs().Machinability] + self.materialTreeWidget.setFilter(material_filter) + self.materialTreeWidget.selectFilter("Machining Materials") + + # Create OK and Cancel buttons + self.okButton = QtWidgets.QPushButton("OK") + self.cancelButton = QtWidgets.QPushButton("Cancel") + + # Connect buttons to their actions + self.okButton.clicked.connect(self.accept) + self.cancelButton.clicked.connect(self.reject) + + # Layout setup + layout = QtWidgets.QVBoxLayout() + layout.addWidget(self.materialTree) + + buttonLayout = QtWidgets.QHBoxLayout() + buttonLayout.addStretch() + buttonLayout.addWidget(self.okButton) + buttonLayout.addWidget(self.cancelButton) + + layout.addLayout(buttonLayout) + self.setLayout(layout) + self.materialTree.onMaterial.connect(self.onMaterial) + + def onMaterial(self, uuid): + try: + print("Selected '{0}'".format(uuid)) + self.uuid = uuid + except Exception as e: + print(e) + + class StockEdit(object): Index = -1 StockType = PathStock.StockType.Unknown @@ -762,6 +812,19 @@ class TaskPanel: for text, data in enumTups[prop]: # load enumerations box.addItem(text, data) + def assignMaterial(self): + dialog = MaterialDialog() + result = dialog.exec_() + + if result == QtWidgets.QDialog.Accepted: + FreeCAD.Console.PrintMessage("Material assigned\n") + # Add code to handle the material assignment + + if dialog.uuid is not None: + material_manager = Materials.MaterialManager() + material = material_manager.getMaterial(dialog.uuid) + self.obj.Stock.ShapeMaterial = material + def preCleanup(self): Path.Log.track() FreeCADGui.Selection.removeObserver(self) @@ -1584,6 +1647,7 @@ class TaskPanel: self.toolControllerSelect() # Stock, Orientation and Alignment + self.form.btnMaterial.clicked.connect(self.assignMaterial) self.form.centerInStock.clicked.connect(self.alignCenterInStock) self.form.centerInStockXY.clicked.connect(self.alignCenterInStockXY) diff --git a/src/Mod/CAM/Path/Main/Sanity/HTMLTemplate.py b/src/Mod/CAM/Path/Main/Sanity/HTMLTemplate.py index cdbe59223d..f5837ec138 100644 --- a/src/Mod/CAM/Path/Main/Sanity/HTMLTemplate.py +++ b/src/Mod/CAM/Path/Main/Sanity/HTMLTemplate.py @@ -176,6 +176,7 @@ html_template = Template(

${roughStockLabel}

+ @@ -183,39 +184,31 @@ html_template = Template( - - - + + - - + + - - + + - - + + + + + + + + + +
- ${materialLabel} - - ${material} - + ${materialLabel}${material} ${stockImage}
- ${xDimLabel} - - ${xLen} - ${sSpeedHSSLabel}${surfaceSpeedHSS}
- ${yDimLabel} - - ${yLen} - ${sSpeedCarbideLabel}${surfaceSpeedCarbide}
- ${zDimLabel} - - ${zLen} - ${xDimLabel}${xLen}
${yDimLabel}${yLen}
${zDimLabel}${zLen}
diff --git a/src/Mod/CAM/Path/Main/Sanity/ReportGenerator.py b/src/Mod/CAM/Path/Main/Sanity/ReportGenerator.py index 7eb182e1b1..1fd1a35748 100644 --- a/src/Mod/CAM/Path/Main/Sanity/ReportGenerator.py +++ b/src/Mod/CAM/Path/Main/Sanity/ReportGenerator.py @@ -85,6 +85,8 @@ class ReportGenerator: "speedLabel": translate("CAM_Sanity", "Spindle Speed"), "squawksLabel": translate("CAM_Sanity", "Squawks"), "stopsLabel": translate("CAM_Sanity", "Stops"), + "sSpeedCarbideLabel": translate("CAM_Sanity", "Surface Speed Carbide"), + "sSpeedHSSLabel": translate("CAM_Sanity", "Surace Speed HSS"), "tableOfContentsLabel": translate("CAM_Sanity", "Table of Contents"), "tcLabel": translate("CAM_Sanity", "Tool Controller"), "toolDataLabel": translate("CAM_Sanity", "Tool Data"), @@ -143,10 +145,12 @@ class ReportGenerator: else: toolNumber = key - toolAttributes = val + toolAttributes = val if "imagepath" in toolAttributes and toolAttributes["imagepath"] != "": if self.embed_images: - encoded_image, tag = self.file_to_base64_with_tag(toolAttributes["imagepath"]) + encoded_image, tag = self.file_to_base64_with_tag( + toolAttributes["imagepath"] + ) else: tag = f"{key}" toolAttributes["imagepath"] = tag @@ -159,6 +163,7 @@ class ReportGenerator: self.formatted_data["tool_list"] = self._format_tool_list(data["toolData"]) # Path.Log.debug(self.formatted_data) + def _format_tool_list(self, tool_data): tool_list = "" @@ -216,10 +221,9 @@ class ReportGenerator: def encode_gcode_to_base64(filepath): with open(filepath, "rb") as file: - encoded_string = base64.b64encode(file.read()).decode('utf-8') + encoded_string = base64.b64encode(file.read()).decode("utf-8") return encoded_string - def file_to_base64_with_tag(self, file_path): # Determine MIME type based on the file extension mime_types = { @@ -230,7 +234,9 @@ class ReportGenerator: ".gcode": "application/octet-stream", # MIME type for G-code files } extension = os.path.splitext(file_path)[1] - mime_type = mime_types.get(extension, "application/octet-stream") # Default to binary data type if unknown + mime_type = mime_types.get( + extension, "application/octet-stream" + ) # Default to binary data type if unknown if not os.path.exists(file_path): Path.Log.error(f"File not found: {file_path}") @@ -244,7 +250,7 @@ class ReportGenerator: # Generate HTML tag based on file type if extension in [".jpg", ".jpeg", ".png", ".svg"]: html_tag = f'' - elif extension in [".gcode", ".nc", ".tap", ".cnc" ]: + elif extension in [".gcode", ".nc", ".tap", ".cnc"]: html_tag = f'Download G-code File' else: html_tag = f'Download File' diff --git a/src/Mod/CAM/Path/Main/Sanity/Sanity.py b/src/Mod/CAM/Path/Main/Sanity/Sanity.py index 7b785d7a03..046bedcb5c 100644 --- a/src/Mod/CAM/Path/Main/Sanity/Sanity.py +++ b/src/Mod/CAM/Path/Main/Sanity/Sanity.py @@ -63,7 +63,9 @@ class CAMSanity: raise ValueError( translate( "CAM_Sanity", - "output location {} doesn't exist".format(os.path.dirname(output_file)), + "output location {} doesn't exist".format( + os.path.dirname(output_file) + ), ) ) @@ -222,8 +224,12 @@ class CAMSanity: ) else: if os.path.isfile(obj.LastPostProcessOutput): - data["filesize"] = str(os.path.getsize(obj.LastPostProcessOutput) / 1000) - data["linecount"] = str(sum(1 for line in open(obj.LastPostProcessOutput))) + data["filesize"] = str( + os.path.getsize(obj.LastPostProcessOutput) / 1000 + ) + data["linecount"] = str( + sum(1 for line in open(obj.LastPostProcessOutput)) + ) else: data["filesize"] = str(0.0) data["linecount"] = str(0) @@ -307,6 +313,8 @@ class CAMSanity: "yLen": "", "zLen": "", "material": "", + "surfaceSpeedCarbide": "", + "surfaceSpeedHSS": "", "stockImage": "", "squawkData": [], } @@ -323,11 +331,21 @@ class CAMSanity: ).UserString data["material"] = "Not Specified" - if hasattr(obj.Stock, "Material"): - if obj.Stock.Material is not None: - data["material"] = obj.Stock.Material.Material["Name"] + if hasattr(obj.Stock, "ShapeMaterial"): + if obj.Stock.ShapeMaterial is not None: + data["material"] = obj.Stock.ShapeMaterial.Name - if data["material"] == "Not Specified": + props = obj.Stock.ShapeMaterial.PhysicalProperties + if "SurfaceSpeedCarbide" in props: + data["surfaceSpeedCarbide"] = FreeCAD.Units.Quantity( + props["SurfaceSpeedCarbide"] + ).UserString + if "SurfaceSpeedHSS" in props: + data["surfaceSpeedHSS"] = FreeCAD.Units.Quantity( + props["SurfaceSpeedHSS"] + ).UserString + + if data["material"] in ["Default", "Not Specified"]: data["squawkData"].append( self.squawk( "CAMSanity", diff --git a/src/Mod/CAM/Path/Main/Stock.py b/src/Mod/CAM/Path/Main/Stock.py index 6d14b66c0d..ffff64765b 100644 --- a/src/Mod/CAM/Path/Main/Stock.py +++ b/src/Mod/CAM/Path/Main/Stock.py @@ -97,6 +97,15 @@ class Stock(object): if hasattr(obj, "StockType"): obj.setEditorMode("StockType", 2) # hide + if hasattr(obj, "Material"): + obj.removeProperty("Material") + FreeCAD.Console.PrintWarning( + translate( + "PathStock", + "Stock Material property is deprecated. Removing the Material property. Please use native material system to assign a ShapeMaterial", + ) + ) + class StockFromBase(Stock): def __init__(self, obj, base): @@ -430,7 +439,7 @@ def CreateCylinder(job, radius=None, height=None, placement=None): obj.Height = height elif base: bb = shapeBoundBox(base.Group) - obj.Radius = math.sqrt(bb.XLength**2 + bb.YLength**2) / 2.0 + obj.Radius = math.sqrt(bb.XLength ** 2 + bb.YLength ** 2) / 2.0 obj.Height = max(bb.ZLength, 1) if placement: diff --git a/src/Mod/Material/App/ModelUuids.cpp b/src/Mod/Material/App/ModelUuids.cpp index ceba5591bd..d028136f36 100644 --- a/src/Mod/Material/App/ModelUuids.cpp +++ b/src/Mod/Material/App/ModelUuids.cpp @@ -34,6 +34,9 @@ const QString ModelUUIDs::ModelUUID_Legacy_Father = const QString ModelUUIDs::ModelUUID_Legacy_MaterialStandard = QString::fromStdString("1e2c0088-904a-4537-925f-64064c07d700"); +const QString ModelUUIDs::ModelUUID_Machining_Machinability = + QString::fromStdString("9d81fcb2-bf81-48e3-bb57-d45ecf380096"); + const QString ModelUUIDs::ModelUUID_Mechanical_ArrudaBoyce = QString::fromStdString("e10d00de-c7de-4e59-bcdd-058c2ea19ec6"); const QString ModelUUIDs::ModelUUID_Mechanical_Density = diff --git a/src/Mod/Material/App/ModelUuids.h b/src/Mod/Material/App/ModelUuids.h index 1b79e89ea4..bb8b59fd38 100644 --- a/src/Mod/Material/App/ModelUuids.h +++ b/src/Mod/Material/App/ModelUuids.h @@ -45,6 +45,8 @@ public: static const QString ModelUUID_Legacy_Father; static const QString ModelUUID_Legacy_MaterialStandard; + static const QString ModelUUID_Machining_Machinability; + static const QString ModelUUID_Mechanical_ArrudaBoyce; static const QString ModelUUID_Mechanical_Density; static const QString ModelUUID_Mechanical_Hardness; diff --git a/src/Mod/Material/App/UUIDsPy.xml b/src/Mod/Material/App/UUIDsPy.xml index 49ee9091fd..9daea8aeea 100644 --- a/src/Mod/Material/App/UUIDsPy.xml +++ b/src/Mod/Material/App/UUIDsPy.xml @@ -58,6 +58,12 @@
+ + + UUID for model System:Machining/Machinability + + + UUID for model System:Mechanical/MooneyRivlin diff --git a/src/Mod/Material/App/UUIDsPyImpl.cpp b/src/Mod/Material/App/UUIDsPyImpl.cpp index 94403fcb7f..8e64b50ec8 100644 --- a/src/Mod/Material/App/UUIDsPyImpl.cpp +++ b/src/Mod/Material/App/UUIDsPyImpl.cpp @@ -82,6 +82,11 @@ Py::String UUIDsPy::getLinearElastic() const return Py::String(ModelUUIDs::ModelUUID_Mechanical_LinearElastic.toStdString()); } +Py::String UUIDsPy::getMachinability() const +{ + return Py::String(ModelUUIDs::ModelUUID_Machining_Machinability.toStdString()); +} + Py::String UUIDsPy::getMooneyRivlin() const { return Py::String(ModelUUIDs::ModelUUID_Mechanical_MooneyRivlin.toStdString()); diff --git a/src/Mod/Material/CMakeLists.txt b/src/Mod/Material/CMakeLists.txt index 4464472aea..0130bd8fec 100644 --- a/src/Mod/Material/CMakeLists.txt +++ b/src/Mod/Material/CMakeLists.txt @@ -224,6 +224,24 @@ SET(PatternLib_Files "Resources/Materials/Patterns/Pattern Files/zinc.FCMat" ) +SET(MachiningLib_Files + Resources/Materials/Machining/Aluminum-6061.FCMat + Resources/Materials/Machining/Aluminum-7075.FCMat + Resources/Materials/Machining/Aluminum-Cast.FCMat + Resources/Materials/Machining/Brass-Hard.FCMat + Resources/Materials/Machining/Brass-Medium.FCMat + Resources/Materials/Machining/Brass-Soft.FCMat + Resources/Materials/Machining/CarbonSteel.FCMat + Resources/Materials/Machining/HardPlastics.FCMat + Resources/Materials/Machining/Hardwood.FCMat + Resources/Materials/Machining/SoftPlastics.FCMat + Resources/Materials/Machining/Softwood.FCMat + Resources/Materials/Machining/Stainless-303.FCMat + Resources/Materials/Machining/Stainless-304.FCMat + Resources/Materials/Machining/Stainless-316.FCMat + Resources/Materials/Machining/ToolSteel.FCMat +) + SET(MaterialTestLib_Files "Resources/Materials/Test/Test Material.FCMat" ) @@ -236,6 +254,7 @@ SET(MaterialModel_Files Resources/Models/Fluid/Fluid.yml Resources/Models/Legacy/Father.yml Resources/Models/Legacy/MaterialStandard.yml + Resources/Models/Machining/Machinability.yml Resources/Models/Mechanical/ArrudaBoyce.yml Resources/Models/Mechanical/Density.yml Resources/Models/Mechanical/Hardness.yml @@ -364,6 +383,9 @@ ADD_CUSTOM_TARGET(PatternLib ALL ADD_CUSTOM_TARGET(MaterialTestLib ALL SOURCES ${MaterialTestLib_Files} ) +ADD_CUSTOM_TARGET(MachiningLib ALL + SOURCES ${MachiningLib_Files} +) ADD_CUSTOM_TARGET(MaterialModelLib ALL SOURCES ${MaterialModel_Files} ) @@ -386,6 +408,10 @@ fc_target_copy_resource(PatternLib ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Material/ ${PatternLib_Files}) +fc_target_copy_resource(MachiningLib + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Material/ + ${MachiningLib_Files}) fc_target_copy_resource(MaterialTestLib ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Material/ @@ -405,7 +431,7 @@ INSTALL( DESTINATION Mod/Material/materialtests/Materials ) -foreach(file ${MaterialLib_Files} ${FluidMaterial_Files} ${AppearanceLib_Files} ${PatternLib_Files} ${MaterialTestLib_Files} ${MaterialModel_Files}) +foreach(file ${MaterialLib_Files} ${FluidMaterial_Files} ${AppearanceLib_Files} ${PatternLib_Files} ${MachiningLib_Files} ${MaterialTestLib_Files} ${MaterialModel_Files}) get_filename_component(filepath ${file} DIRECTORY) INSTALL( FILES ${file} diff --git a/src/Mod/Material/Gui/DlgInspectAppearance.ui b/src/Mod/Material/Gui/DlgInspectAppearance.ui index 321dc1a0b4..0136f599e1 100644 --- a/src/Mod/Material/Gui/DlgInspectAppearance.ui +++ b/src/Mod/Material/Gui/DlgInspectAppearance.ui @@ -6,8 +6,8 @@ 0 0 - 400 - 300 + 739 + 1556 @@ -24,8 +24,8 @@ 0 0 - 380 - 280 + 711 + 1528 @@ -90,6 +90,12 @@ + + + 0 + 0 + + Appearance diff --git a/src/Mod/Material/Resources/Materials/Machining/Aluminum-6061.FCMat b/src/Mod/Material/Resources/Materials/Machining/Aluminum-6061.FCMat new file mode 100644 index 0000000000..5f49b8ab69 --- /dev/null +++ b/src/Mod/Material/Resources/Materials/Machining/Aluminum-6061.FCMat @@ -0,0 +1,21 @@ +General: + UUID: "054d0414-a431-45bd-b401-be4687bdcc98" + Author: "Daniel Wood" + License: "CC-BY-3.0" + Name: "Aluminum 6061-T6" + Description: "Path Machining Material Aluminum (6061)" +Inherits: + Aluminum: + UUID: "68b152b2-fd5e-4f10-8db0-1a2df3fe0fda" +Models: + Father: + UUID: '9cdda8b6-b606-4778-8f13-3934d8668e67' + Father: "Metal" + MaterialStandard: + UUID: '1e2c0088-904a-4537-925f-64064c07d700' + KindOfMaterial: "Aluminium" + Machinability: + UUID: '9d81fcb2-bf81-48e3-bb57-d45ecf380096' + SurfaceSpeedHSS: '175 m/min' + SurfaceSpeedCarbide: '389 m/min' + SpecificCuttingForce: '' diff --git a/src/Mod/Material/Resources/Materials/Machining/Aluminum-7075.FCMat b/src/Mod/Material/Resources/Materials/Machining/Aluminum-7075.FCMat new file mode 100644 index 0000000000..88a0b41f76 --- /dev/null +++ b/src/Mod/Material/Resources/Materials/Machining/Aluminum-7075.FCMat @@ -0,0 +1,21 @@ +General: + UUID: "0fb7ecaf-0ec0-487e-a5b6-89d165f5ea8f" + Author: "Daniel Wood" + License: "CC-BY-3.0" + Name: "Aluminum 7075" + Description: "CAM Machining Material Aluminum (7075)" +Inherits: + Aluminum: + UUID: "9bf060e9-1663-44a2-88e2-2ff6ee858efe" +Models: + Father: + UUID: '9cdda8b6-b606-4778-8f13-3934d8668e67' + Father: "Metal" + MaterialStandard: + UUID: '1e2c0088-904a-4537-925f-64064c07d700' + KindOfMaterial: "Aluminium" + Machinability: + UUID: '9d81fcb2-bf81-48e3-bb57-d45ecf380096' + SurfaceSpeedHSS: '175 m/min' + SurfaceSpeedCarbide: '395 m/min' + SpecificCuttingForce: '' diff --git a/src/Mod/Material/Resources/Materials/Machining/Aluminum-Cast.FCMat b/src/Mod/Material/Resources/Materials/Machining/Aluminum-Cast.FCMat new file mode 100644 index 0000000000..67da0c28a7 --- /dev/null +++ b/src/Mod/Material/Resources/Materials/Machining/Aluminum-Cast.FCMat @@ -0,0 +1,21 @@ +General: + UUID: "7dca3625-cb0a-4b70-947f-856b1dbedeb1" + Author: "Daniel Wood" + License: "CC-BY-3.0" + Name: "Aluminum (Cast)" + Description: "CAM Machining Material Aluminum (Cast)" +Inherits: + Aluminum: + UUID: "9bf060e9-1663-44a2-88e2-2ff6ee858efe" +Models: + Father: + UUID: '9cdda8b6-b606-4778-8f13-3934d8668e67' + Father: "Metal" + MaterialStandard: + UUID: '1e2c0088-904a-4537-925f-64064c07d700' + KindOfMaterial: "Aluminium" + Machinability: + UUID: '9d81fcb2-bf81-48e3-bb57-d45ecf380096' + SurfaceSpeedHSS: '175 m/min' + SurfaceSpeedCarbide: '395 m/min' + SpecificCuttingForce: '' diff --git a/src/Mod/Material/Resources/Materials/Machining/Brass-Hard.FCMat b/src/Mod/Material/Resources/Materials/Machining/Brass-Hard.FCMat new file mode 100644 index 0000000000..5faa290a1c --- /dev/null +++ b/src/Mod/Material/Resources/Materials/Machining/Brass-Hard.FCMat @@ -0,0 +1,21 @@ +General: + UUID: "787b55bb-2992-41be-a9a9-0b1bfc4905b9" + Author: "Daniel Wood" + License: "CC-BY-3.0" + Name: "Brass (Hard)" + Description: "CAM Machining Material Brass (Hard)" +Inherits: + Brass: + UUID: "4151e19c-fd6a-4ca4-83d4-d5e17d76cb9c" +Models: + Father: + UUID: '9cdda8b6-b606-4778-8f13-3934d8668e67' + Father: "Metal" + MaterialStandard: + UUID: '1e2c0088-904a-4537-925f-64064c07d700' + KindOfMaterial: "Brass" + Machinability: + UUID: '9d81fcb2-bf81-48e3-bb57-d45ecf380096' + SurfaceSpeedHSS: '200 m/min' + SurfaceSpeedCarbide: '395 m/min' + SpecificCuttingForce: '' diff --git a/src/Mod/Material/Resources/Materials/Machining/Brass-Medium.FCMat b/src/Mod/Material/Resources/Materials/Machining/Brass-Medium.FCMat new file mode 100644 index 0000000000..abcb198929 --- /dev/null +++ b/src/Mod/Material/Resources/Materials/Machining/Brass-Medium.FCMat @@ -0,0 +1,21 @@ +General: + UUID: "7c40791a-db51-4e57-8799-92662baa3b49" + Author: "Daniel Wood" + License: "CC-BY-3.0" + Name: "Brass (Medium)" + Description: "CAM Machining Material Brass (Medium)" +Inherits: + Brass: + UUID: "4151e19c-fd6a-4ca4-83d4-d5e17d76cb9c" +Models: + Father: + UUID: '9cdda8b6-b606-4778-8f13-3934d8668e67' + Father: "Metal" + MaterialStandard: + UUID: '1e2c0088-904a-4537-925f-64064c07d700' + KindOfMaterial: "Brass" + Machinability: + UUID: '9d81fcb2-bf81-48e3-bb57-d45ecf380096' + SurfaceSpeedHSS: '175 m/min' + SurfaceSpeedCarbide: '350 m/min' + SpecificCuttingForce: '' diff --git a/src/Mod/Material/Resources/Materials/Machining/Brass-Soft.FCMat b/src/Mod/Material/Resources/Materials/Machining/Brass-Soft.FCMat new file mode 100644 index 0000000000..a1c2bca2a6 --- /dev/null +++ b/src/Mod/Material/Resources/Materials/Machining/Brass-Soft.FCMat @@ -0,0 +1,21 @@ +General: + UUID: "88358e90-d3f5-4009-8a02-99f3a90719c1" + Author: "Daniel Wood" + License: "CC-BY-3.0" + Name: "Brass (Soft)" + Description: "CAM Machining Material Brass (Soft)" +Inherits: + Brass: + UUID: "4151e19c-fd6a-4ca4-83d4-d5e17d76cb9c" +Models: + Father: + UUID: '9cdda8b6-b606-4778-8f13-3934d8668e67' + Father: "Metal" + MaterialStandard: + UUID: '1e2c0088-904a-4537-925f-64064c07d700' + KindOfMaterial: "Brass" + Machinability: + UUID: '9d81fcb2-bf81-48e3-bb57-d45ecf380096' + SurfaceSpeedHSS: '125 m/min' + SurfaceSpeedCarbide: '300 m/min' + SpecificCuttingForce: '' diff --git a/src/Mod/Material/Resources/Materials/Machining/CarbonSteel.FCMat b/src/Mod/Material/Resources/Materials/Machining/CarbonSteel.FCMat new file mode 100644 index 0000000000..9f46105c2f --- /dev/null +++ b/src/Mod/Material/Resources/Materials/Machining/CarbonSteel.FCMat @@ -0,0 +1,13 @@ +; CarbonSteel +; (c) 2022 Daniel Wood (CC-BY 3.0) +; information about the content of such cards can be found on the wiki: +; https://www.freecadweb.org/wiki/Material + +[FCMat] +Name = Carbon Steel +Description = Path Material CarbonSteel +Father = Metal +SurfaceSpeed_HSS = 35 +SurfaceSpeed_Carbide = 120 +Kp = 1.88 +Kd = 24000 diff --git a/src/Mod/Material/Resources/Materials/Machining/HardPlastics.FCMat b/src/Mod/Material/Resources/Materials/Machining/HardPlastics.FCMat new file mode 100644 index 0000000000..66286a24a1 --- /dev/null +++ b/src/Mod/Material/Resources/Materials/Machining/HardPlastics.FCMat @@ -0,0 +1,13 @@ +; HardPlastics +; (c) 2022 Daniel Wood (CC-BY 3.0) +; information about the content of such cards can be found on the wiki: +; https://www.freecadweb.org/wiki/Material + +[FCMat] +Name = Hard Plastics +Description = Path Material HardPlastics +Father = Polymer +SurfaceSpeed_HSS = 225 +SurfaceSpeed_Carbide = 275 +Kp = 0.75 +Kd = 2000 diff --git a/src/Mod/Material/Resources/Materials/Machining/Hardwood.FCMat b/src/Mod/Material/Resources/Materials/Machining/Hardwood.FCMat new file mode 100644 index 0000000000..1635cef7b9 --- /dev/null +++ b/src/Mod/Material/Resources/Materials/Machining/Hardwood.FCMat @@ -0,0 +1,15 @@ +General: + UUID: "c92ffa22-5f52-476b-a015-8c2401a55e6e" + Author: "Daniel Wood" + License: "CC-BY-3.0" + Name: "Hardwood" + Description: "CAM Machining Material Hardwood" +Inherits: + Wood: + UUID: "b588224e-e8d6-47ad-ba1f-a058333fd1c6" +Models: + Machinability: + UUID: '9d81fcb2-bf81-48e3-bb57-d45ecf380096' + SurfaceSpeedHSS: '145 m/min' + SurfaceSpeedCarbide: '275 m/min' + SpecificCuttingForce: '' diff --git a/src/Mod/Material/Resources/Materials/Machining/SoftPlastics.FCMat b/src/Mod/Material/Resources/Materials/Machining/SoftPlastics.FCMat new file mode 100644 index 0000000000..ae9be3fc59 --- /dev/null +++ b/src/Mod/Material/Resources/Materials/Machining/SoftPlastics.FCMat @@ -0,0 +1,13 @@ +; SoftPlastics +; (c) 2022 Daniel Wood (CC-BY 3.0) +; information about the content of such cards can be found on the wiki: +; https://www.freecadweb.org/wiki/Material + +[FCMat] +Name = Soft Plastics +Description = Path Material SoftPlastics +Father = Polymer +SurfaceSpeed_HSS = 225 +SurfaceSpeed_Carbide = 255 +Kp = 0.5 +Kd = 2000 diff --git a/src/Mod/Material/Resources/Materials/Machining/Softwood.FCMat b/src/Mod/Material/Resources/Materials/Machining/Softwood.FCMat new file mode 100644 index 0000000000..172c6efbd4 --- /dev/null +++ b/src/Mod/Material/Resources/Materials/Machining/Softwood.FCMat @@ -0,0 +1,15 @@ +General: + UUID: "c92ffa22-5f52-476b-a015-8c2401a55e6e" + Author: "Daniel Wood" + License: "CC-BY-3.0" + Name: "Softwood" + Description: "CAM Machining Material Softwood" +Inherits: + Wood: + UUID: "b588224e-e8d6-47ad-ba1f-a058333fd1c6" +Models: + Machinability: + UUID: '9d81fcb2-bf81-48e3-bb57-d45ecf380096' + SurfaceSpeedHSS: '225 m/min' + SurfaceSpeedCarbide: '255 m/min' + SpecificCuttingForce: '' diff --git a/src/Mod/Material/Resources/Materials/Machining/Stainless-303.FCMat b/src/Mod/Material/Resources/Materials/Machining/Stainless-303.FCMat new file mode 100644 index 0000000000..9990ed65d9 --- /dev/null +++ b/src/Mod/Material/Resources/Materials/Machining/Stainless-303.FCMat @@ -0,0 +1,13 @@ +; Stainless(303) +; (c) 2022 Daniel Wood (CC-BY 3.0) +; information about the content of such cards can be found on the wiki: +; https://www.freecadweb.org/wiki/Material + +[FCMat] +Name = Stainless (303) +Description = Path Material Stainless(303) +Father = Metal +SurfaceSpeed_HSS = 25 +SurfaceSpeed_Carbide = 85 +Kp = 2.07 +Kd = 200000 diff --git a/src/Mod/Material/Resources/Materials/Machining/Stainless-304.FCMat b/src/Mod/Material/Resources/Materials/Machining/Stainless-304.FCMat new file mode 100644 index 0000000000..a6077a17d6 --- /dev/null +++ b/src/Mod/Material/Resources/Materials/Machining/Stainless-304.FCMat @@ -0,0 +1,13 @@ +; Stainless(304) +; (c) 2022 Daniel Wood (CC-BY 3.0) +; information about the content of such cards can be found on the wiki: +; https://www.freecadweb.org/wiki/Material + +[FCMat] +Name = Stainless (304) +Description = Path Material Stainless(304) +Father = Metal +SurfaceSpeed_HSS = 10 +SurfaceSpeed_Carbide = 37.5 +Kp = 2.07 +Kd = 22000 diff --git a/src/Mod/Material/Resources/Materials/Machining/Stainless-316.FCMat b/src/Mod/Material/Resources/Materials/Machining/Stainless-316.FCMat new file mode 100644 index 0000000000..4bf1846ab9 --- /dev/null +++ b/src/Mod/Material/Resources/Materials/Machining/Stainless-316.FCMat @@ -0,0 +1,13 @@ +; Stainless(316) +; (c) 2022 Daniel Wood (CC-BY 3.0) +; information about the content of such cards can be found on the wiki: +; https://www.freecadweb.org/wiki/Material + +[FCMat] +Name = Stainless-316 +Description = Path Material Stainless(316) +Father = Metal +SurfaceSpeed_HSS = 7.5 +SurfaceSpeed_Carbide = 25 +Kp = 2.07 +Kd = 24000 diff --git a/src/Mod/Material/Resources/Materials/Machining/ToolSteel.FCMat b/src/Mod/Material/Resources/Materials/Machining/ToolSteel.FCMat new file mode 100644 index 0000000000..cd6f7653eb --- /dev/null +++ b/src/Mod/Material/Resources/Materials/Machining/ToolSteel.FCMat @@ -0,0 +1,13 @@ +; Stainless(316) +; (c) 2022 Daniel Wood (CC-BY 3.0) +; information about the content of such cards can be found on the wiki: +; https://www.freecadweb.org/wiki/Material + +[FCMat] +Name = Tool Steel +Description = Path Material ToolSteel +Father = Metal +SurfaceSpeed_HSS = 12 +SurfaceSpeed_Carbide = 45 +Kp = 1.88 +Kd = 340000 diff --git a/src/Mod/Material/Resources/Models/Machining/Machinability.yml b/src/Mod/Material/Resources/Models/Machining/Machinability.yml new file mode 100644 index 0000000000..c204b0ac11 --- /dev/null +++ b/src/Mod/Material/Resources/Models/Machining/Machinability.yml @@ -0,0 +1,62 @@ +--- +# *************************************************************************** +# * * +# * Copyright (c) 2023 sliptonic - + Model for calculating feeds and speeds on a milling machine or lathe + DOI: "" + SurfaceSpeedHSS: + Type: 'Quantity' + Units: 'm/min' + URL: 'https://en.wikipedia.org/wiki/Speeds_and_feeds#Cutting_speed' + Description: >- + Cutting speed (Surface Speed) for general-purpose milling + using High Speed Steel tools. + SurfaceSpeedCarbide: + Type: 'Quantity' + Units: 'm/min' + URL: 'https://en.wikipedia.org/wiki/Speeds_and_feeds#Cutting_speed' + Description: >- + Cutting speed (Surface Speed) for general-purpose milling + using Carbide tools. + UnitCuttingForce: + Type: 'Quantity' + Units: 'N/mm^2' + URL: 'https://www.machiningdoctor.com/glossary/specific-cutting-force-kc-kc1/' + Description: >- + Specific cutting force, normalized for a undeformed chip thickeness of 1 mm, a cutting + width of 1 mm and a rake angle of 0 degrees. + This material property, generally denoted with k_c1.1, is used together with a chip + thickness exponent, m_c, to calculate the actual specific cutting force for the actual + feed (i.e. undeformed chip thickness), the actual rake angle and other correction factors. + ChipThicknessExponent: + Type: 'Float' + Units: None + URL: 'https://www.machiningdoctor.com/glossary/specific-cutting-force-kc-kc1/' + Description: >- + This material property, also called "material constant" and generally denoted m_c, + determines the effect of the undeformed chip thickness on the actual specific cutting + force the further away it gets from the unit cutting force's normalization point.