Merge branch 'master' of https://github.com/FreeCAD/FreeCAD into leadinout_gui
This commit is contained in:
@@ -395,6 +395,7 @@ def Execute(op,obj):
|
||||
"operationType": obj.OperationType,
|
||||
"side": obj.Side,
|
||||
"forceInsideOut" : obj.ForceInsideOut,
|
||||
"finishingProfile" : obj.FinishingProfile,
|
||||
"keepToolDownRatio": keepToolDownRatio,
|
||||
"stockToLeave": float(obj.StockToLeave)
|
||||
}
|
||||
@@ -433,6 +434,7 @@ def Execute(op,obj):
|
||||
a2d.stockToLeave =float(obj.StockToLeave)
|
||||
a2d.tolerance = float(obj.Tolerance)
|
||||
a2d.forceInsideOut = obj.ForceInsideOut
|
||||
a2d.finishingProfile = obj.FinishingProfile
|
||||
a2d.opType = opType
|
||||
|
||||
# EXECUTE
|
||||
@@ -489,6 +491,7 @@ class PathAdaptive(PathOp.ObjectOp):
|
||||
# obj.addProperty("App::PropertyBool", "ProcessHoles", "Adaptive","Process holes as well as the face outline")
|
||||
|
||||
obj.addProperty("App::PropertyBool", "ForceInsideOut", "Adaptive","Force plunging into material inside and clearing towards the edges")
|
||||
obj.addProperty("App::PropertyBool", "FinishingProfile", "Adaptive","To take a finishing profile path at the end")
|
||||
obj.addProperty("App::PropertyBool", "Stopped",
|
||||
"Adaptive", "Stop processing")
|
||||
obj.setEditorMode('Stopped', 2) #hide this property
|
||||
@@ -517,6 +520,7 @@ class PathAdaptive(PathOp.ObjectOp):
|
||||
obj.LiftDistance=0
|
||||
# obj.ProcessHoles = True
|
||||
obj.ForceInsideOut = False
|
||||
obj.FinishingProfile = True
|
||||
obj.Stopped = False
|
||||
obj.StopProcessing = False
|
||||
obj.HelixAngle = 5
|
||||
|
||||
@@ -126,6 +126,11 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
|
||||
form.ForceInsideOut.setChecked(True)
|
||||
formLayout.addRow(QtGui.QLabel("Force Clearing Inside-Out"), form.ForceInsideOut)
|
||||
|
||||
# Finishing profile
|
||||
form.FinishingProfile = QtGui.QCheckBox()
|
||||
form.FinishingProfile.setChecked(True)
|
||||
formLayout.addRow(QtGui.QLabel("Finishing Profile"), form.FinishingProfile)
|
||||
|
||||
layout.addLayout(formLayout)
|
||||
|
||||
# stop button
|
||||
@@ -154,6 +159,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
|
||||
|
||||
# signals.append(self.form.ProcessHoles.stateChanged)
|
||||
signals.append(self.form.ForceInsideOut.stateChanged)
|
||||
signals.append(self.form.FinishingProfile.stateChanged)
|
||||
signals.append(self.form.StopButton.toggled)
|
||||
return signals
|
||||
|
||||
@@ -173,6 +179,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
|
||||
|
||||
# self.form.ProcessHoles.setChecked(obj.ProcessHoles)
|
||||
self.form.ForceInsideOut.setChecked(obj.ForceInsideOut)
|
||||
self.form.FinishingProfile.setChecked(obj.FinishingProfile)
|
||||
self.setupToolController(obj, self.form.ToolController)
|
||||
self.setupCoolant(obj, self.form.coolantController)
|
||||
self.form.StopButton.setChecked(obj.Stopped)
|
||||
@@ -201,6 +208,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
|
||||
obj.StockToLeave = self.form.StockToLeave.value()
|
||||
|
||||
obj.ForceInsideOut = self.form.ForceInsideOut.isChecked()
|
||||
obj.FinishingProfile = self.form.FinishingProfile.isChecked()
|
||||
obj.Stopped = self.form.StopButton.isChecked()
|
||||
if(obj.Stopped):
|
||||
self.form.StopButton.setChecked(False) # reset the button
|
||||
|
||||
@@ -78,7 +78,7 @@ class ViewProvider(object):
|
||||
# pylint: disable=unused-argument
|
||||
if 0 == mode:
|
||||
self._onEditCallback(True)
|
||||
return True
|
||||
return False
|
||||
|
||||
def unsetEdit(self, arg1, arg2):
|
||||
# pylint: disable=unused-argument
|
||||
|
||||
@@ -212,9 +212,12 @@ class TaskPanelPage(object):
|
||||
self.parent = None
|
||||
self.panelTitle = 'Operation'
|
||||
|
||||
if hasattr(self.form, 'toolController'):
|
||||
if self._installTCUpdate():
|
||||
PathJob.Notification.updateTC.connect(self.resetToolController)
|
||||
|
||||
def _installTCUpdate(self):
|
||||
return hasattr(self.form, 'toolController')
|
||||
|
||||
def setParent(self, parent):
|
||||
'''setParent() ... used to transfer parent object link to child class.
|
||||
Do not overwrite.'''
|
||||
@@ -250,6 +253,8 @@ class TaskPanelPage(object):
|
||||
def pageCleanup(self):
|
||||
'''pageCleanup() ... internal callback.
|
||||
Do not overwrite, implement cleanupPage(obj) instead.'''
|
||||
if self._installTCUpdate():
|
||||
PathJob.Notification.updateTC.disconnect(self.resetToolController)
|
||||
self.cleanupPage(self.obj)
|
||||
|
||||
def pageRegisterSignalHandlers(self):
|
||||
|
||||
@@ -792,7 +792,7 @@ class ObjectSlot(PathOp.ObjectOp):
|
||||
flag = 1
|
||||
eCnt = len(shape.Edges)
|
||||
lstE = eCnt - 1
|
||||
for i in range(0, eCnt): # populate empty parrallel edge flag list
|
||||
for i in range(0, eCnt): # populate empty parallel edge flag list
|
||||
parallel_edge_flags.append(0)
|
||||
for i in range(0, eCnt): # Cycle through edges to identify parallel pairs
|
||||
if i < lstE:
|
||||
@@ -1075,7 +1075,7 @@ class ObjectSlot(PathOp.ObjectOp):
|
||||
|
||||
def _normalizeVector(self, v):
|
||||
"""_normalizeVector(v)...
|
||||
Returns a copy of the vector recieved with values rounded to 10 decimal places."""
|
||||
Returns a copy of the vector received with values rounded to 10 decimal places."""
|
||||
posTol = 0.0000000001
|
||||
negTol = -1 * posTol
|
||||
V = FreeCAD.Vector(v.x, v.y, v.z)
|
||||
@@ -1220,7 +1220,7 @@ class ObjectSlot(PathOp.ObjectOp):
|
||||
def _extendArcSlot(self, p1, p2, cent, begExt, endExt):
|
||||
"""_extendArcSlot(p1, p2, cent, begExt, endExt)...
|
||||
This function extends an arc defined by two end points, p1 and p2, and the center.
|
||||
The arc is extended along the circumferance with begExt and endExt values.
|
||||
The arc is extended along the circumference with begExt and endExt values.
|
||||
The function returns the new end points as tuple (n1, n2) to replace p1 and p2."""
|
||||
cancel = True
|
||||
n1 = p1
|
||||
|
||||
@@ -169,7 +169,11 @@ def export(objectslist, filename, argstring):
|
||||
# Write the preamble
|
||||
if OUTPUT_COMMENTS:
|
||||
for item in objectslist:
|
||||
if isinstance(item.Proxy, PathScripts.PathToolController.ToolController):
|
||||
if hasattr(item, "Proxy"):
|
||||
itm_trgt = item.Proxy
|
||||
else:
|
||||
itm_trgt = item
|
||||
if isinstance(itm_trgt, PathScripts.PathToolController.ToolController):
|
||||
gcode += ";T{}={}\n".format(item.ToolNumber, item.Name)
|
||||
gcode += linenumber() + ";begin preamble\n"
|
||||
for line in PREAMBLE.splitlines(True):
|
||||
|
||||
@@ -490,8 +490,8 @@ def HEIDEN_End(ActualJob): #use Label for program name
|
||||
program_id = "NEW"
|
||||
return "END PGM " + program_id + " " + UNITS
|
||||
|
||||
#def HEIDEN_ToolDef(tool_id, tool_lenght, tool_radius): # old machines don't have tool table, need tooldef list
|
||||
# return "TOOL DEF " + tool_id + " R" + "{:.3f}".format(tool_lenght) + " L" + "{:.3f}".format(tool_radius)
|
||||
#def HEIDEN_ToolDef(tool_id, tool_length, tool_radius): # old machines don't have tool table, need tooldef list
|
||||
# return "TOOL DEF " + tool_id + " R" + "{:.3f}".format(tool_length) + " L" + "{:.3f}".format(tool_radius)
|
||||
|
||||
def HEIDEN_ToolCall(tool_Params):
|
||||
global MACHINE_SPINDLE_DIRECTION
|
||||
|
||||
Reference in New Issue
Block a user