MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / resolve_self_intersection

Function resolve_self_intersection

scripts/svg_to_mesh.py:115–126  ·  view source on GitHub ↗
(wires, logger)

Source from the content-addressed store, hash-verified

113 return wires;
114
115def resolve_self_intersection(wires, logger):
116 if wires.num_vertices == 0:
117 return wires;
118 bbox_min, bbox_max = wires.bbox;
119 tol = norm(bbox_max - bbox_min) / 1000;
120 start_time = time();
121 vertices, edges = pymesh.snap_rounding(wires.vertices, wires.edges, tol);
122 finish_time = time();
123 t = finish_time - start_time;
124 logger.info("Snap rounding running time: {}".format(t));
125 wires.load(vertices, edges);
126 return wires;
127
128def triangulate(wires, engine, stage, eps, logger, wire_file, json_file):
129 if wires.num_vertices == 0:

Callers 1

mainFunction · 0.70

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected