- added in CNCJob preferences new preferences that allow compensation for the CNC bed skew/tilt (axes not being square one to another)
- all pre-processors are altered such they can adjust the gcode to use the compensation values set in Preferences -> CNC-Job section
This commit is contained in:
@@ -59,7 +59,21 @@ class Roland_MDX_540(PreProc):
|
||||
else:
|
||||
x = p.x
|
||||
y = p.y
|
||||
return ('Z' + self.coordinate_format + ',' + self.coordinate_format) % (float(x * 100.0), float(y * 100.0))
|
||||
|
||||
# formula for skewing on x for example is:
|
||||
# x_fin = x_init + y_init/slope where slope = p._bed_limit_y / p._bed_skew_x (a.k.a tangent)
|
||||
if p._bed_skew_x == 0:
|
||||
x_pos = x + p._bed_offset_x
|
||||
else:
|
||||
x_pos = (x + p._bed_offset_x) + ((y / p._bed_limit_y) * p._bed_skew_x)
|
||||
|
||||
if p._bed_skew_y == 0:
|
||||
y_pos = y + p._bed_offset_y
|
||||
else:
|
||||
y_pos = (y + p._bed_offset_y) + ((x / p._bed_limit_x) * p._bed_skew_y)
|
||||
|
||||
return ('Z' + self.coordinate_format + ',' + self.coordinate_format) % (
|
||||
float(x_pos * 100.0), float(y_pos * 100.0))
|
||||
|
||||
def rapid_code(self, p):
|
||||
if p.units.upper() == 'IN':
|
||||
|
||||
Reference in New Issue
Block a user