diff --git a/src/Mod/Path/PathScripts/PathDressupHoldingTags.py b/src/Mod/Path/PathScripts/PathDressupHoldingTags.py index bcd89fbd73..8732910501 100644 --- a/src/Mod/Path/PathScripts/PathDressupHoldingTags.py +++ b/src/Mod/Path/PathScripts/PathDressupHoldingTags.py @@ -380,7 +380,18 @@ class MapWireToTag: debugEdge(e, ">>>>> no flip") break elif PathGeom.pointsCoincide(p2, p0): - outputEdges.append((PathGeom.flipEdge(e), True)) + flipped = PathGeom.flipEdge(e) + if not flipped is None: + outputEdges.append((flipped, True)) + else: + p0 = None + cnt = 0 + for p in reversed(e.discretize(Deflection=0.01)): + if not p0 is None: + outputEdges.append((Part.Edge(Part.LineSegment(p0, p)), True)) + cnt = cnt + 1 + p0 = p + PathLog.info("replaced edge with %d straight segments" % cnt) edges.remove(e) lastP = None p0 = p1 diff --git a/src/Mod/Path/PathScripts/PathGeom.py b/src/Mod/Path/PathScripts/PathGeom.py index 8433f1b437..f79a50adbe 100644 --- a/src/Mod/Path/PathScripts/PathGeom.py +++ b/src/Mod/Path/PathScripts/PathGeom.py @@ -507,6 +507,8 @@ def flipEdge(edge): return Part.Edge(flipped) + PathLog.warning(translate('PathGeom', "%s not support for flipping") % type(edge.Curve)) + def flipWire(wire): '''Flip the entire wire and all its edges so it is being processed the other way around.''' edges = [flipEdge(e) for e in wire.Edges]