Path: added a hidden property to store the areaparams
Useful for debugging.
This commit is contained in:
committed by
Yorik van Havre
parent
b5e233d3aa
commit
aeec1c8c88
@@ -83,6 +83,10 @@ class ObjectContour:
|
||||
|
||||
obj.addProperty("App::PropertyDistance", "OffsetExtra", "Contour", QtCore.QT_TRANSLATE_NOOP("App::Property", "Extra value to stay away from final Contour- good for roughing toolpath"))
|
||||
|
||||
# Debug Parameters
|
||||
obj.addProperty("App::PropertyString", "AreaParams", "Debug", QtCore.QT_TRANSLATE_NOOP("App::Property", "parameters used by PathArea"))
|
||||
obj.setEditorMode('AreaParams', 2) # hide
|
||||
|
||||
obj.Proxy = self
|
||||
self.endVector = None
|
||||
|
||||
@@ -147,6 +151,8 @@ class ObjectContour:
|
||||
|
||||
PathLog.debug('depths: {}'.format(depthparams.get_depths()))
|
||||
profile.setParams(**profileparams)
|
||||
obj.AreaParams = str(profile.getParams())
|
||||
|
||||
PathLog.debug("Contour with params: {}".format(profile.getParams()))
|
||||
sections = profile.makeSections(mode=0, project=True, heights=depthparams.get_depths())
|
||||
shapelist = [sec.getShape() for sec in sections]
|
||||
|
||||
@@ -89,6 +89,10 @@ class ObjectFace:
|
||||
obj.addProperty("App::PropertyVector", "StartPoint", "Start Point", QtCore.QT_TRANSLATE_NOOP("App::Property", "The start point of this path"))
|
||||
obj.addProperty("App::PropertyBool", "UseStartPoint", "Start Point", QtCore.QT_TRANSLATE_NOOP("App::Property", "make True, if specifying a Start Point"))
|
||||
|
||||
# Debug Parameters
|
||||
obj.addProperty("App::PropertyString", "AreaParams", "Debug", QtCore.QT_TRANSLATE_NOOP("App::Property", "parameters used by PathArea"))
|
||||
obj.setEditorMode('AreaParams', 2) # hide
|
||||
|
||||
obj.Proxy = self
|
||||
|
||||
def onChanged(self, obj, prop):
|
||||
@@ -189,6 +193,7 @@ class ObjectFace:
|
||||
user_depths=None)
|
||||
|
||||
boundary.setParams(**pocketparams)
|
||||
obj.AreaParams = str(boundary.getParams())
|
||||
sections = boundary.makeSections(mode=0, project=False, heights=depthparams.get_depths())
|
||||
shapelist = [sec.getShape() for sec in sections]
|
||||
|
||||
|
||||
@@ -81,6 +81,10 @@ class ObjectPocket:
|
||||
obj.addProperty("App::PropertyVector", "StartPoint", "Start Point", QtCore.QT_TRANSLATE_NOOP("App::Property", "The start point of this path"))
|
||||
obj.addProperty("App::PropertyBool", "UseStartPoint", "Start Point", QtCore.QT_TRANSLATE_NOOP("App::Property", "make True, if specifying a Start Point"))
|
||||
|
||||
# Debug Parameters
|
||||
obj.addProperty("App::PropertyString", "AreaParams", "Debug", QtCore.QT_TRANSLATE_NOOP("App::Property", "parameters used by PathArea"))
|
||||
obj.setEditorMode('AreaParams', 2) # hide
|
||||
|
||||
obj.Proxy = self
|
||||
|
||||
def onChanged(self, obj, prop):
|
||||
@@ -185,6 +189,7 @@ class ObjectPocket:
|
||||
pocketparams['PocketMode'] = Pattern.index(obj.OffsetPattern) + 1
|
||||
|
||||
pocket.setParams(**pocketparams)
|
||||
obj.AreaParams = str(pocket.getParams())
|
||||
PathLog.debug("Pocketing with params: {}".format(pocket.getParams()))
|
||||
|
||||
depthparams = depth_params(
|
||||
|
||||
@@ -85,6 +85,10 @@ class ObjectProfile:
|
||||
obj.addProperty("App::PropertyBool", "processPerimeter", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property", "Profile the outline"))
|
||||
obj.addProperty("App::PropertyBool", "processCircles", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property", "Profile round holes"))
|
||||
|
||||
# Debug Parameters
|
||||
obj.addProperty("App::PropertyString", "AreaParams", "Debug", QtCore.QT_TRANSLATE_NOOP("App::Property", "parameters used by PathArea"))
|
||||
obj.setEditorMode('AreaParams', 2) # hide
|
||||
|
||||
obj.Proxy = self
|
||||
|
||||
def __getstate__(self):
|
||||
@@ -164,6 +168,8 @@ class ObjectProfile:
|
||||
profileparams['Offset'] = offsetval
|
||||
|
||||
profile.setParams(**profileparams)
|
||||
obj.AreaParams = str(profile.getParams())
|
||||
|
||||
# PathLog.debug("About to profile with params: {}".format(profileparams))
|
||||
PathLog.debug("About to profile with params: {}".format(profile.getParams()))
|
||||
|
||||
|
||||
@@ -84,6 +84,10 @@ class ObjectProfile:
|
||||
|
||||
obj.addProperty("App::PropertyDistance", "OffsetExtra", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property", "Extra value to stay away from final profile- good for roughing toolpath"))
|
||||
|
||||
# Debug Parameters
|
||||
obj.addProperty("App::PropertyString", "AreaParams", "Debug", QtCore.QT_TRANSLATE_NOOP("App::Property", "parameters used by PathArea"))
|
||||
obj.setEditorMode('AreaParams', 2) # hide
|
||||
|
||||
obj.Proxy = self
|
||||
|
||||
def __getstate__(self):
|
||||
@@ -155,6 +159,8 @@ class ObjectProfile:
|
||||
|
||||
profile.setParams(**profileparams)
|
||||
# PathLog.debug("About to profile with params: {}".format(profileparams))
|
||||
obj.AreaParams = str(profile.getParams())
|
||||
|
||||
PathLog.debug("About to profile with params: {}".format(profile.getParams()))
|
||||
|
||||
depthparams = depth_params(
|
||||
|
||||
Reference in New Issue
Block a user