Fix boolean results on non-solid shells #4832

This commit is contained in:
Thomas Krijnen
2024-06-18 21:30:00 +02:00
parent 0e42130e9d
commit a3d4642ea9
7 changed files with 17 additions and 19 deletions
@@ -1430,14 +1430,15 @@ bool IfcGeom::util::boolean_operation(const boolean_settings& settings, const To
return boolean_operation(settings, a, bs, op, result, fuzziness);
}
const TopoDS_Shape& IfcGeom::util::ensure_fit_for_subtraction(const TopoDS_Shape& shape, TopoDS_Shape& solid, double tol) {
TopoDS_Shape IfcGeom::util::ensure_fit_for_subtraction(const TopoDS_Shape& shape, double tol) {
const bool is_comp = is_compound(shape);
if (!is_comp) {
return solid = shape;
return shape;
}
TopoDS_Solid solid;
if (!create_solid_from_compound(shape, solid, tol)) {
return solid = shape;
return shape;
}
return solid;