| 120 | # ----------------------------------------------------------------------------- |
| 121 | |
| 122 | class Line: |
| 123 | def __init__(self, obj): |
| 124 | ''' Add two point properties ''' |
| 125 | obj.addProperty("App::PropertyVector","p1","Line","Start point", locked=True) |
| 126 | obj.addProperty("App::PropertyVector","p2","Line","End point", locked=True).p2=FreeCAD.Vector(1,0,0) |
| 127 | obj.Proxy = self |
| 128 | |
| 129 | def execute(self, fp): |
| 130 | ''' Print a short message when doing a recomputation, this method is mandatory ''' |
| 131 | fp.Shape = Part.makeLine(fp.p1,fp.p2) |
| 132 | |
| 133 | class ViewProviderLine: |
| 134 | def __init__(self, obj): |