diff --git a/src/Mod/CAM/Gui/Resources/Path.qrc b/src/Mod/CAM/Gui/Resources/Path.qrc
index 164f44a755..964f76bf09 100644
--- a/src/Mod/CAM/Gui/Resources/Path.qrc
+++ b/src/Mod/CAM/Gui/Resources/Path.qrc
@@ -51,6 +51,7 @@
icons/CAM_Simulator.svg
icons/CAM_SimulatorGL.svg
icons/CAM_Slot.svg
+ icons/CAM_StartPoint.svg
icons/CAM_Stop.svg
icons/CAM_Tapping.svg
icons/CAM_ThreadMilling.svg
diff --git a/src/Mod/CAM/Gui/Resources/icons/CAM_StartPoint.svg b/src/Mod/CAM/Gui/Resources/icons/CAM_StartPoint.svg
new file mode 100644
index 0000000000..b65295a12d
--- /dev/null
+++ b/src/Mod/CAM/Gui/Resources/icons/CAM_StartPoint.svg
@@ -0,0 +1,189 @@
+
+
+
+
diff --git a/src/Mod/CAM/InitGui.py b/src/Mod/CAM/InitGui.py
index 570df75b36..7b93f8767e 100644
--- a/src/Mod/CAM/InitGui.py
+++ b/src/Mod/CAM/InitGui.py
@@ -320,6 +320,8 @@ class CAMWorkbench(Workbench):
menuAppended = True
if isinstance(obj.Proxy, Path.Op.Base.ObjectOp):
self.appendContextMenu("", ["CAM_OperationCopy", "CAM_OpActiveToggle"])
+ if hasattr(obj, "StartPoint"):
+ self.appendContextMenu("", ["CAM_SetStartPoint"])
menuAppended = True
if obj.isDerivedFrom("Path::Feature"):
if (
diff --git a/src/Mod/CAM/Path/Op/Gui/Base.py b/src/Mod/CAM/Path/Op/Gui/Base.py
index bbd76cf8d9..ce2586cc0f 100644
--- a/src/Mod/CAM/Path/Op/Gui/Base.py
+++ b/src/Mod/CAM/Path/Op/Gui/Base.py
@@ -1306,12 +1306,18 @@ class CommandSetStartPoint:
return obj and hasattr(obj, "StartPoint")
def setpoint(self, point, o):
- obj = FreeCADGui.Selection.getSelection()[0]
+ FreeCADGui.Snapper.grid.off()
+ obj = self.obj
obj.StartPoint.x = point.x
obj.StartPoint.y = point.y
obj.StartPoint.z = obj.ClearanceHeight.Value
+ obj.UseStartPoint = True
+ obj.recompute()
+ textPoint = f"{obj.StartPoint.x:.2f}, {obj.StartPoint.y:.2f}, {obj.StartPoint.z:.2f}"
+ print(f"Set start point for operation {obj.Label} >>> {textPoint}")
def Activated(self):
+ self.obj = FreeCADGui.Selection.getSelection()[0]
if not hasattr(FreeCADGui, "Snapper"):
import DraftTools
FreeCADGui.Snapper.getPoint(callback=self.setpoint)