Коммит 91285db7 создал по автору Ilya Portnov's avatar Ilya Portnov
Просмотр файлов

Remove unused code from the node.

владелец b2cb5a72
......@@ -40,52 +40,6 @@ if scipy is None or FreeCAD is None:
if FreeCAD is not None:
import Part
def mesh_from_faces(fragments):
verts = [(v.X, v.Y, v.Z) for v in fragments.Vertexes]
all_fc_verts = {SvSolidTopology.Item(v) : i for i, v in enumerate(fragments.Vertexes)}
def find_vertex(v):
#for i, fc_vert in enumerate(fragments.Vertexes):
# if v.isSame(fc_vert):
# return i
#return None
return all_fc_verts[SvSolidTopology.Item(v)]
edges = []
for fc_edge in fragments.Edges:
edge = [find_vertex(v) for v in fc_edge.Vertexes]
if len(edge) == 2:
edges.append(edge)
faces = []
for fc_face in fragments.Faces:
incident_verts = defaultdict(set)
for fc_edge in fc_face.Edges:
edge = [find_vertex(v) for v in fc_edge.Vertexes]
if len(edge) == 2:
i, j = edge
incident_verts[i].add(j)
incident_verts[j].add(i)
face = [find_vertex(v) for v in fc_face.Vertexes]
vert_idx = face[0]
correct_face = [vert_idx]
for i in range(len(face)):
incident = list(incident_verts[vert_idx])
other_verts = [i for i in incident if i not in correct_face]
if not other_verts:
break
other_vert_idx = other_verts[0]
correct_face.append(other_vert_idx)
vert_idx = other_vert_idx
if len(correct_face) > 2:
faces.append(correct_face)
return verts, edges, faces
class SvVoronoiOnSolidNode(bpy.types.Node, SverchCustomTreeNode):
"""
Triggers: Voronoi Solid
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать