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
+8
View File
@@ -3403,11 +3403,19 @@ bool IfcGeom::Kernel::boolean_operation(const TopoDS_Shape& a, const TopTools_Li
success = !is_manifold(a) || is_manifold(r); success = !is_manifold(a) || is_manifold(r);
if (success) {
// 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) { if (success) {
result = r; result = r;
} }
} }
} }
}
delete builder; delete builder;
if (!success) { if (!success) {
const double new_fuzziness = fuzziness * 10.; const double new_fuzziness = fuzziness * 10.;