62 |
self.dir = dir |
self.dir = dir |
63 |
self.ind = 0 |
self.ind = 0 |
64 |
self.angles = [0.2 * 2*math.pi, 0.4 * 2*math.pi] |
self.angles = [0.2 * 2*math.pi, 0.4 * 2*math.pi] |
65 |
def addBuoy(self, anchorX, anchorY, importance, key, buoy, w, h): |
def addBuoy(self, anchorX, anchorY, importance, key, w, h): |
66 |
size = importance |
size = importance |
67 |
|
|
68 |
# 1. find the buoy point |
# 1. find the buoy point |
90 |
# ac = vs.coords.coordsys(0, str(key)+"_5", 10, anchorX, anchorY, 0, 0) |
# ac = vs.coords.coordsys(0, str(key)+"_5", 10, anchorX, anchorY, 0, 0) |
91 |
# bc = vs.coords.coordsys(0, str(key)+"_6", 10, b[0], b[1], 0, 0) |
# bc = vs.coords.coordsys(0, str(key)+"_6", 10, b[0], b[1], 0, 0) |
92 |
# vs.map.put(self.linecon, ac, bc) |
# vs.map.put(self.linecon, ac, bc) |
93 |
def addCentralBuoy(self, key, buoy): |
def addCentralBuoy(self, key): |
|
|
|
94 |
b = self.c |
b = self.c |
95 |
size = 1 |
size = 1 |
96 |
vs = self.vs |
vs = self.vs |
97 |
transaffine(vs, str(key)+"_1", b[0], b[1], size, 0, 0, size) |
cs = vs.coords.affineCoordsys(0, 100, b[0], b[1], size, 0, 0, size) |
98 |
rotate(vs, str(key)+"_2", 0, 0, 0, 1) |
vs.matcher.add(cs, str(key)+"_1") |
99 |
buoy.run() |
|
100 |
poptrans(vs, str(key)+"_2") |
cs2 = vs.coords.rotateXY(cs, 0) |
101 |
poptrans(vs, str(key)+"_1") |
vs.matcher.add(cs2, str(key)+"_2") |
102 |
|
return cs2 |
103 |
|
|
104 |
|
|
105 |
|
|