mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 17:57:02 +00:00
Make cgal implementation a little bit less confident #5453
This commit is contained in:
@@ -153,6 +153,12 @@ CGAL::Nef_polyhedron_3<Kernel_> ifcopenshell::geometry::utils::create_nef_polyhe
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool CgalKernel::convert(const taxonomy::shell::ptr l, cgal_shape_t& shape) {
|
bool CgalKernel::convert(const taxonomy::shell::ptr l, cgal_shape_t& shape) {
|
||||||
|
for (auto& f : l->children) {
|
||||||
|
if (f->basis) {
|
||||||
|
Logger::Error("Non-planar faces not supported at the moment");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (false && l->children.size() > 100) {
|
if (false && l->children.size() > 100) {
|
||||||
static double inf = 1.e9; // std::numeric_limits<double>::infinity();
|
static double inf = 1.e9; // std::numeric_limits<double>::infinity();
|
||||||
std::pair<Eigen::Vector3d, Eigen::Vector3d> minmax(
|
std::pair<Eigen::Vector3d, Eigen::Vector3d> minmax(
|
||||||
@@ -784,12 +790,16 @@ bool CgalKernel::convert_impl(const taxonomy::shell::ptr shell, ConversionResult
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool CgalKernel::convert_impl(const taxonomy::solid::ptr solid, ConversionResults& results) {
|
bool CgalKernel::convert_impl(const taxonomy::solid::ptr solid, ConversionResults& results) {
|
||||||
|
if (solid->children.size() > 1) {
|
||||||
|
Logger::Error("Multiple shells in solid not supported at the moment");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
cgal_shape_t shape;
|
cgal_shape_t shape;
|
||||||
if (solid->children.empty()) {
|
if (solid->children.empty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// @todo
|
// @todo
|
||||||
if (!convert((taxonomy::shell::ptr)solid->children[0], shape)) {
|
if (!convert(solid->children[0], shape)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (shape.size_of_facets() == 0) {
|
if (shape.size_of_facets() == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user