Skip to content

Commit

Permalink
Ammended files based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy-043 committed Sep 3, 2023
1 parent e02cfb2 commit 3cf51de
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/Mod/Draft/draftguitools/gui_arcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ def drawArc(self):
end = math.degrees(self.firstangle + self.angle)
if end < sta:
sta, end = end, sta
sta = sta % 360
end = end % 360
sta %= 360
end %= 360

try:
Gui.addModule("Draft")
Expand Down
17 changes: 10 additions & 7 deletions src/Mod/Draft/draftmake/make_circle.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def make_circle(radius, placement=None, face=None, startangle=None, endangle=Non
Creates a circle object with given parameters.
If startangle and endangle are provided and not equal, the object will show
an arc instead of a full cirle.
Parameters
----------
radius : the radius of the circle.
Expand All @@ -58,14 +61,14 @@ def make_circle(radius, placement=None, face=None, startangle=None, endangle=Non
If face is False, the circle is shown as a wireframe,
otherwise as a face.
startangle : start angle of the arc (in degrees)
startangle : start angle of the circle (in degrees)
Recalculated if not in the -360 to 360 range.
endangle : end angle of the arc (in degrees)
if startangle and endangle are equal, a circle is created,
if they are different an arc is created
endangle : end angle of the circle (in degrees)
Recalculated if not in the -360 to 360 range.
edge : edge.Curve must be a 'Part.Circle'
the circle is created from the given edge
The circle is created from the given edge.
support :
TODO: Describe
Expand Down Expand Up @@ -113,8 +116,8 @@ def make_circle(radius, placement=None, face=None, startangle=None, endangle=Non
else:
obj.Radius = radius
if (startangle is not None) and (endangle is not None):
obj.FirstAngle = startangle % 360
obj.LastAngle = endangle % 360
obj.FirstAngle = math.copysign(abs(startangle) % 360, startangle)
obj.LastAngle = math.copysign(abs(endangle) % 360, endangle)

obj.Support = support

Expand Down

0 comments on commit 3cf51de

Please sign in to comment.