Implement num_faces

This commit is contained in:
Thomas Krijnen
2023-12-11 20:57:58 +01:00
parent 5c4cc81f6f
commit cac2b77659
@@ -234,8 +234,16 @@ int ifcopenshell::geometry::CgalShape::num_edges() const
int ifcopenshell::geometry::CgalShape::num_faces() const int ifcopenshell::geometry::CgalShape::num_faces() const
{ {
to_poly(); #ifndef IFOPSH_SIMPLE_KERNEL
return shape_->size_of_facets(); if (nef_) {
return nef_->number_of_facets();
} else
#endif
if (shape_) {
return shape_->size_of_facets();
} else {
return 0;
}
} }
std::shared_ptr<OpaqueNumber> ifcopenshell::geometry::CgalShape::CgalShape::length() std::shared_ptr<OpaqueNumber> ifcopenshell::geometry::CgalShape::CgalShape::length()