Skip to content

Commit

Permalink
Merge pull request #10033 from jffmichi/fix_flipedge
Browse files Browse the repository at this point in the history
[Path] fix flipEdge not taking into account FirstParameter and LastParameter…
  • Loading branch information
sliptonic committed Aug 21, 2023
2 parents 13284dd + 32e1082 commit 9382255
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mod/Path/Path/Geom.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ def flipEdge(edge):
poles, mults, knots, perio, degree, weights, ratio
)

return Part.Edge(flipped)
return Part.Edge(flipped, ma + mi - edge.LastParameter, ma + mi - edge.FirstParameter)
elif type(edge.Curve) == Part.OffsetCurve:
return edge.reversed()

Expand Down
3 changes: 3 additions & 0 deletions src/Mod/Path/PathTests/TestPathGeom.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,9 @@ def test75(self):
edge = Part.Edge(spline)
self.assertEdgeShapesMatch(edge, Path.Geom.flipEdge(edge))

edge = Part.Edge(spline, 4, 12)
self.assertEdgeShapesMatch(edge, Path.Geom.flipEdge(edge))

edge = Part.Edge(
Part.BSplineCurve(
[
Expand Down

0 comments on commit 9382255

Please sign in to comment.