remove_degenerate_faces() in order to prevent division by zero

This commit is contained in:
Thomas Krijnen
2023-12-05 21:13:43 +01:00
parent 0b4718b3b5
commit 059c9fb7d5
2 changed files with 7 additions and 3 deletions
@@ -18,6 +18,12 @@ using ifcopenshell::geometry::NumberEpeck;
#define NumberType NumberEpeck
#endif
ifcopenshell::geometry::CgalShape::CgalShape(const cgal_shape_t & shape) {
shape_ = shape;
CGAL::Polygon_mesh_processing::triangulate_faces(*shape_);
CGAL::Polygon_mesh_processing::remove_degenerate_faces(*shape_);
}
#ifndef IFOPSH_SIMPLE_KERNEL
void ifcopenshell::geometry::CgalShape::to_poly() const {
if (!shape_) {