diff --git a/src/Mod/CAM/Path/Dressup/Boundary.py b/src/Mod/CAM/Path/Dressup/Boundary.py index 6138e2c4dd..e3ad7438b9 100644 --- a/src/Mod/CAM/Path/Dressup/Boundary.py +++ b/src/Mod/CAM/Path/Dressup/Boundary.py @@ -210,7 +210,12 @@ class PathBoundary: if bogusY: bogusY = "Y" not in cmd.Parameters edge = Path.Geom.edgeForCmd(cmd, pos) - if edge: + if edge and cmd.Name in Path.Geom.CmdMoveDrill: + inside = edge.common(self.boundary).Edges + outside = edge.cut(self.boundary).Edges + if 1 == len(inside) and 0 == len(outside): + commands.append(cmd) + if edge and not cmd.Name in Path.Geom.CmdMoveDrill: inside = edge.common(self.boundary).Edges outside = edge.cut(self.boundary).Edges if not self.inside: # UI "inside boundary" param diff --git a/src/Mod/CAM/Path/Geom.py b/src/Mod/CAM/Path/Geom.py index 356faf1ad9..d625fd00d6 100644 --- a/src/Mod/CAM/Path/Geom.py +++ b/src/Mod/CAM/Path/Geom.py @@ -391,7 +391,7 @@ def edgeForCmd(cmd, startPoint): Path.Log.debug("startpoint {}".format(startPoint)) endPoint = commandEndPoint(cmd, startPoint) - if (cmd.Name in CmdMoveStraight) or (cmd.Name in CmdMoveRapid): + if (cmd.Name in CmdMoveStraight) or (cmd.Name in CmdMoveRapid) or (cmd.Name in CmdMoveDrill): if pointsCoincide(startPoint, endPoint): return None return Part.Edge(Part.LineSegment(startPoint, endPoint))