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

Method facets

src/ifcgeom/kernels/cgal/CgalConversionResult.cpp:666–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

664}
665
666std::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
688ConversionResultShape* ifcopenshell::geometry::CgalShape::add(ConversionResultShape* other)
689{

Callers 2

extract_geometryMethod · 0.45
remove_narrowMethod · 0.45

Calls 4

to_polyFunction · 0.85
push_backMethod · 0.80
vertexMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected