Code: Select all
181 # separate lone edges
182 shapes = []
183 for edge in shape.Edges:
184 found = False
185 for solid in shape.Solids:
186 if found:
187 break
188 for soledge in solid.Edges:
189 if found:
190 break
191 if edge.hashCode() == soledge.hashCode():
192 found = True
193 break
194 else:
195 shapes.append(edge)
Code: Select all
shapes = []
for edge in shape.Edges:
found = False
for solid in shape.Solids:
if found:
break
for soledge in solid.Edges:
if edge.hashCode() == soledge.hashCode():
found = True
break
if found: # Added so that if the edge was found by the above search, we stop looking
break
else:
# Now this only happens if the search never terminates (e.g. if the edge was never found)
shapes.append(edge)