Where are the program bounds stored?

More
27 Oct 2021 12:35 #224500 by HarryXS
Hi at all,

in my GUI I want to tell the operator how big the material must be for a specific gcode.
I can see the program bounds in the gcode backplot but I'm not able to find them somewhere outside glcanon.py.

I think it would be nice to have them in STATUS.

For now I get them from glcanon.min_extents and glcanon.max_extents

Thanks, Harry

Please Log in or Create an account to join the conversation.

More
27 Oct 2021 12:59 #224507 by andypugh
They are calculated by the backplot previewer, which is why they are only in glcannon. The GUIs that don't do a backplot don't have any idea that the g-code is out of bounds until it is too late. (Touchy, for example, does not give an out-of-bounds warning at program load)

I guess the problem with having it in the status is that the data will often simply not exist.

Please Log in or Create an account to join the conversation.

More
27 Oct 2021 14:54 #224522 by snowgoer540
QtPlasmaC does something similar to check for A. if the program is outside the work envelope (bounding box), and B. let the user know how far outside the bounds the program is.  I would imagine it could be adapted to do what you're after.

I am not sure how familiar you are with Python, but you can check it out here:  github.com/LinuxCNC/linuxcnc/blob/master...qtplasmac_handler.py

you're looking for:  def bounds_check

Please Log in or Create an account to join the conversation.

Moderators: KCJLcvette
Time to create page: 0.071 seconds
Powered by Kunena Forum