-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathPointDrawing.py
More file actions
31 lines (22 loc) · 807 Bytes
/
PointDrawing.py
File metadata and controls
31 lines (22 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import cad
from Drawing import Drawing
class PointDrawing(Drawing):
def __init__(self):
Drawing.__init__(self)
def GetTitle(self):
return "Point drawing"
def number_of_steps(self):
return 1
def is_an_add_level(self, level):
return True
def calculate_item(self, end):
if end.type == cad.DigitizeType.DIGITIZE_NO_ITEM_TYPE:
return False
if (self.TempObject() != None) and (self.TempObject().GetType() != cad.OBJECT_TYPE_POINT):
self.ClearObjectsMade()
if self.TempObject() == None:
self.AddToTempObjects(cad.NewPoint(end.point))
else:
self.TempObject().SetStartPoint(end.point)
return True
point_drawing = PointDrawing()