mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-29 11:46:33 +00:00
Tolerance tweaks on unification prior to boolean ops
This commit is contained in:
@@ -461,10 +461,11 @@ namespace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TopoDS_Shape unify(const TopoDS_Shape& s, double tolerance) {
|
TopoDS_Shape unify(const TopoDS_Shape& s, double tolerance) {
|
||||||
|
tolerance = (std::min)(min_edge_length(s) / 2., tolerance);
|
||||||
ShapeUpgrade_UnifySameDomain usd(s);
|
ShapeUpgrade_UnifySameDomain usd(s);
|
||||||
usd.SetSafeInputMode(true);
|
usd.SetSafeInputMode(true);
|
||||||
usd.SetLinearTolerance(tolerance);
|
usd.SetLinearTolerance(tolerance);
|
||||||
usd.SetAngularTolerance(tolerance * 100.);
|
usd.SetAngularTolerance(1.e-3);
|
||||||
usd.Build();
|
usd.Build();
|
||||||
return usd.Shape();
|
return usd.Shape();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user