Skip to content

Commit

Permalink
Draft: fix gui_offset.py wrong ghost if start angle of arc is larger
Browse files Browse the repository at this point in the history
The ghost of an arc with a start angle that is larger than the end angle would be wrong.
  • Loading branch information
Roy-043 authored and berndhahnebach committed Jul 31, 2021
1 parent ed94be6 commit 03a1b9b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Mod/Draft/draftguitools/gui_offset.py
Expand Up @@ -110,7 +110,10 @@ def proceed(self):
self.mode = "Circle"
self.center = self.shape.Edges[0].Curve.Center
self.ghost.setCenter(self.center)
self.ghost.setStartAngle(math.radians(self.sel.FirstAngle))
if self.sel.FirstAngle <= self.sel.LastAngle:
self.ghost.setStartAngle(math.radians(self.sel.FirstAngle))
else:
self.ghost.setStartAngle(math.radians(self.sel.FirstAngle) - 2 * math.pi)
self.ghost.setEndAngle(math.radians(self.sel.LastAngle))
elif utils.getType(self.sel) == "BSpline":
self.ghost = trackers.bsplineTracker(points=self.sel.Points)
Expand Down

0 comments on commit 03a1b9b

Please sign in to comment.