Perform additional check on boolean result output for small edges or distances

This commit is contained in:
Thomas Krijnen
2018-09-17 12:02:41 +02:00
parent 7b17131423
commit 44fab7db16
+9 -1
View File
@@ -3404,7 +3404,15 @@ bool IfcGeom::Kernel::boolean_operation(const TopoDS_Shape& a, const TopTools_Li
success = !is_manifold(a) || is_manifold(r);
if (success) {
result = r;
// when there are edges or vertex-edge distances close to the used fuzziness, the
// output is not trusted and the operation is attempted with a higher fuzziness.
double min_len_check = (std::min)(min_edge_length(r), min_vertex_edge_distance(r, getValue(GV_PRECISION)));
success = min_len_check > fuzziness * 10.;
if (success) {
result = r;
}
}
}
}