|
@@ -17,7 +17,7 @@ from PyQt5.QtCore import Qt
|
|
|
from camlib import distance, arc, three_point_circle, Geometry, FlatCAMRTreeStorage
|
|
from camlib import distance, arc, three_point_circle, Geometry, FlatCAMRTreeStorage
|
|
|
from appTool import AppTool
|
|
from appTool import AppTool
|
|
|
from appGUI.GUIElements import OptionalInputSection, FCCheckBox, FCLabel, FCComboBox, FCTextAreaRich, \
|
|
from appGUI.GUIElements import OptionalInputSection, FCCheckBox, FCLabel, FCComboBox, FCTextAreaRich, \
|
|
|
- FCDoubleSpinner, FCButton, FCInputDialog, FCTree, NumericalEvalTupleEntry
|
|
|
|
|
|
|
+ FCDoubleSpinner, FCButton, FCInputDoubleSpinner, FCTree, NumericalEvalTupleEntry
|
|
|
from appParsers.ParseFont import *
|
|
from appParsers.ParseFont import *
|
|
|
|
|
|
|
|
from shapely.geometry import LineString, LinearRing, MultiLineString, Polygon, MultiPolygon, Point
|
|
from shapely.geometry import LineString, LinearRing, MultiLineString, Polygon, MultiPolygon, Point
|
|
@@ -1445,12 +1445,12 @@ class TransformEditorTool(AppTool):
|
|
|
return
|
|
return
|
|
|
|
|
|
|
|
def on_rotate_key(self):
|
|
def on_rotate_key(self):
|
|
|
- val_box = FCInputDialog(title=_("Rotate ..."),
|
|
|
|
|
- text='%s:' % _('Enter an Angle Value (degrees)'),
|
|
|
|
|
- min=-359.9999, max=360.0000, decimals=self.decimals,
|
|
|
|
|
- init_val=float(self.app.defaults['tools_transform_rotate']),
|
|
|
|
|
- parent=self.app.ui)
|
|
|
|
|
- val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/rotate.png'))
|
|
|
|
|
|
|
+ val_box = FCInputDoubleSpinner(title=_("Rotate ..."),
|
|
|
|
|
+ text='%s:' % _('Enter an Angle Value (degrees)'),
|
|
|
|
|
+ min=-359.9999, max=360.0000, decimals=self.decimals,
|
|
|
|
|
+ init_val=float(self.app.defaults['tools_transform_rotate']),
|
|
|
|
|
+ parent=self.app.ui)
|
|
|
|
|
+ val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/rotate.png'))
|
|
|
|
|
|
|
|
val, ok = val_box.get_value()
|
|
val, ok = val_box.get_value()
|
|
|
if ok:
|
|
if ok:
|
|
@@ -1463,12 +1463,12 @@ class TransformEditorTool(AppTool):
|
|
|
def on_offx_key(self):
|
|
def on_offx_key(self):
|
|
|
units = self.app.defaults['units'].lower()
|
|
units = self.app.defaults['units'].lower()
|
|
|
|
|
|
|
|
- val_box = FCInputDialog(title=_("Offset on X axis ..."),
|
|
|
|
|
- text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
|
|
|
|
|
- min=-10000.0000, max=10000.0000, decimals=self.decimals,
|
|
|
|
|
- init_val=float(self.app.defaults['tools_transform_offset_x']),
|
|
|
|
|
- parent=self.app.ui)
|
|
|
|
|
- val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsetx32.png'))
|
|
|
|
|
|
|
+ val_box = FCInputDoubleSpinner(title=_("Offset on X axis ..."),
|
|
|
|
|
+ text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
|
|
|
|
|
+ min=-10000.0000, max=10000.0000, decimals=self.decimals,
|
|
|
|
|
+ init_val=float(self.app.defaults['tools_transform_offset_x']),
|
|
|
|
|
+ parent=self.app.ui)
|
|
|
|
|
+ val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/offsetx32.png'))
|
|
|
|
|
|
|
|
val, ok = val_box.get_value()
|
|
val, ok = val_box.get_value()
|
|
|
if ok:
|
|
if ok:
|
|
@@ -1481,12 +1481,12 @@ class TransformEditorTool(AppTool):
|
|
|
def on_offy_key(self):
|
|
def on_offy_key(self):
|
|
|
units = self.app.defaults['units'].lower()
|
|
units = self.app.defaults['units'].lower()
|
|
|
|
|
|
|
|
- val_box = FCInputDialog(title=_("Offset on Y axis ..."),
|
|
|
|
|
- text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
|
|
|
|
|
- min=-10000.0000, max=10000.0000, decimals=self.decimals,
|
|
|
|
|
- init_val=float(self.app.defaults['tools_transform_offset_y']),
|
|
|
|
|
- parent=self.app.ui)
|
|
|
|
|
- val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsety32.png'))
|
|
|
|
|
|
|
+ val_box = FCInputDoubleSpinner(title=_("Offset on Y axis ..."),
|
|
|
|
|
+ text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
|
|
|
|
|
+ min=-10000.0000, max=10000.0000, decimals=self.decimals,
|
|
|
|
|
+ init_val=float(self.app.defaults['tools_transform_offset_y']),
|
|
|
|
|
+ parent=self.app.ui)
|
|
|
|
|
+ val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/offsety32.png'))
|
|
|
|
|
|
|
|
val, ok = val_box.get_value()
|
|
val, ok = val_box.get_value()
|
|
|
if ok:
|
|
if ok:
|
|
@@ -1497,12 +1497,12 @@ class TransformEditorTool(AppTool):
|
|
|
self.app.inform.emit('[success] %s...' % _("Offset on the Y axis canceled"))
|
|
self.app.inform.emit('[success] %s...' % _("Offset on the Y axis canceled"))
|
|
|
|
|
|
|
|
def on_skewx_key(self):
|
|
def on_skewx_key(self):
|
|
|
- val_box = FCInputDialog(title=_("Skew on X axis ..."),
|
|
|
|
|
- text='%s:' % _('Enter an Angle Value (degrees)'),
|
|
|
|
|
- min=-359.9999, max=360.0000, decimals=self.decimals,
|
|
|
|
|
- init_val=float(self.app.defaults['tools_transform_skew_x']),
|
|
|
|
|
- parent=self.app.ui)
|
|
|
|
|
- val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/skewX.png'))
|
|
|
|
|
|
|
+ val_box = FCInputDoubleSpinner(title=_("Skew on X axis ..."),
|
|
|
|
|
+ text='%s:' % _('Enter an Angle Value (degrees)'),
|
|
|
|
|
+ min=-359.9999, max=360.0000, decimals=self.decimals,
|
|
|
|
|
+ init_val=float(self.app.defaults['tools_transform_skew_x']),
|
|
|
|
|
+ parent=self.app.ui)
|
|
|
|
|
+ val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/skewX.png'))
|
|
|
|
|
|
|
|
val, ok = val_box.get_value()
|
|
val, ok = val_box.get_value()
|
|
|
if ok:
|
|
if ok:
|
|
@@ -1513,12 +1513,12 @@ class TransformEditorTool(AppTool):
|
|
|
self.app.inform.emit('[success] %s...' % _("Skew on X axis canceled"))
|
|
self.app.inform.emit('[success] %s...' % _("Skew on X axis canceled"))
|
|
|
|
|
|
|
|
def on_skewy_key(self):
|
|
def on_skewy_key(self):
|
|
|
- val_box = FCInputDialog(title=_("Skew on Y axis ..."),
|
|
|
|
|
- text='%s:' % _('Enter an Angle Value (degrees)'),
|
|
|
|
|
- min=-359.9999, max=360.0000, decimals=self.decimals,
|
|
|
|
|
- init_val=float(self.app.defaults['tools_transform_skew_y']),
|
|
|
|
|
- parent=self.app.ui)
|
|
|
|
|
- val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/skewY.png'))
|
|
|
|
|
|
|
+ val_box = FCInputDoubleSpinner(title=_("Skew on Y axis ..."),
|
|
|
|
|
+ text='%s:' % _('Enter an Angle Value (degrees)'),
|
|
|
|
|
+ min=-359.9999, max=360.0000, decimals=self.decimals,
|
|
|
|
|
+ init_val=float(self.app.defaults['tools_transform_skew_y']),
|
|
|
|
|
+ parent=self.app.ui)
|
|
|
|
|
+ val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/skewY.png'))
|
|
|
|
|
|
|
|
val, ok = val_box.get_value()
|
|
val, ok = val_box.get_value()
|
|
|
if ok:
|
|
if ok:
|