Changeset View
Changeset View
Standalone View
Standalone View
mesh_inset/model.py
| Context not available. | |||||
| vtoe[v].append(eindex) | vtoe[v].append(eindex) | ||||
| else: | else: | ||||
| vtoe[v] = [eindex] | vtoe[v] = [eindex] | ||||
| return (edges, vtoe) | return edges, vtoe | ||||
| def _GetFaceGraph(faces, edges, vtoe, points): | def _GetFaceGraph(faces, edges, vtoe, points): | ||||
| Context not available. | |||||
| face_adj[f].append(g) | face_adj[f].append(g) | ||||
| is_interior_edge[e] = True | is_interior_edge[e] = True | ||||
| # Don't bother with mirror relations, will catch later | # Don't bother with mirror relations, will catch later | ||||
| return (face_adj, is_interior_edge) | return face_adj, is_interior_edge | ||||
| def _FindFaceGraphComponents(faces, face_adj): | def _FindFaceGraphComponents(faces, face_adj): | ||||
| Context not available. | |||||
| """ | """ | ||||
| if not faces: | if not faces: | ||||
| return ([], []) | return [], [] | ||||
| components = [] | components = [] | ||||
| ftoc = [-1] * len(faces) | ftoc = [-1] * len(faces) | ||||
| for i in range(len(faces)): | for i in range(len(faces)): | ||||
| Context not available. | |||||
| comp = [] | comp = [] | ||||
| _FFGCSearch(i, faces, face_adj, ftoc, compi, comp) | _FFGCSearch(i, faces, face_adj, ftoc, compi, comp) | ||||
| components.append(comp) | components.append(comp) | ||||
| return (components, ftoc) | return components, ftoc | ||||
| def _FFGCSearch(findex, faces, face_adj, ftoc, compi, comp): | def _FFGCSearch(findex, faces, face_adj, ftoc, compi, comp): | ||||
| Context not available. | |||||
| pa.poly = [pointmap[v] for v in polyarea.poly] | pa.poly = [pointmap[v] for v in polyarea.poly] | ||||
| pa.holes = [[pointmap[v] for v in hole] for hole in polyarea.holes] | pa.holes = [[pointmap[v] for v in hole] for hole in polyarea.holes] | ||||
| pa.data = polyarea.data | pa.data = polyarea.data | ||||
| return (pa, invrotmat, invpointmap) | return pa, invrotmat, invpointmap | ||||
| def _AddTransformedPolysToModel(mdl, polys, points, poly_data, | def _AddTransformedPolysToModel(mdl, polys, points, poly_data, | ||||
| Context not available. | |||||