CAM: Dressup Boundary - CmdMoveDrill

This commit is contained in:
tarman3
2025-05-28 19:39:50 +03:00
parent bc5616dbf6
commit f5411c9b6d
2 changed files with 7 additions and 2 deletions

View File

@@ -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

View File

@@ -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))