diff --git a/src/Mod/Path/Gui/Resources/panels/PageOpPocketFullEdit.ui b/src/Mod/Path/Gui/Resources/panels/PageOpPocketFullEdit.ui
index 00f822df6e..a56bb47570 100644
--- a/src/Mod/Path/Gui/Resources/panels/PageOpPocketFullEdit.ui
+++ b/src/Mod/Path/Gui/Resources/panels/PageOpPocketFullEdit.ui
@@ -131,6 +131,12 @@
<html><head/><body><p>Pattern the tool bit is moved in to clear the material.</p></body></html>
+
+
+
+
+ ZigZag
+
-
ZigZag
@@ -138,7 +144,7 @@
-
- Offset
+ Offset
-
@@ -222,6 +228,37 @@
+ -
+
+
+ Enable Rotation
+
+
+
+ -
+
+
-
+
+ Off
+
+
+ -
+
+ A(x)
+
+
+ -
+
+ B(y)
+
+
+ -
+
+ A & B
+
+
+
+
diff --git a/src/Mod/Path/Gui/Resources/panels/PageOpProfileFullEdit.ui b/src/Mod/Path/Gui/Resources/panels/PageOpProfileFullEdit.ui
index dba10c387d..5a5ca84a85 100644
--- a/src/Mod/Path/Gui/Resources/panels/PageOpProfileFullEdit.ui
+++ b/src/Mod/Path/Gui/Resources/panels/PageOpProfileFullEdit.ui
@@ -56,6 +56,9 @@
-
+
+
+
-
@@ -125,6 +128,37 @@
+ -
+
+
+ Enable Rotation
+
+
+
+ -
+
+
-
+
+ Off
+
+
+ -
+
+ A(x)
+
+
+ -
+
+ B(y)
+
+
+ -
+
+ A & B
+
+
+
+
diff --git a/src/Mod/Path/PathScripts/PathAreaOp.py b/src/Mod/Path/PathScripts/PathAreaOp.py
index 965e5d89e5..559124ec7b 100644
--- a/src/Mod/Path/PathScripts/PathAreaOp.py
+++ b/src/Mod/Path/PathScripts/PathAreaOp.py
@@ -482,14 +482,15 @@ class ObjectOp(PathOp.ObjectOp):
axisOfRot = 'C'
else:
axisOfRot = 'A'
+
# Rotate Model to correct angle
- ppCmds.insert(0, Path.Command('G1', {axisOfRot: angle, 'F': self.axialFeed}))
- ppCmds.insert(0, Path.Command('N100', {}))
+ ppCmds.insert(0, Path.Command('G0', {axisOfRot: angle, 'F': self.axialFeed}))
+ #ppCmds.insert(0, Path.Command('N100', {}))
# Raise cutter to safe depth and return index to starting position
- ppCmds.append(Path.Command('N200', {}))
+ #ppCmds.append(Path.Command('N200', {}))
ppCmds.append(Path.Command('G0', {'Z': obj.SafeHeight.Value, 'F': self.vertRapid}))
- if axis != nextAxis:
+ if 'L' != nextAxis:
ppCmds.append(Path.Command('G0', {axisOfRot: 0.0, 'F': self.axialRapid}))
# Eif
diff --git a/src/Mod/Path/PathScripts/PathCircularHoleBase.py b/src/Mod/Path/PathScripts/PathCircularHoleBase.py
index 986c79d539..eea0deda3b 100644
--- a/src/Mod/Path/PathScripts/PathCircularHoleBase.py
+++ b/src/Mod/Path/PathScripts/PathCircularHoleBase.py
@@ -333,6 +333,7 @@ class ObjectOp(PathOp.ObjectOp):
msg = translate("Path", "Final Depth setting is below the hole bottom for {}.".format(sub)) + ' '
msg += translate("Path", "{} depth is calculated at {} mm".format(sub, round(holeBtm, 4)))
PathLog.warning(msg)
+ finDep = holeBtm
holes.append({'x': pos.x, 'y': pos.y, 'r': self.holeDiameter(obj, base, sub),
'angle': angle, 'axis': axis, 'trgtDep': finDep,
@@ -440,7 +441,7 @@ class ObjectOp(PathOp.ObjectOp):
zlim = 0.0
xRotRad = 0.01
yRotRad = 0.01
- xRotRad = 0.01
+ #xRotRad = 0.01
# Determine boundbox radius based upon xzy limits data
if math.fabs(self.stockBB.ZMin) > math.fabs(self.stockBB.ZMax):
diff --git a/src/Mod/Path/PathScripts/PathDrilling.py b/src/Mod/Path/PathScripts/PathDrilling.py
index 64d5447abe..24fc5422e3 100644
--- a/src/Mod/Path/PathScripts/PathDrilling.py
+++ b/src/Mod/Path/PathScripts/PathDrilling.py
@@ -129,6 +129,7 @@ class ObjectDrilling(PathCircularHoleBase.ObjectOp):
params.update(cmdParams)
if obj.EnableRotation != 'Off':
angle = p['angle']
+ print("X: {}, Y: {}, Z: {}, Angle: {}".format(p['x'], p['y'], p['trgtDep'], angle))
axis = p['axis']
# Rotate model to index for hole
if axis == 'X':
@@ -160,8 +161,10 @@ class ObjectDrilling(PathCircularHoleBase.ObjectOp):
self.commandlist.append(Path.Command('G0', {'X': p['x'], 'Y': p['y'], 'F': self.horizRapid}))
self.commandlist.append(Path.Command('G1', {'Z': p['stkTop'], 'F': self.vertFeed}))
- # Perform and cancel canned drilling cycle
+ # Perform canned drilling cycle
self.commandlist.append(Path.Command(cmd, params))
+
+ # cancel canned drilling cycle
self.commandlist.append(Path.Command('G80'))
self.commandlist.append(Path.Command('G0', {'Z': obj.SafeHeight.Value}))
diff --git a/src/Mod/Path/PathScripts/PathPocketBaseGui.py b/src/Mod/Path/PathScripts/PathPocketBaseGui.py
index 809bff2dc1..81289fcb79 100644
--- a/src/Mod/Path/PathScripts/PathPocketBaseGui.py
+++ b/src/Mod/Path/PathScripts/PathPocketBaseGui.py
@@ -103,6 +103,8 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
obj.StepOver = self.form.stepOverPercent.value()
if obj.OffsetPattern != str(self.form.offsetPattern.currentText()):
obj.OffsetPattern = str(self.form.offsetPattern.currentText())
+ if obj.EnableRotation != str(self.form.enableRotation.currentText()):
+ obj.EnableRotation = str(self.form.enableRotation.currentText())
PathGui.updateInputField(obj, 'ExtraOffset', self.form.extraOffset)
self.updateToolController(obj, self.form.toolController)
@@ -140,6 +142,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
self.selectInComboBox(obj.CutMode, self.form.cutMode)
self.setupToolController(obj, self.form.toolController)
self.setupCoolant(obj, self.form.coolantController)
+ self.selectInComboBox(obj.EnableRotation, self.form.enableRotation)
if FeatureFacing & self.pocketFeatures():
self.selectInComboBox(obj.BoundaryShape, self.form.boundaryShape)
@@ -158,6 +161,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
signals.append(self.form.useOutline.clicked)
signals.append(self.form.minTravel.clicked)
signals.append(self.form.coolantController.currentIndexChanged)
+ signals.append(self.form.enableRotation.currentIndexChanged)
if FeatureFacing & self.pocketFeatures():
signals.append(self.form.boundaryShape.currentIndexChanged)
diff --git a/src/Mod/Path/PathScripts/PathPocketShape.py b/src/Mod/Path/PathScripts/PathPocketShape.py
index f89a613870..93504aed39 100644
--- a/src/Mod/Path/PathScripts/PathPocketShape.py
+++ b/src/Mod/Path/PathScripts/PathPocketShape.py
@@ -43,7 +43,7 @@ __created__ = "2017"
__scriptVersion__ = "2i"
__lastModified__ = "2020-02-13 17:01 CST"
-PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
+PathLog.setLevel(PathLog.Level.DEBUG, PathLog.thisModule())
# PathLog.trackModule(PathLog.thisModule())
@@ -513,6 +513,7 @@ class ObjectPocket(PathPocketBase.ObjectPocket):
if len(self.vert) > 0:
vFinDep = self.vert[0].BoundBox.ZMin
for vFace in self.vert:
+ print("vFinDep: {}".format(vFinDep))
if vFace.BoundBox.ZMin > vFinDep:
vFinDep = vFace.BoundBox.ZMin
# Determine if vertical faces for a loop: Extract planar loop wire as new horizontal face.
@@ -546,9 +547,16 @@ class ObjectPocket(PathPocketBase.ObjectPocket):
# move all horizontal faces to FinalDepth
for f in self.horiz:
- finDep = obj.FinalDepth.Value # max(obj.FinalDepth.Value, f.BoundBox.ZMin)
- f.translate(FreeCAD.Vector(0, 0, finDep - f.BoundBox.ZMin))
-
+ if obj.EnableRotation == 'Off':
+ finDep = obj.FinalDepth.Value # max(obj.FinalDepth.Value, f.BoundBox.ZMin)
+ print("NO_ROT: ObjDep: {}, FinDep: {}, BBmin: {}".format(obj.FinalDepth.Value, finDep, f.BoundBox.ZMin))
+ f.translate(FreeCAD.Vector(0, 0, finDep-f.BoundBox.ZMin))
+ else:
+ finDep = max(obj.FinalDepth.Value, f.BoundBox.ZMin)
+ print("ROT: ObjDep: {}, FinDep: {}, BBmin: {}".format(obj.FinalDepth.Value, finDep, f.BoundBox.ZMin))
+ f.translate(FreeCAD.Vector(0, 0, finDep))
+ obj.FinalDepth.Value = finDep
+
# check all faces and see if they are touching/overlapping and combine those into a compound
self.horizontal = [] # pylint: disable=attribute-defined-outside-init
for shape in PathGeom.combineConnectedShapes(self.horiz):
diff --git a/src/Mod/Path/PathScripts/PathProfileBase.py b/src/Mod/Path/PathScripts/PathProfileBase.py
index b406dd127b..d442cd98ed 100644
--- a/src/Mod/Path/PathScripts/PathProfileBase.py
+++ b/src/Mod/Path/PathScripts/PathProfileBase.py
@@ -3,6 +3,7 @@
# ***************************************************************************
# * *
# * Copyright (c) 2017 sliptonic *
+# * Copyright (c) 2020 Schildkroet *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it under the terms of the GNU Lesser General Public License (LGPL) *
@@ -28,7 +29,7 @@ import PathScripts.PathLog as PathLog
from PySide import QtCore
__title__ = "Base Path Profile Operation"
-__author__ = "sliptonic (Brad Collette)"
+__author__ = "sliptonic (Brad Collette), Schildkroet"
__url__ = "http://www.freecadweb.org"
__doc__ = "Base class and implementation for Path profile operations."
diff --git a/src/Mod/Path/PathScripts/PathProfileBaseGui.py b/src/Mod/Path/PathScripts/PathProfileBaseGui.py
index 22cdcd7699..350bef44fc 100644
--- a/src/Mod/Path/PathScripts/PathProfileBaseGui.py
+++ b/src/Mod/Path/PathScripts/PathProfileBaseGui.py
@@ -78,6 +78,8 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
obj.UseStartPoint = self.form.useStartPoint.isChecked()
if obj.Direction != str(self.form.direction.currentText()):
obj.Direction = str(self.form.direction.currentText())
+ if obj.EnableRotation != str(self.form.enableRotation.currentText()):
+ obj.EnableRotation = str(self.form.enableRotation.currentText())
self.updateToolController(obj, self.form.toolController)
self.updateCoolant(obj, self.form.coolantController)
@@ -103,6 +105,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
self.selectInComboBox(obj.Direction, self.form.direction)
self.setupToolController(obj, self.form.toolController)
self.setupCoolant(obj, self.form.coolantController)
+ self.selectInComboBox(obj.EnableRotation, self.form.enableRotation)
if FeatureSide & self.profileFeatures():
self.selectInComboBox(obj.Side, self.form.cutSide)
@@ -121,6 +124,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
signals.append(self.form.extraOffset.editingFinished)
signals.append(self.form.toolController.currentIndexChanged)
signals.append(self.form.coolantController.currentIndexChanged)
+ signals.append(self.form.enableRotation.currentIndexChanged)
if FeatureSide & self.profileFeatures():
signals.append(self.form.cutSide.currentIndexChanged)
diff --git a/src/Mod/Path/PathScripts/PathProfileFaces.py b/src/Mod/Path/PathScripts/PathProfileFaces.py
index 620a6196e9..a0f644df4f 100644
--- a/src/Mod/Path/PathScripts/PathProfileFaces.py
+++ b/src/Mod/Path/PathScripts/PathProfileFaces.py
@@ -3,6 +3,8 @@
# ***************************************************************************
# * *
# * Copyright (c) 2014 Yorik van Havre *
+# * Copyright (c) 2019 russ4262 (Russell Johnson, russ4262@gmail.com) *
+# * Copyright (c) 2020 Schildkroet *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it under the terms of the GNU Lesser General Public License (LGPL) *
@@ -35,13 +37,9 @@ import numpy
from PySide import QtCore
__title__ = "Path Profile Faces Operation"
-__author__ = "sliptonic (Brad Collette)"
+__author__ = "sliptonic (Brad Collette), russ4262, Schildkroet"
__url__ = "http://www.freecadweb.org"
__doc__ = "Path Profile operation based on faces."
-__contributors__ = "russ4262 (Russell Johnson, russ4262@gmail.com)"
-__created__ = "2014"
-__scriptVersion__ = "2j usable"
-__lastModified__ = "2019-07-25 14:48 CST"
PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
@@ -183,6 +181,8 @@ class ObjectProfile(PathProfileBase.ObjectProfile):
# Raise FinalDepth to lowest face in list on Inside profile ops
finDep = obj.FinalDepth.Value
+ if obj.EnableRotation != 'Off':
+ finDep = faceDepths[0]
strDep = obj.StartDepth.Value
if strDep > stock.Shape.BoundBox.ZMax: