| 639 | } |
| 640 | |
| 641 | std::vector<ConversionResultShape*> ifcopenshell::geometry::CgalShape::edges() |
| 642 | { |
| 643 | // @todo this is ridiculous |
| 644 | to_poly(); |
| 645 | std::vector<ConversionResultShape*> result; |
| 646 | for (auto& ed : shape_->edges()) { |
| 647 | std::vector<cgal_point_t> ps = { |
| 648 | ed.vertex()->point(), |
| 649 | ed.vertex()->point(), |
| 650 | ed.next()->vertex()->point() |
| 651 | }; |
| 652 | |
| 653 | std::vector<std::vector<size_t>> ids(1); |
| 654 | ids.front().push_back(0); |
| 655 | ids.front().push_back(1); |
| 656 | ids.front().push_back(2); |
| 657 | |
| 658 | cgal_shape_t poly; |
| 659 | CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh(ps, ids, poly); |
| 660 | |
| 661 | result.push_back(new CgalShape(poly)); |
| 662 | } |
| 663 | return result; |
| 664 | } |
| 665 | |
| 666 | std::vector<ConversionResultShape*> ifcopenshell::geometry::CgalShape::facets() |
| 667 | { |