prusa3d / PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
https://www.prusa3d.com/prusaslicer/
GNU Affero General Public License v3.0
7.69k stars 1.93k forks source link

Need a way to specify tool number per extruder #2210

Open DrLex0 opened 5 years ago

DrLex0 commented 5 years ago

Version

1.42.0-beta2

Operating system type + version

Any

3D printer brand / version + firmware version (if known)

Any printer running Sailfish or MakerWare (and perhaps other firmwares)

Behavior

Is this a new feature request? Yes, although it is not really new. I already filed this issue on mainline Slic3r but it has only been gathering dust ever since.

I don't know what is the best way to solve this. One possible way is to add a “Tool number” field to the Extruder settings in the Printer Settings. Obviously this must be an expert option. (Ideally it would not allow entering the same number for two different extruders in the same profile, but since it is an expert option anyway, that would only be icing on the cake.)

Project File (.3MF) where problem occurs

SingleExtruderTool.3mf.zip

RocketSci420 commented 2 years ago

Why is this still an issue 2.5 years after this was opened? Have you found any workarounds other than postprocessing DrLex?

DrLex0 commented 2 years ago

No.

lukasmatena commented 2 years ago

@DrLex0 Can't you add the second extruder in Printer Settings and then just assign all parts the desired extruder? Or, you might use 2.4.1-beta1 and use the new 'G-Code substitutions' (regex substitutions of the output).

I have the same ideas as are mentioned in that https://github.com/slic3r/Slic3r/issues/4003. The format of the G-Codes in Sailfish (which is probably the only one affected) is poorly documented and I don't like the idea of changing the behavior and possibly breaking existing profiles, or e.g. printers with older FW versions (in case the format changed in the past). Adding another configuration field because of this (almost five years old issue that affects handful of people) also does not seem like a good solution, especially if there are workarounds (which I believe there are, as I have written above).

Does either of the suggestions work for you?

DrLex0 commented 2 years ago

@lukasmatena Unfortunately not.

Explicitly setting the extruder for parts: been there, done that. It is a recipe for failed prints and wasted time. In the beginning this was actually how I did it, because even in a single extruder profile it used to be possible to specify the extruder number for parts, regardless of how many extruders the printer profile had. But I often forgot to do this, or whether extruder 1 was left or right. Then I created the post-processing script, and everything became foolproof, which was particularly important as others started to use my configs too. Printing with the left extruder is now as simple as selecting the “L” printer profile, loading some models, choosing some print settings, and hitting the slice button. There is no risk of forgetting a crucial step or being confused about which material belongs to what extruder. Keep in mind that about 99% of all prints I do, are single material, and it is best to do single material prints with the left extruder due to the way this printer is constructed. It would therefore be annoying to have to use a dual material profile all the time just to work around some issue.

The G-code substitutions could have been a solution but as it is now, they are in the wrong place. The substitution has to be applied only when printing with the left extruder. The choice to print with only the left, right, or both extruders, is made by selecting a printer profile, not a print profile, and I think this makes perfect sense. Print profiles should define settings for a specific material and output quality, not what extruder it will be printed with (which, by the way, makes extruder clearance seem out of place in print settings). If a similar G-code substitution feature could be available in printer profiles, that would be helpful and would finally allow to make the post-processing script entirely optional.

RocketSci420 commented 2 years ago

@lukasmatena I've actually tried both defining the printer with both extruders and the new gcode substitution. As @DrLex0 mentioned, setting up the machine with both extruders and only printing with the left can work, but it's not ideal. Another issue (possible bug) I found, you cannot add gcode modifications at a specific layer in the preview window with two extruders defined. I've tried in both 2.4.0 and 2.4.1 with the same result. I can define the gcode modifications at layers, ex. M104 S200 T1, but when you click "slice now" it deletes all of the custom gcode modifications and slices the model without the modifications. Again, this only happens when multiple extruders are active.

I've also tried the gcode substitutions, but I am not very familiar with ECMAScript language. I successfully tested a find \M104 S.+T0 and replaced it with M104 S205 T1. But I would like to figure out next is how to get that substitution to work by changing only the T0 to a T1 while returning the M104 S. that it found. The S temp may be variable for this substitution case and I want it to return the same M104 S. The gcode substitution seems to address my issue, but I'd still prefer to have the ability to define a tool number per extruder. And I agree with DrLex that this gcode substitution feature belongs in the printer settings rather than the print settings.