| 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); |