Inspection: support display of lines, avoid explicit type checks

This commit is contained in:
wmayer
2022-09-15 11:46:20 +02:00
parent 2462f4c7a0
commit 48aafc3f8b
4 changed files with 157 additions and 92 deletions

View File

@@ -3491,7 +3491,9 @@ double TopoShape::getAccuracy() const
{
double deviation = 0.2;
Base::BoundBox3d bbox = getBoundBox();
return ((bbox.LengthX() + bbox.LengthY() + bbox.LengthZ())/300.0 * deviation);
if (bbox.IsValid())
return ((bbox.LengthX() + bbox.LengthY() + bbox.LengthZ())/300.0 * deviation);
return ComplexGeoData::getAccuracy();
}
void TopoShape::getFaces(std::vector<Base::Vector3d> &aPoints,