mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
remove_degenerate_faces() in order to prevent division by zero
This commit is contained in:
@@ -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_) {
|
||||
|
||||
@@ -171,9 +171,7 @@ namespace ifcopenshell { namespace geometry {
|
||||
mutable boost::optional<CGAL::Nef_polyhedron_3<Kernel_>> nef_;
|
||||
#endif
|
||||
public:
|
||||
CgalShape(const cgal_shape_t& shape) {
|
||||
shape_ = shape;
|
||||
}
|
||||
CgalShape(const cgal_shape_t& shape);
|
||||
|
||||
#ifndef IFOPSH_SIMPLE_KERNEL
|
||||
CgalShape(const CGAL::Nef_polyhedron_3<Kernel_>& shape) {
|
||||
|
||||
Reference in New Issue
Block a user