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

Function path_to_loop

tools/Boolean/Clipper/ClipperEngine.cpp:94–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 }
93
94 Loop path_to_loop(const ClipperLib::Path& path,
95 std::list<Vector2F>& vertices) {
96 const size_t base_index = vertices.size();
97 const size_t num_segments = path.size();
98 for (auto p : path) {
99 Vector2F v = PointConvert::int_point_to_point(p);
100 vertices.push_back(v);
101 }
102
103 Loop loop;
104 for (size_t i=0; i<num_segments; i++) {
105 loop.push_back(i + base_index);
106 }
107 return loop;
108 }
109
110 void remove_duplicated_vertices(MatrixFr& vertices, MatrixIr& segments) {
111 DuplicatedVertexRemoval remover(vertices, segments);

Callers 1

extract_resultMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected