Draft: fix gui_offset.py wrong ghost if start angle of arc is larger

The ghost of an arc with a start angle that is larger than the end angle would be wrong.
This commit is contained in:
Roy-043
2021-07-05 10:17:10 +02:00
committed by Bernd Hahnebach
parent f2b7d863af
commit 20aaecf4f3

View File

@@ -110,7 +110,10 @@ class Offset(gui_base_original.Modifier):
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)