Skip to content

Commit 8eb9f4d

Browse files
committed
Updated printing errors
1 parent b7817ca commit 8eb9f4d

File tree

2 files changed

+30
-7
lines changed

2 files changed

+30
-7
lines changed

helpers/direct_triangulation.py

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,25 @@ def displayTriangulation(self, resolved_position):
9797
"color":"#6b92a7"
9898
}
9999
})
100+
for guess in self.guess_list:
101+
self.multi_pipe.send({
102+
"cmd": "connect_points",
103+
"args":{
104+
"pos1":(guess.x, guess.y),
105+
"pos2":(self.res1.x, self.res1.y),
106+
"dashed":True,
107+
"color":"#383c49"
108+
}
109+
})
110+
self.multi_pipe.send({
111+
"cmd": "connect_points",
112+
"args":{
113+
"pos1":(guess.x, guess.y),
114+
"pos2":(self.res2.x, self.res2.y),
115+
"dashed":True,
116+
"color":"#383c49"
117+
}
118+
})
100119

101120
class Cluster:
102121
def __init__(self, title=None, multi_pipe=None):
@@ -152,9 +171,10 @@ def get_radius(self):
152171

153172
# Display the cluster on the UI
154173
def display(self, ghost=False):
155-
# print("cluster display")
174+
print("cluster display")
156175
if self.multi_pipe is None:
157176
return
177+
print("cluster display 2")
158178
if self.pure is False:
159179
self.getRadius()
160180
for p in self._points:
@@ -163,24 +183,27 @@ def display(self, ghost=False):
163183
"args":{
164184
"x": p.x,
165185
"y": p.y,
166-
"r": 2,
186+
"r": 0.2,
167187
"dashed": False,
168188
"outline": "",
169189
"fill":"red"
170190
}
171191
}
172192
if ghost is True:
173-
point_obj['args']['fill'] = "#4678a1"
193+
# point_obj['args']['fill'] = "#4678a1"
194+
point_obj['args']['fill'] = "orange"
195+
print("cluster display send")
174196
self.multi_pipe.send(point_obj)
175197
main_obj = {
176198
"cmd":"draw_circle",
177199
"args":{
178200
"x": self.center.x,
179201
"y": self.center.y,
180202
"r": self.radius,
181-
"dashed": False,
203+
"dashed": True,
182204
"outline": "#383c49",
183-
"fill":""
205+
"fill":"",
206+
"width":1
184207
}
185208
}
186209
if ghost is False:

multi_tri/multi_tri.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def process(self, callback, multi_pipe=None):
147147
dt.triangulate()
148148
target = m1.get_unresolved_node()
149149
target.add_triangulation(dt)
150-
# dt.display()
150+
dt.display()
151151

152152
# Step 5) Parse through each un-resolved node to resolve position (Need either
153153
# 1 direct triangulation object with a single guess, or greater than 1
@@ -181,7 +181,7 @@ def process(self, callback, multi_pipe=None):
181181
# Loop through each key guess
182182
for guess in key_dt.get_guesses():
183183
# Loop through other triangulations
184-
cluster = Cluster()
184+
cluster = Cluster(multi_pipe=self.multi_pipe)
185185
cluster.add_point(guess)
186186
for x in range(1, len(dts)):
187187
# Add the cloest guess from each other triangulation)

0 commit comments

Comments
 (0)