- fixed the HPGL preprocessor

This commit is contained in:
Marius Stanciu 2019-12-16 19:56:24 +02:00 committed by Marius
parent 6744d9ae07
commit 435648171e
4 changed files with 20 additions and 7 deletions

View File

@ -13,11 +13,13 @@ CAD program, and create G-Code for Isolation routing.
- in Geometry Editor added support for Jump To function such as that it works within the Editor Tools themselves. For now it works only in absolute jumps
- modified the Jump To method such that now allows relative jump from the current mouse location
- fixed the Defaults upgrade overwrting the new version number with the old one
- fixed the Defaults upgrade overwriting the new version number with the old one
- fixed issue with clear_polygon3() - the one who makes 'lines' and fixed the NCC Tool
- some small changes in the FlatCAMGeoemtry.on_tool_add() method
- some small changes in the FlatCAMGeometry.on_tool_add() method
- made sure that in Geometry Editor the self.app.mouse attribute is updated with the current mouse position (x, y)
- updated the preprocessor files
- fixed the HPGL preprocessor
15.12.2019

View File

@ -883,7 +883,7 @@ class ExcellonObjectUI(ObjectUI):
self.ois_tcz_e = OptionalInputSection(self.toolchange_cb, [self.toolchangez_entry])
# Start move Z:
self.estartz_label = QtWidgets.QLabel('%s:' % _("Start move Z"))
self.estartz_label = QtWidgets.QLabel('%s:' % _("Start Z"))
self.estartz_label.setToolTip(
_("Height of the tool just after start.\n"
"Delete the value if you don't need this feature.")

View File

@ -2584,7 +2584,7 @@ class ExcellonAdvOptPrefGroupUI(OptionsGroupUI):
self.toolchangexy_entry = FCEntry()
grid1.addWidget(self.toolchangexy_entry, 1, 1)
startzlabel = QtWidgets.QLabel('%s:' % _('Start move Z'))
startzlabel = QtWidgets.QLabel('%s:' % _('Start Z'))
startzlabel.setToolTip(
_("Height of the tool just after start.\n"
"Delete the value if you don't need this feature.")
@ -3429,7 +3429,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
grid1.addWidget(self.toolchangexy_entry, 1, 1)
# Start move Z
startzlabel = QtWidgets.QLabel('%s:' % _('Start move Z'))
startzlabel = QtWidgets.QLabel('%s:' % _('Start Z'))
startzlabel.setToolTip(
_("Height of the tool just after starting the work.\n"
"Delete the value if you don't need this feature.")

View File

@ -49,8 +49,19 @@ class hpgl(FlatCAMPostProc):
y = p.y
# we need to have the coordinates as multiples of 0.025mm
x = round(x / 0.025) * 25 / 1000
y = round(y / 0.025) * 25 / 1000
x = round(x * 40)
y = round(y * 40)
# constrain the x and y values within the domain of valid values: [-32767 ... 32768]
if x <= -32767:
x = -32767
if x >= 32768:
x = 32768
if y <= -32767:
y = -32767
if y >= 32768:
y = 32768
return ('PA' + self.coordinate_format + ',' + self.coordinate_format + ';') % \
(p.coords_decimals, x, p.coords_decimals, y)