started adding edge connectivity
This commit is contained in:
parent
6b21fd80cb
commit
dee1889d81
@ -1,7 +1,5 @@
|
||||
from __future__ import division
|
||||
|
||||
import sys
|
||||
|
||||
from surf.geometry import PolygonMesh, Vertex
|
||||
|
||||
|
||||
@ -42,6 +40,7 @@ def _make_edge_point(mesh, eid):
|
||||
|
||||
def refine(mesh):
|
||||
new_verts = list(mesh.vertices)
|
||||
nv_offset = len(new_verts)
|
||||
|
||||
# TODO:
|
||||
new_faces = []
|
||||
@ -52,4 +51,10 @@ def refine(mesh):
|
||||
new_vert = _make_edge_point(mesh, eid)
|
||||
new_verts.append(new_vert)
|
||||
|
||||
# populate *some* of the new edges (missing all edges on a face ...)
|
||||
new_vert_id = eid + nv_offset
|
||||
for evid in mesh.edges[eid]:
|
||||
new_edge = [evid, new_vert_id]
|
||||
new_edges.append(new_edge)
|
||||
|
||||
return PolygonMesh(new_verts, new_faces, new_edges)
|
||||
|
Loading…
Reference in New Issue
Block a user