add midpoint to Line (pt 2)
This commit is contained in:
parent
999a4da50d
commit
979bf7ee47
4
Line.py
4
Line.py
@ -9,10 +9,12 @@ class Line(Shape):
|
|||||||
return len(self.vars)
|
return len(self.vars)
|
||||||
|
|
||||||
def nPts(self):
|
def nPts(self):
|
||||||
return 2
|
return 3
|
||||||
|
|
||||||
def toEqu(self, ptNum):
|
def toEqu(self, ptNum):
|
||||||
if ptNum == 0:
|
if ptNum == 0:
|
||||||
return ([1, 0, 0, 0], [0, 1, 0, 0])
|
return ([1, 0, 0, 0], [0, 1, 0, 0])
|
||||||
elif ptNum == 1:
|
elif ptNum == 1:
|
||||||
return ([0, 0, 1, 0], [0, 0, 0, 1])
|
return ([0, 0, 1, 0], [0, 0, 0, 1])
|
||||||
|
elif ptNum == 2:
|
||||||
|
return ([0.5, 0, 0.5, 0], [0, 0.5, 0, 0.5])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user