[CAM] LeadInOut new features (#22669)

* CAM: Improve LeadInOut

* rebuild/fix task panel UI

* migrate old LeadInOut parameters to the new properties

* Keep original Lead-in and/or Lead-out

* LeadInOut Rename None/Original to No Retract/None

* merge in changes from tarman/leadovertravel

* LeadInOut update names to No Change/Suppress Retraction

* Remove IncludeLayers option from LeadInOut (always true)

* [CAM] Fix offset entrance UI string

* [CAM] improve handling of step angle on lead in/out ArcZ

* resolve merge conflicts

* finish pulling in tarman's updates

* switch back from 'No Change' style to enable checkbox

* 'Suppress Retraction' -> 'No Retract'

* fix documentation string for lead in/out dressup

---------

Co-authored-by: tarman3 <joice501790018@tutamail.com>
This commit is contained in:
David Kaufman
2025-09-05 12:24:42 -04:00
committed by GitHub
parent 97c41149ba
commit 51f49d92d4
4 changed files with 1172 additions and 359 deletions

View File

@@ -5,7 +5,11 @@ from PySide import QtGui
translate = FreeCAD.Qt.translate
PROP_TYPE_QTYES = ["App::PropertyDistance", "App::PropertyAngle"]
PROP_TYPE_NUMERIC = PROP_TYPE_QTYES + ["App::PropertyPercent", "App:PropertyFloat"]
PROP_TYPE_NUMERIC = PROP_TYPE_QTYES + [
"App::PropertyPercent",
"App::PropertyInteger",
"App:PropertyFloat",
]
class SimpleEditPanel:
@@ -30,7 +34,10 @@ class SimpleEditPanel:
def getFields(self):
for prop_name, (get_field, set_field) in self._fc.items():
setattr(self.obj, prop_name, get_field())
val = get_field()
if isinstance(getattr(self.obj, prop_name), int):
val = int(val)
setattr(self.obj, prop_name, val)
def setFields(self):
for prop_name, (get_field, set_field) in self._fc.items():