Changing a print setting after a certain height
I am printing an object with extreme overhangs, and the only setting that I found to be helpful is the "infill first" parameter. If I change that setting so it does infill first, it prints the overhang area with almost no issues, but when it's past the overhang area, it creates zits and blobs all over.
So, I would like to turn off the infill first parameter after 10mm for example. Since it is not available in the height range modifier, I have to add a custom gcode at printer settings>custom g-code>before layer change g-code. Would the code below switch the infill_first to off, after the 10mm height?:
;BEFORE_LAYER_CHANGE ; layer_z is height of current layer in mm ;[layer_z] {if layer_z >= 10} infill_first = 0 {endif}
Add a modifier: 'Layers and Perimeters' allows infill-first to be set.
Cheerio,
Gcode and slicer settings don't interact
[...] So, I would like to turn off the infill first parameter after 10mm for example. Since it is not available in the height range modifier, I have to add a custom gcode at printer settings>custom g-code>before layer change g-code. Would the code below switch the infill_first to off, after the 10mm height?
As @Diem notes, the correct way to do this is with a modifier in the slicer. A bit of explanation why:
When you insert custom gcode, the slicer adds lines to the stream of gcode inserted. Nothing in custom gcode changes any of the actual slicing parameters. It just sticks gcode in at the appropriate point in the stream. This means that you can't -- at least with the current version of PrusaSlicer -- do things like alter slicer settings in gcode. The printer is also profoundly dumb, and doesn't do any sort of interpretation or gcode manipulation.
While you can insert substitutions in gcode (e.g., layer height) that's about it. The gcode and slicer parameters don't interact.
Hope that makes sense.
and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan
Infill first is not available under the modifier settings?
Well, the reason I was trying to insert a code is because I couldn't find the "infill first" parameter on the modifiers. I just checked again, and it is not under either the height range modifier, or an actual modifier that is associated with a shape(box, etc.) Maybe I am looking at the wrong settings? The closest thing on the list is the "external perimeters first", but I believe that doesn't necessarily mean infill first. I believe the external perimeters first setting prints the external perimeter first, then the perimeters, then the infill.
No gcode command will do what you want, sorry
Well, the reason I was trying to insert a code is because I couldn't find the "infill first" parameter on the modifiers. I just checked again, and it is not under either the height range modifier, or an actual modifier that is associated with a shape(box, etc.) Maybe I am looking at the wrong settings?
No, you're right. I don't see it under modifiers. Unfortunately, that's a "slicer thing" and there is no gcode you could easily insert that would do what you want. You'd have to do a lot of non-trivial editing of the gcode file.
The closest thing on the list is the "external perimeters first", but I believe that doesn't necessarily mean infill first. I believe the external perimeters first setting prints the external perimeter first, then the perimeters, then the infill.
Again, correct. External perimeters first just prints the wall lines (the shells) starting with the outside in, which can help with wall accuracy. It doesn't interact with the printing of infill.
What specific problem are you having that makes you want to print infill first? Perhaps there's another approach? Save your current 3MF project file, zip it up, and attach it to a reply here so we can see your part & settings and give better recommendations.
and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan
3MF
If you upload a 3MF, I will try to print it and look at it in PrusasSlicer.
--------------------
Chuck H
3D Printer Review Blog
@cape_olive
This is what you can do to achieve what you ask for, Infill first up to 10mm, then perimeter first
1. Add "Custom G-code" to the first layer above 10mm, ";BREAK", this is just for reference
2. "Infill Before Perimeters" checked
3. Create G-code "InfillBEFORE.gcode"
4. UNcheck "Infill Before Perimeters"
5. Create G-code "InfillAFTER.gcode"
6. Open "InfillBEFORE.gcode" in texteditor
7. Open "InfillAFTER.gcode" in another instance of texteditor
8. Open a third, empty, instance of texteditor
9. Search for ";BREAK" in InfillBEFORE.gcode and select everything before it
10. Paste in the empty text editor
11. Search for ";BREAK" in InfillAFTER.gcode and select everything after it
12. Paste at the end in "empty" text editor
13. Save file from the now not so empty texteditor, "Finish.gcode"
Printer will print with first g-code, infill first up to, and including, 10mm. Above 10mm with second g-code, infill last
It may look like a cumbersome process, but if you understand it it's rather easy.
Did it myself the other night, wanted test printing with three different filament at different temperature with three different print settings at three different heights 😀
0-10mm with PLA 215°, 10-20mm PETG 250°, and 20-30mm ABS 255°
Why? Just out of curiosity
It probably will be easier to make adjustment in print settings
Prusa i3 MK3S+ FW 3.11.0 (kit dec -20), PrusaSlicer 2.6.1+win64, Fusion 360, Windows 10
Modifier: 'Layers and Perimeters' will add an entry to the part list. Select it.
Go to the Print Settings menu and select Infill, the 'Infill before perimeters' setting is at the bottom in the advanced section.
Cheerio,
Hi, thank you all for your comments and trying to help! I was able to get acceptable prints just by adjusting a few other settings such as the fan speed, etc. So, didn't have to manipulate the g-code.
Thanks again!