-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclasses.py
36 lines (34 loc) · 1.16 KB
/
classes.py
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
32
33
34
35
36
class dataPoint():
def __init__(self, location = (0, 0, 0), value = 0, shape = None):
self.location = location
self.value = value
self.shape = shape
def place(self, x, y, z):
self.location = (x, y, z)
def set(self, val):
self.value = val
def setShape(self, shape):
self.shape = shape
class meshPoint():
active = False
def __init__(self, location = (0, 0, 0), shape = None):
self.location = location
self.shape = shape
if self.shape != None:
#print('{} is hiding shape'.format(self))
self.shape.hide()
def place(self, x, y, z):
self.location = (x, y, z)
def setShape(self, shape):
self.shape = shape
if self.shape != None:
#print('{} is hiding shape'.format(self))
self.shape.hide()
def setActive(self, state):
self.active = state
if self.active and self.shape != None:
#print('{} is showing shape'.format(self))
self.shape.show()
elif self.shape != None:
#print('{} is hiding shape'.format(self))
self.shape.hide()