mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +00:00
Disable automatic density substitution in cgal kernel
This commit is contained in:
@@ -153,7 +153,7 @@ 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) {
|
||||||
if (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(
|
||||||
Eigen::Vector3d(+inf, +inf, +inf),
|
Eigen::Vector3d(+inf, +inf, +inf),
|
||||||
@@ -174,6 +174,7 @@ bool CgalKernel::convert(const taxonomy::shell::ptr l, cgal_shape_t& shape) {
|
|||||||
});
|
});
|
||||||
auto diag = minmax.second - minmax.first;
|
auto diag = minmax.second - minmax.first;
|
||||||
double volume = diag(0) * diag(1) * diag(2);
|
double volume = diag(0) * diag(1) * diag(2);
|
||||||
|
// @todo volume van be zero also..
|
||||||
double density = num_points / volume;
|
double density = num_points / volume;
|
||||||
Logger::Notice("Density " + boost::lexical_cast<std::string>(density), l->instance);
|
Logger::Notice("Density " + boost::lexical_cast<std::string>(density), l->instance);
|
||||||
if (density > 5000) {
|
if (density > 5000) {
|
||||||
|
|||||||
Reference in New Issue
Block a user