Include invisible entities when calculating BBox for chord tolerance.
Otherwise, loading a file with all entities invisible becomes pathologically slow.
This commit is contained in:
parent
bdd02ac3a8
commit
d4ecf155f6
|
@ -186,8 +186,8 @@ void SolveSpaceUI::GenerateAll(int first, int last, bool andFindFree, bool genFo
|
||||||
// If we're generating entities for display, first we need to find
|
// If we're generating entities for display, first we need to find
|
||||||
// the bounding box to turn relative chord tolerance to absolute.
|
// the bounding box to turn relative chord tolerance to absolute.
|
||||||
if(!SS.exportMode && !genForBBox) {
|
if(!SS.exportMode && !genForBBox) {
|
||||||
GenerateAll(first, last, false, true);
|
GenerateAll(first, last, /*andFindFree=*/false, /*genForBBox=*/true);
|
||||||
BBox box = SK.CalculateEntityBBox(false);
|
BBox box = SK.CalculateEntityBBox(/*includeInvisibles=*/true);
|
||||||
Vector size = box.maxp.Minus(box.minp);
|
Vector size = box.maxp.Minus(box.minp);
|
||||||
double maxSize = std::max({ size.x, size.y, size.z });
|
double maxSize = std::max({ size.x, size.y, size.z });
|
||||||
chordTolCalculated = maxSize * chordTol / 100.0;
|
chordTolCalculated = maxSize * chordTol / 100.0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user