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

Method edges

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

Source from the content-addressed store, hash-verified

639}
640
641std::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
666std::vector<ConversionResultShape*> ifcopenshell::geometry::CgalShape::facets()
667{

Callers 7

writeMethod · 0.45
writeMethod · 0.45
writeMethod · 0.45
writeMethod · 0.45
writeMethod · 0.45
write_contentMethod · 0.45
DoImportMethod · 0.45

Calls 4

to_polyFunction · 0.85
vertexMethod · 0.80
push_backMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected