def scc_from_c_2d(c_2d, other_sv): scc = SuperVertex(u=c_2d[0], v=c_2d[1]) scc.face = other_sv.face scc.face_id = other_sv.face_id scc.project_to_XYZ() return scc
def insert_inner_vertex(scdt, c): vertices, _, _ = scdt assert len(vertices) > 0 svc = SuperVertex(x=c[0], y=c[1], z=c[2]) svc.face_id = vertices[0].face_id svc.face = vertices[0].face svc.project_to_UV() vertices.append(svc) return
def insert_halfway_vertex_of_edge(scdt, edge_vertex_indices): vertices, _, _ = scdt assert len(vertices) > 0 ev0, ev1 = edge_vertex_indices sv0 = vertices[ev0] sv1 = vertices[ev1] p0 = sv0.UV_vec2() p1 = sv1.UV_vec2() p01 = p1 - p0 hw = p0 + (p01 / 2) svhw = SuperVertex(u=hw[0], v=hw[1]) svhw.face = sv0.face svhw.face_id = sv0.face_id svhw.project_to_XYZ() vertices.append(svhw) return