mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 10:51:13 +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
|
#define NumberType NumberEpeck
|
||||||
#endif
|
#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
|
#ifndef IFOPSH_SIMPLE_KERNEL
|
||||||
void ifcopenshell::geometry::CgalShape::to_poly() const {
|
void ifcopenshell::geometry::CgalShape::to_poly() const {
|
||||||
if (!shape_) {
|
if (!shape_) {
|
||||||
|
|||||||
@@ -171,9 +171,7 @@ namespace ifcopenshell { namespace geometry {
|
|||||||
mutable boost::optional<CGAL::Nef_polyhedron_3<Kernel_>> nef_;
|
mutable boost::optional<CGAL::Nef_polyhedron_3<Kernel_>> nef_;
|
||||||
#endif
|
#endif
|
||||||
public:
|
public:
|
||||||
CgalShape(const cgal_shape_t& shape) {
|
CgalShape(const cgal_shape_t& shape);
|
||||||
shape_ = shape;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef IFOPSH_SIMPLE_KERNEL
|
#ifndef IFOPSH_SIMPLE_KERNEL
|
||||||
CgalShape(const CGAL::Nef_polyhedron_3<Kernel_>& shape) {
|
CgalShape(const CGAL::Nef_polyhedron_3<Kernel_>& shape) {
|
||||||
|
|||||||
Reference in New Issue
Block a user