Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CURA-12313 Use single extruder when exporting for Replicator+ #20115

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ requirements:
- "curaengine/5.10.0-alpha.0@ultimaker/testing"
- "cura_binary_data/5.10.0-alpha.0@ultimaker/testing"
- "fdm_materials/5.10.0-alpha.0@ultimaker/testing"
- "dulcificum/0.2.1@ultimaker/stable"
- "dulcificum/0.3.0@ultimaker/cura_12313"
- "pysavitar/5.4.0-alpha.0@ultimaker/stable"
- "pynest2d/5.4.0-alpha.0@ultimaker/stable"
requirements_internal:
Expand Down
9 changes: 9 additions & 0 deletions plugins/MakerbotWriter/MakerbotWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ def __init__(self) -> None:
suffixes=["makerbot"]
)
)
MimeTypeDatabase.addMimeType(
MimeType(
name="application/x-makerbot-replicator_plus",
comment="Makerbot Toolpath Package",
suffixes=["makerbot"]
)
)

_PNG_FORMAT = [
{"prefix": "isometric_thumbnail", "width": 120, "height": 120},
Expand Down Expand Up @@ -114,6 +121,8 @@ def write(self, stream: BufferedIOBase, nodes: List[SceneNode], mode=MeshWriter.
filename, filedata = "print.gcode", gcode_text_io.getvalue()
case "application/x-makerbot":
filename, filedata = "print.jsontoolpath", du.gcode_2_miracle_jtp(gcode_text_io.getvalue())
case "application/x-makerbot-replicator_plus":
filename, filedata = "print.jsontoolpath", du.gcode_2_miracle_jtp(gcode_text_io.getvalue(), nb_extruders=1)
case _:
raise Exception("Unsupported Mime type")

Expand Down
6 changes: 6 additions & 0 deletions plugins/MakerbotWriter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ def getMetaData():
"description": catalog.i18nc("@item:inlistbox", "Makerbot Sketch Printfile"),
"mime_type": "application/x-makerbot-sketch",
"mode": MakerbotWriter.MakerbotWriter.OutputMode.BinaryMode,
},
{
"extension": file_extension,
"description": catalog.i18nc("@item:inlistbox", "Makerbot Replicator+ Printfile"),
"mime_type": "application/x-makerbot-replicator_plus",
"mode": MakerbotWriter.MakerbotWriter.OutputMode.BinaryMode,
}
]
},
Expand Down
Loading