Skip to content

Commit

Permalink
Merge branch '5.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
saumyaj3 committed Mar 12, 2024
2 parents b615177 + e8e106b commit 6e9b82f
Show file tree
Hide file tree
Showing 64 changed files with 9,491 additions and 1,713 deletions.
37 changes: 18 additions & 19 deletions cura/PrinterOutput/Models/MaterialOutputModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ class MaterialOutputModel(QObject):
def __init__(self, guid: Optional[str], type: str, color: str, brand: str, name: str, parent = None) -> None:
super().__init__(parent)

name, guid = MaterialOutputModel.getMaterialFromDefinition(guid,type, brand, name)
self._guid =guid
name, guid = MaterialOutputModel.getMaterialFromDefinition(guid, type, brand, name)
self._guid = guid
self._type = type
self._color = color
self._brand = brand
Expand All @@ -24,23 +24,22 @@ def guid(self) -> str:
@staticmethod
def getMaterialFromDefinition(guid, type, brand, name):

_MATERIAL_MAP = { "abs" :{"name" :"abs_175" ,"guid": "2780b345-577b-4a24-a2c5-12e6aad3e690"},
"abs-wss1" :{"name" :"absr_175" ,"guid": "88c8919c-6a09-471a-b7b6-e801263d862d"},
"asa" :{"name" :"asa_175" ,"guid": "416eead4-0d8e-4f0b-8bfc-a91a519befa5"},
"nylon-cf" :{"name" :"cffpa_175" ,"guid": "85bbae0e-938d-46fb-989f-c9b3689dc4f0"},
"nylon12-cf": {"name": "nylon12-cf_175", "guid": "3c6f2877-71cc-4760-84e6-4b89ab243e3b"},
"nylon" :{"name" :"nylon_175" ,"guid": "283d439a-3490-4481-920c-c51d8cdecf9c"},
"pc" :{"name" :"pc_175" ,"guid": "62414577-94d1-490d-b1e4-7ef3ec40db02"},
"petg" :{"name" :"petg_175" ,"guid": "69386c85-5b6c-421a-bec5-aeb1fb33f060"},
"pla" :{"name" :"pla_175" ,"guid": "0ff92885-617b-4144-a03c-9989872454bc"},
"pva" :{"name" :"pva_175" ,"guid": "a4255da2-cb2a-4042-be49-4a83957a2f9a"},
"wss1" :{"name" :"rapidrinse_175","guid": "a140ef8f-4f26-4e73-abe0-cfc29d6d1024"},
"sr30" :{"name" :"sr30_175" ,"guid": "77873465-83a9-4283-bc44-4e542b8eb3eb"},
"im-pla" :{"name" :"tough_pla_175" ,"guid": "96fca5d9-0371-4516-9e96-8e8182677f3c"},
"bvoh" :{"name" :"bvoh_175" ,"guid": "923e604c-8432-4b09-96aa-9bbbd42207f4"},
"cpe" :{"name" :"cpe_175" ,"guid": "da1872c1-b991-4795-80ad-bdac0f131726"},
"hips" :{"name" :"hips_175" ,"guid": "a468d86a-220c-47eb-99a5-bbb47e514eb0"},
"tpu" :{"name" :"tpu_175" ,"guid": "19baa6a9-94ff-478b-b4a1-8157b74358d2"}
_MATERIAL_MAP = { "abs" :{"name" :"ABS" ,"guid": "2780b345-577b-4a24-a2c5-12e6aad3e690"},
"abs-cf10": {"name": "ABS-CF", "guid": "495a0ce5-9daf-4a16-b7b2-06856d82394d"},
"abs-wss1" :{"name" :"ABS-R" ,"guid": "88c8919c-6a09-471a-b7b6-e801263d862d"},
"asa" :{"name" :"ASA" ,"guid": "416eead4-0d8e-4f0b-8bfc-a91a519befa5"},
"nylon12-cf":{"name": "Nylon 12 CF" ,"guid": "3c6f2877-71cc-4760-84e6-4b89ab243e3b"},
"nylon" :{"name" :"Nylon" ,"guid": "283d439a-3490-4481-920c-c51d8cdecf9c"},
"pc" :{"name" :"PC" ,"guid": "62414577-94d1-490d-b1e4-7ef3ec40db02"},
"petg" :{"name" :"PETG" ,"guid": "69386c85-5b6c-421a-bec5-aeb1fb33f060"},
"pla" :{"name" :"PLA" ,"guid": "0ff92885-617b-4144-a03c-9989872454bc"},
"pva" :{"name" :"PVA" ,"guid": "a4255da2-cb2a-4042-be49-4a83957a2f9a"},
"wss1" :{"name" :"RapidRinse" ,"guid": "a140ef8f-4f26-4e73-abe0-cfc29d6d1024"},
"sr30" :{"name" :"SR-30" ,"guid": "77873465-83a9-4283-bc44-4e542b8eb3eb"},
"bvoh" :{"name" :"BVOH" ,"guid": "923e604c-8432-4b09-96aa-9bbbd42207f4"},
"cpe" :{"name" :"CPE" ,"guid": "da1872c1-b991-4795-80ad-bdac0f131726"},
"hips" :{"name" :"HIPS" ,"guid": "a468d86a-220c-47eb-99a5-bbb47e514eb0"},
"tpu" :{"name" :"TPU 95A" ,"guid": "19baa6a9-94ff-478b-b4a1-8157b74358d2"}
}


Expand Down
4 changes: 2 additions & 2 deletions plugins/3MFReader/WorkspaceDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Cura 1.1 as Cura
UM.Dialog
{
id: workspaceDialog
title: manager.isUcp? catalog.i18nc("@title:window", "Open Universal Cura Project (UCP)"): catalog.i18nc("@title:window", "Open Project")
title: manager.isUcp? catalog.i18nc("@title:window Don't translate 'Universal Cura Project'", "Open Universal Cura Project (UCP)"): catalog.i18nc("@title:window", "Open Project")

margin: UM.Theme.getSize("default_margin").width
minimumWidth: UM.Theme.getSize("modal_window_minimum").width
Expand All @@ -28,7 +28,7 @@ UM.Dialog
UM.Label
{
id: titleLabel
text: manager.isUcp? catalog.i18nc("@action:title", "Summary - Open Universal Cura Project (UCP)"): catalog.i18nc("@action:title", "Summary - Cura Project")
text: manager.isUcp? catalog.i18nc("@action:title Don't translate 'Universal Cura Project'", "Summary - Open Universal Cura Project (UCP)"): catalog.i18nc("@action:title", "Summary - Cura Project")
font: UM.Theme.getFont("large")
anchors.top: parent.top
anchors.left: parent.left
Expand Down
6 changes: 3 additions & 3 deletions plugins/3MFWriter/SettingSelection.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RowLayout
Layout.preferredWidth: UM.Theme.getSize("setting").width
checked: modelData.selected
onClicked: modelData.selected = checked
tooltip: modelData.selectable ? "" :catalog.i18nc("@tooltip", "This setting may not perform well while exporting to UCP. Users are asked to add it at their own risk.")
tooltip: modelData.selectable ? "" :catalog.i18nc("@tooltip Don't translate 'Universal Cura Project'", "This setting may not perform well while exporting to Universal Cura Project. Users are asked to add it at their own risk.")
}

UM.Label
Expand All @@ -30,8 +30,8 @@ RowLayout
UM.HelpIcon
{
UM.I18nCatalog { id: catalog; name: "cura" }
text: catalog.i18nc("@tooltip",
"This setting may not perform well while exporting to UCP, Users are asked to add it at their own risk.")
text: catalog.i18nc("@tooltip Don't translate 'Universal Cura Project'",
"This setting may not perform well while exporting to Universal Cura Project, Users are asked to add it at their own risk.")
visible: !modelData.selectable
}

Expand Down
4 changes: 2 additions & 2 deletions plugins/3MFWriter/UCPDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ def save3mf(self):
device.requestWrite(
nodes,
file_name,
["application/vnd.ms-package.3dmanufacturing-3dmodel+xml"],
["application/x-ucp"],
workspace_handler,
preferred_mimetype_list="application/vnd.ms-package.3dmanufacturing-3dmodel+xml"
preferred_mimetype_list="application/x-ucp"
)
except OutputDeviceError.UserCanceledError:
self._onRejected()
Expand Down
6 changes: 3 additions & 3 deletions plugins/3MFWriter/UCPDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Cura 1.1 as Cura
UM.Dialog
{
id: exportDialog
title: catalog.i18nc("@title:window", "Export Universal Cura Project")
title: catalog.i18nc("@title:window Don't translate 'Universal Cura Project'", "Export Universal Cura Project")

margin: UM.Theme.getSize("default_margin").width
minimumWidth: UM.Theme.getSize("modal_window_minimum").width
Expand All @@ -39,14 +39,14 @@ UM.Dialog
UM.Label
{
id: titleLabel
text: catalog.i18nc("@action:title", "Summary - Universal Cura Project")
text: catalog.i18nc("@action:title Don't translate 'Universal Cura Project'", "Summary - Universal Cura Project")
font: UM.Theme.getFont("large")
}

UM.Label
{
id: descriptionLabel
text: catalog.i18nc("@action:description", "Universal Cura Project files can be printed on different 3D printers while retaining positional data and selected settings. When exported, all models present on the build plate will be included along with their current position, orientation, and scale. You can also select which per-extruder or per-model settings should be included to ensure proper printing.")
text: catalog.i18nc("@action:description Don't translate 'Universal Cura Project'", "Universal Cura Project files can be printed on different 3D printers while retaining positional data and selected settings. When exported, all models present on the build plate will be included along with their current position, orientation, and scale. You can also select which per-extruder or per-model settings should be included to ensure proper printing.")
font: UM.Theme.getFont("default")
wrapMode: Text.Wrap
Layout.maximumWidth: headerColumn.width
Expand Down
12 changes: 12 additions & 0 deletions plugins/3MFWriter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ def getMetaData():
"description": i18n_catalog.i18nc("@item:inlistbox", "3MF file"),
"mime_type": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml",
"mode": ThreeMFWriter.ThreeMFWriter.OutputMode.BinaryMode
},
{
"extension": "3mf",
"description": i18n_catalog.i18nc("@item:inlistbox", "Universal Cura Project"),
"mime_type": "application/x-ucp",
"mode": ThreeMFWriter.ThreeMFWriter.OutputMode.BinaryMode
}
]
}
Expand All @@ -42,6 +48,12 @@ def getMetaData():
"description": i18n_catalog.i18nc("@item:inlistbox", "Cura Project 3MF file"),
"mime_type": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml",
"mode": ThreeMFWorkspaceWriter.ThreeMFWorkspaceWriter.OutputMode.BinaryMode
},
{
"extension": "3mf",
"description": i18n_catalog.i18nc("@item:inlistbox", "Universal Cura Project"),
"mime_type": "application/x-ucp",
"mode": ThreeMFWorkspaceWriter.ThreeMFWorkspaceWriter.OutputMode.BinaryMode
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion resources/definitions/fdmprinter.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -6089,7 +6089,7 @@
"brim_inside_margin":
{
"label": "Brim Avoid Margin",
"description": "A brim around a surface may touch an other surface where brim is not expected. This removes all brim within this distance from brimless surfaces.",
"description": "A brim around a model may touch an other model where you don't want it. This removes all brim within this distance from brimless models.",
"unit": "mm",
"type": "float",
"value": "line_width * 4",
Expand Down
Loading

0 comments on commit 6e9b82f

Please sign in to comment.