Closed thekroko closed 2 years ago
See my above commit. The reason for assuming z max is zero is that many GCodes move down with a cutting move. Start from the highest z cut point makes for poor simulations in many cases. However, you are right about GCodes that expect the workpiece to be above zero. Thanks!
The auto-detect workpiece logic always results in a bounding box with a height of z=2.1mm (latest Windows build), which - looking at the code - seems to be the default min if boundary.height < 2mm (2mm + 5%).
From a quick glance, it looks like the clamping code in Workpiece.cpp might not be able to handle the situation where the workpiece/cutting happens at a Z>0, and the wasteboard is at Z=0?
Example gcode snippet that fails:
Maybe this code should be changed to only raise
bMax.z
to0
ifbMax.z < 0
?