mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 19:27:10 +00:00
Invalidate the boolean result for a particular warning reported by pavefiller
This commit is contained in:
@@ -4704,6 +4704,10 @@ bool IfcGeom::Kernel::boolean_operation(const TopoDS_Shape& a_, const TopTools_L
|
|||||||
builder->SetTools(B);
|
builder->SetTools(B);
|
||||||
builder->Build();
|
builder->Build();
|
||||||
if (builder->IsDone()) {
|
if (builder->IsDone()) {
|
||||||
|
if (builder->DSFiller()->HasWarning(STANDARD_TYPE(BOPAlgo_AlertAcquiredSelfIntersection))) {
|
||||||
|
Logger::Notice("Builder reports self-intersection in output");
|
||||||
|
success = false;
|
||||||
|
} else {
|
||||||
TopoDS_Shape r = *builder;
|
TopoDS_Shape r = *builder;
|
||||||
|
|
||||||
ShapeFix_Shape fix(r);
|
ShapeFix_Shape fix(r);
|
||||||
@@ -4835,12 +4839,10 @@ bool IfcGeom::Kernel::boolean_operation(const TopoDS_Shape& a_, const TopTools_L
|
|||||||
if ((v = min_edge_length(r)) < fuzziness * 3.) {
|
if ((v = min_edge_length(r)) < fuzziness * 3.) {
|
||||||
reason = 0;
|
reason = 0;
|
||||||
success = false;
|
success = false;
|
||||||
}
|
} else if ((v = min_vertex_edge_distance(r, getValue(GV_PRECISION), fuzziness * 3.)) < fuzziness * 3.) {
|
||||||
else if ((v = min_vertex_edge_distance(r, getValue(GV_PRECISION), fuzziness * 3.)) < fuzziness * 3.) {
|
|
||||||
reason = 1;
|
reason = 1;
|
||||||
success = false;
|
success = false;
|
||||||
}
|
} else if ((v = min_face_face_distance(r, 1.e-4)) < 1.e-4) {
|
||||||
else if ((v = min_face_face_distance(r, 1.e-4)) < 1.e-4) {
|
|
||||||
reason = 2;
|
reason = 2;
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
@@ -4892,12 +4894,13 @@ bool IfcGeom::Kernel::boolean_operation(const TopoDS_Shape& a_, const TopTools_L
|
|||||||
dump(r);
|
dump(r);
|
||||||
|
|
||||||
Logger::Notice(str.str());
|
Logger::Notice(str.str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
std::stringstream str;
|
std::stringstream str;
|
||||||
|
|
||||||
#if OCC_VERSION_HEX >= 0x70200
|
#if OCC_VERSION_HEX >= 0x70200
|
||||||
|
|
||||||
if (builder->HasError(STANDARD_TYPE(BOPAlgo_AlertBOPNotAllowed))) {
|
if (builder->HasError(STANDARD_TYPE(BOPAlgo_AlertBOPNotAllowed))) {
|
||||||
Logger::Error("Invalid operands. Using first operand");
|
Logger::Error("Invalid operands. Using first operand");
|
||||||
result = a;
|
result = a;
|
||||||
|
|||||||
Reference in New Issue
Block a user