MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / merge

Method merge

src/svgfill/src/svgfill.cpp:498–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496 }
497
498 void merge(const std::vector<int>& edge_indices) {
499 if (edge_indices.empty()) {
500 return;
501 }
502
503 std::list<Halfedge_handle> to_remove;
504 auto eit = edge_indices.begin();
505 size_t n = 0;
506 for (auto it = arr.edges_begin(); it != arr.edges_end(); ++it, ++n) {
507 if (n == *eit) {
508 ++eit;
509 to_remove.push_back(it);
510 if (eit == edge_indices.end()) {
511 break;
512 }
513 }
514 }
515
516 for (auto& h : to_remove) {
517 /*
518 auto v0 = h->source()->point();
519 std::cout << CGAL::to_double(v0.cartesian(0)) << " " << CGAL::to_double(v0.cartesian(1)) << std::endl;
520 auto v1 = h->target()->point();
521 std::cout << CGAL::to_double(v1.cartesian(0)) << " " << CGAL::to_double(v1.cartesian(1)) << std::endl << std::endl;
522 */
523 arr.remove_edge(h);
524 }
525 }
526
527 size_t num_edges() {
528 return arr.number_of_edges();

Callers

nothing calls this directly

Calls 7

edges_beginMethod · 0.80
edges_endMethod · 0.80
push_backMethod · 0.80
remove_edgeMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected