Zakm0n
Posts: 3
Joined: Thu Aug 27, 2015 5:42 am

Any way to get min/max coords of a print into a script?

So, my goal here is to set up my mesh leveling to cater to every print. I'm using a duet wifi, and there is a g-code to set the probing area for my mesh leveling. If I could set that code in my start script to essentially make a bounding box around my print and put those coordinates into that code, my printer could probe only the necessary area before a print, saving a ton of startup time.

M557 X10:295 Y10:295 S20 is the default setting, that's what is probed by default.

M557 X[AAA]:[BBB] Y[CCC]:[DDD] S20 is what I want where:

AAA is (Xmin) - 10
BBB is (Xmax) + 10
CCC is (Ymin) - 10
DDD is (Ymax) + 10

Anyone have any ideas on how to accomplish this?
bobstro
Posts: 4
Joined: Mon Jun 11, 2018 12:47 pm

Re: Any way to get min/max coords of a print into a script?

I wrote a crude python script to parse the gcode and simply track the minimum and maximum X & Y moves. It works well enough.

However, are those few seconds of bed leveling really going to gain you that much time on a multi-hour print? I was worried about "startup time" until I started doing prints that routinely run for 4-12 hours. Much better to get all the calibration and tuning right by spending a few minutes up front than deal with problems later.

Return to “Feature Requests”