Browse Source

first crack at adding edges between new verts

master
Stephen M. McQuay 10 years ago
parent
commit
719bc94e8c
  1. 8
      surf/subd/butterfly.py

8
surf/subd/butterfly.py

@ -1,5 +1,7 @@
from __future__ import division
from itertools import combinations
from surf.geometry import PolygonMesh, Vertex
@ -57,4 +59,10 @@ def refine(mesh):
new_edge = [evid, new_vert_id]
new_edges.append(new_edge)
for fid in range(len(mesh.faces)):
# join all new edge points on a face:
new_edges.extend(
[[i[0] + nv_offset, i[1] + nv_offset]
for i in combinations(mesh.edges_for_face[fid], 2)])
return PolygonMesh(new_verts, new_faces, new_edges)

Loading…
Cancel
Save