Add height range modifier by Script
 
Notifiche
Cancella tutti

Add height range modifier by Script  

  RSS
SphaeroX
(@sphaerox)
New Member
Add height range modifier by Script

Hello, is there a way I can set the height modifications externally? I ask because I keep doing tests and therefore have to manually inject a gcode every 2mm. If I could do this externally, I would build a script for this 

Postato : 25/11/2022 2:09 pm
Robin
(@robin)
Noble Member
RE:

Depending on what you want to do, the Prusa Slicer internal macros will do: https://help.prusa3d.com/article/macros_1775

If they don't you can also use whatever you want to post process your g-code: https://help.prusa3d.com/article/post-processing-scripts_283913 (setting slicer to "verbose g-code" in output options gives you plenty to search for...)

If at first you don't succeed, skydiving is not for you.
Find out why this is pinned in the general section!

Postato : 25/11/2022 3:06 pm
Diem
 Diem
(@diem)
Illustrious Member

If you are doing things by layer height then it's fairly straightforward.

Gcode is just text.  There are useful comments at every layer change:

M204 S1000
;LAYER_CHANGE
;Z:1.4
;HEIGHT:0.2
;BEFORE_LAYER_CHANGE
G92 E0.0
;1.4

;WIPE_START
G1 F8640
G1 X81.581 Y70.075 E-.26878
G1 X81.678 Y70.238 E-.04385
G1 X81.774 Y70.459 E-.05558
G1 X80.967 Y71.266 E-.26348
G1 X80.996 Y71.814 E-.12663
G1 X81.001 Y71.809 E-.00168
;WIPE_END
G1 E-.04 F2100
G1 Z1.8 F10800
;AFTER_LAYER_CHANGE
;1.4
G1 X85.131 Y71.176

So anything that can parse text can be used to edit it.  Eg Perl or Javascript...

And if you need additional target comments you can use Prusa Slicer macros to insert them.

Cheerio,

Postato : 25/11/2022 4:34 pm
Condividi: