| 664 | } |
| 665 | |
| 666 | std::vector<ConversionResultShape*> ifcopenshell::geometry::CgalShape::facets() |
| 667 | { |
| 668 | to_poly(); |
| 669 | std::vector<ConversionResultShape*> result; |
| 670 | for (auto &face : faces(*shape_)) { |
| 671 | std::vector<cgal_point_t> ps; |
| 672 | std::vector<std::vector<size_t>> ids(1); |
| 673 | |
| 674 | auto it = face->facet_begin(); |
| 675 | do { |
| 676 | ps.push_back(it->vertex()->point()); |
| 677 | ids.front().push_back(ids.front().size()); |
| 678 | } while (++it != face->facet_begin()); |
| 679 | |
| 680 | cgal_shape_t poly; |
| 681 | CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh(ps, ids, poly); |
| 682 | |
| 683 | result.push_back(new CgalShape(poly)); |
| 684 | } |
| 685 | return result; |
| 686 | } |
| 687 | |
| 688 | ConversionResultShape* ifcopenshell::geometry::CgalShape::add(ConversionResultShape* other) |
| 689 | { |
no test coverage detected