slic3r / Slic3r

Open Source toolpath generator for 3D printers
https://slic3r.org/
GNU Affero General Public License v3.0
3.33k stars 1.29k forks source link

Can we get tool-specific tool change gcode? #2950

Open nicksears opened 9 years ago

nicksears commented 9 years ago

I've posted an issue about this before (issue 2675) where I requested to be able to modularly invoke custom gcode before/after a certain number of layer/tool/print changes.

While I'd still love to see this level of sophistication, and we've recently seen before/after layer change sections added, we really need the ability to have custom g-code before/after switching to a specific tool.

I have different hot swappable tools and I need to calibrate them each time I switch to one. I've come up with two solutions: 1. Calculate the equivalent filament diameter (calculate cross sectional diameter*calibration and make them equal, back calculate filament diameter - or if they're close, just fudge the ratio of the CSA with the extrusion multiplier) 2. Use a post-processing program (my favorite is "find and replace" "fnr.exe" (https://findandreplace.codeplex.com/) to replace each T1 statement with T1; M92 EXXX;

I realize some firmwares have different extruder calibrations (repetier) but marlin (mine at least) does not, and I'd rather not reflash the firmware when I decide I want to use T1 in the T0 spot and vice versa.

Where can I go about helping make these changes? I've done some coding, so I'd love to try and help. Very little python so far, but I can try and have some friends who can.

Nick

phizz166 commented 9 years ago

First of all, +1 to this. I could really use different G-codes on switching from one tool to the next, as I have two different purge/wipe zones at either side of the bed, for both extruders, and right now the code doesn't let me intelligently select the proper side according to which tool is becoming active.

Ultimately the best thing would be to have proper conditional statements in the toolchange/layer change G-code -- if [next_extruder] == 0 { } else { } ... but having at least a T0 -> T1 mode and T1 -> T0 would be a good start.

Second, to just address your specific problem -- my machine also has two different step-rates for the two extruders (one is geared 3mm, the other direct-drive 1.75mm). I've solved this by running https://github.com/MagoKimbra/MarlinKimbra, which works very well.

pyrophreek commented 9 years ago

I agree with this as well, and I would suggest the tool change custom gcode be moved to the tool section of the printer settings, rather than in the custom gcode section. This way however many tools you have, you can configure the before and after code for each one independently and intelligently.

simonkuehling commented 8 years ago

Nice to find this issue, i was about writing a similar request.

Extruder-specific toolchange GCODE would be a marvel for those that do their own toolchange logic rather than letting slic3r do it. My example case is the Nozzle Purging/Cleaning system of our HT500 3D printer (like seen here: https://www.youtube.com/watch?v=G4HWzoBPA7Y) For several material combinations it would be best to use different spots per extruder on the silicone lip to avoid mixing in leftovers from the other nozzle while wiping. kind of the same as having different purging areas like @phizz166. Also for materials that need different purging parameters or wiping moves, this could be useful to further improve reliability and of course print quality resulting from this.

lordofhyphens commented 8 years ago

Should be solvable with the conditional gcode syntax being worked on, right?

simonkuehling commented 8 years ago

@lordofhyphens - a conditional syntax is all that we need here, i agree!

nicksears commented 8 years ago

placeholder values would work, but it could get messy really quick. We already have too many custom g-code sections for most people (most people only use start and end). Why not make it configurable?

I'll also add here, but I'm about to make a separate post, but we really need a few other similar things, too: support for multiple fans. Marlin supports it now with "M106 P2 Sxxx", etc and we need slic3r to actually obey the filament cooling profile for those fans Also, we really need per-section post processing scripts; scripts associated with the printer or filament settings, not just the print settings.

On Mon, Aug 22, 2016 at 9:34 AM, simonkuehling notifications@github.com wrote:

@lordofhyphens https://github.com/lordofhyphens - a conditional syntax is all that we need here, i agree!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alexrj/Slic3r/issues/2950#issuecomment-241432362, or mute the thread https://github.com/notifications/unsubscribe-auth/AGTjvOfzLpviBwga3CsqmQILJZzIXU7jks5qibNwgaJpZM4FKQHw .

Nick Sears, M.S. Ph.D. Candidate Biomedical Engineering Texas A&M University '10 832-289-5518

hexxter commented 5 years ago

a solution for tool changer is a good feature. Have anyone found a solution?

lordofhyphens commented 5 years ago

@hexxter we have conditional gcode now.

hexxter commented 5 years ago

@lordofhyphens is a example avalible? thx for your fast answer!

can i write multible line in one block? i have written it in this way, but it is not good to read.

End GCode: {if [current_extruder]==0}G0 X255.000000 Y330.000000 F15000; park Ext0 {if [current_extruder]==0}G0 Y385.000000 F4000 {if [current_extruder]==0}G0 X245.000000 F4000 {if [current_extruder]==0}G0 Y330.000000 F15000 {if [current_extruder]==1}G0 X154.000000 Y330.000000 F15000; park Ext1 {if [current_extruder]==1}G0 Y385.000000 {if [current_extruder]==1}G0 X144.000000 F4000 {if [current_extruder]==1}G0 Y330.000000 F15000

Tool Change GCode: {if [current_extruder]==0}G0 X255.000000 Y330.000000 F15000; park Ext0 {if [current_extruder]==0}G0 Y385.000000 F4000 {if [current_extruder]==0}G0 X245.000000 F4000 {if [current_extruder]==0}G0 Y330.000000 F15000 {if [current_extruder]==1}G0 X154.000000 Y330.000000 F15000; park Ext1 {if [current_extruder]==1}G0 Y385.000000 {if [current_extruder]==1}G0 X144.000000 F4000 {if [current_extruder]==1}G0 Y330.000000 F15000 {if [next_extruder]==0}G0 X245.000000 Y330.000000 F15000; pick Ext0 {if [next_extruder]==0}G0 Y385.000000 {if [next_extruder]==0}G0 X255.000000 F4000 {if [next_extruder]==0}G0 Y330.000000 F15000 {if [next_extruder]==1}G0 X144.000000 Y330.000000 F15000; park Ext1 {if [next_extruder]==1}G0 Y385.000000 {if [next_extruder]==1}G0 X154.000000 F4000 {if [next_extruder]==1}G0 Y330.000000 F15000

Have you a better solution? I haven't find a solution to write a block.

simonkuehling commented 5 years ago

@hexxter, have a look at https://manual.slic3r.org/advanced/conditional-gcode for a documentation on conditional gcode syntax!