Skip to content

Commit

Permalink
[Draft] Bezcurve fix to display length
Browse files Browse the repository at this point in the history
Added property Length to bezcurve objects.
  • Loading branch information
carlopav authored and yorikvanhavre committed Jul 9, 2019
1 parent 7de89cf commit 4efa7c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Mod/Draft/Draft.py
Expand Up @@ -5297,6 +5297,7 @@ def __init__(self, obj):
obj.addProperty("App::PropertyIntegerList","Continuity","Draft",QT_TRANSLATE_NOOP("App::Property","Continuity"))
obj.addProperty("App::PropertyBool","Closed","Draft",QT_TRANSLATE_NOOP("App::Property","If the Bezier curve should be closed or not"))
obj.addProperty("App::PropertyBool","MakeFace","Draft",QT_TRANSLATE_NOOP("App::Property","Create a face if this curve is closed"))
obj.addProperty("App::PropertyLength","Length","Draft",QT_TRANSLATE_NOOP("App::Property","The length of this object"))
obj.addProperty("App::PropertyArea","Area","Draft",QT_TRANSLATE_NOOP("App::Property","The area of this object"))
obj.MakeFace = getParam("fillmode",True)
obj.Closed = False
Expand Down Expand Up @@ -5369,6 +5370,8 @@ def createGeometry(self,fp):
fp.Shape = w
if hasattr(fp,"Area") and hasattr(w,"Area"):
fp.Area = w.Area
if hasattr(fp,"Length") and hasattr(w,"Length"):
fp.Length = w.Length
fp.Placement = plm

@classmethod
Expand Down

0 comments on commit 4efa7c6

Please sign in to comment.