From 080ebb187a22aec031780126c67926cb156da421 Mon Sep 17 00:00:00 2001 From: tarman3 Date: Mon, 10 Nov 2025 20:51:32 +0200 Subject: [PATCH] CAM: Path.Geom.cmdsForEdge() - add tolerance --- src/Mod/CAM/Path/Geom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/CAM/Path/Geom.py b/src/Mod/CAM/Path/Geom.py index e86121f93a..c28187c222 100644 --- a/src/Mod/CAM/Path/Geom.py +++ b/src/Mod/CAM/Path/Geom.py @@ -278,7 +278,7 @@ def speedBetweenPoints(p0, p1, hSpeed, vSpeed): return speed -def cmdsForEdge(edge, flip=False, hSpeed=0, vSpeed=0): +def cmdsForEdge(edge, flip=False, hSpeed=0, vSpeed=0, tol=0.01): """cmdsForEdge(edge, flip=False) -> List(Path.Command) Returns a list of Path.Command representing the given edge. If flip is True the edge is considered to be backwards. @@ -347,7 +347,7 @@ def cmdsForEdge(edge, flip=False, hSpeed=0, vSpeed=0): else: # We're dealing with a helix or a more complex shape and it has to get approximated # by a number of straight segments - points = edge.discretize(Deflection=0.01) + points = edge.discretize(Deflection=tol) if flip: points = points[::-1]