Skip to content

Commit

Permalink
Update make_ellipse.py
Browse files Browse the repository at this point in the history
Draft: Fixed make_ellipse.py: the face argument was not used and therefore "filled mode" did not work in the GUI.
  • Loading branch information
Roy-043 committed Apr 29, 2021
1 parent e2e3806 commit 7841acc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Mod/Draft/draftmake/make_ellipse.py
Expand Up @@ -60,22 +60,28 @@ def make_ellipse(majradius, minradius, placement=None, face=True, support=None):
support :
TODO: Describe.
"""

if not App.ActiveDocument:
App.Console.PrintError("No active document. Aborting\n")
return

obj = App.ActiveDocument.addObject("Part::Part2DObjectPython", "Ellipse")
Ellipse(obj)

if minradius > majradius:
majradius, minradius = minradius, majradius
obj.MajorRadius = majradius
obj.MinorRadius = minradius
obj.Support = support

if face != None:
obj.MakeFace = face

if placement:
obj.Placement = placement

if App.GuiUp:
ViewProviderDraft(obj.ViewObject)
#if not face:
# obj.ViewObject.DisplayMode = "Wireframe"
gui_utils.format_object(obj)
gui_utils.select(obj)

Expand Down

0 comments on commit 7841acc

Please sign in to comment.