mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
Perform additional check on boolean result output for small edges or distances
This commit is contained in:
@@ -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.;
|
||||||
|
|||||||
Reference in New Issue
Block a user