4th-axis fixes and improvements

Fix rotational orientation of pockets.  Need to apply same fix to ProfileFaces.
Fix final depth issue based upon error in rotational orientation fixed here.
Add property, `LimitDepthToFace` to facilitate easier pockets and face profiling on rotational-enabled operations.
Hide rotational support properties when operations do not use rotation.
Remove unnecessary property, `B_AxisErrorOverride`, and delete dead code that used it.
This commit is contained in:
Russell Johnson
2020-03-14 11:36:11 -05:00
parent 6fca59c388
commit 8e9d704556
6 changed files with 191 additions and 126 deletions

View File

@@ -34,7 +34,8 @@ __url__ = "http://www.freecadweb.org"
__doc__ = "Base class and implementation for Path profile operations."
PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
#PathLog.trackModule(PathLog.thisModule())
# PathLog.trackModule(PathLog.thisModule())
# Qt translation handling
def translate(context, text, disambig=None):
@@ -75,9 +76,22 @@ class ObjectProfile(PathAreaOp.ObjectOp):
else:
obj.setEditorMode('MiterLimit', 2)
self.extraOpOnChanged(obj, prop)
def extraOpOnChanged(self, obj, prop):
'''otherOpOnChanged(obj, porp) ... overwrite to process onChange() events.
Can safely be overwritten by subclasses.'''
pass # pylint: disable=unnecessary-pass
def setOpEditorProperties(self, obj):
'''setOpEditorProperties(obj, porp) ... overwrite to process operation specific changes to properties.
Can safely be overwritten by subclasses.'''
pass # pylint: disable=unnecessary-pass
def areaOpOnDocumentRestored(self, obj):
for prop in ['UseComp', 'JoinType']:
self.areaOpOnChanged(obj, prop)
self.setOpEditorProperties(obj)
def areaOpAreaParams(self, obj, isHole):
'''areaOpAreaParams(obj, isHole) ... returns dictionary with area parameters.
@@ -141,6 +155,7 @@ class ObjectProfile(PathAreaOp.ObjectOp):
obj.JoinType = "Round"
obj.MiterLimit = 0.1
def SetupProperties():
setup = []
setup.append('Side')