[TD]fix misplaced section line

- BRepBndLib::Add results in wrong bbox center.
- replaced with BRepBndLib::AddOptimal
This commit is contained in:
Wanderer Fan
2022-03-02 10:08:59 -05:00
committed by WandererFan
parent 7ebc4c44c9
commit 855941d5bb
10 changed files with 34 additions and 20 deletions

View File

@@ -772,7 +772,7 @@ Base::BoundBox3d GeometryObject::calcBoundingBox() const
if (!edgeGeom.empty()) {
for (BaseGeomPtrVector::const_iterator it( edgeGeom.begin() );
it != edgeGeom.end(); ++it) {
BRepBndLib::Add((*it)->occEdge, testBox);
BRepBndLib::AddOptimal((*it)->occEdge, testBox);
}
}
@@ -937,9 +937,9 @@ gp_Pnt TechDraw::findCentroid(const TopoDS_Shape &shape,
BRepBuilderAPI_Transform builder(shape, tempTransform);
Bnd_Box tBounds;
BRepBndLib::Add(builder.Shape(), tBounds);
tBounds.SetGap(0.0);
BRepBndLib::AddOptimal(builder.Shape(), tBounds, true, false);
Standard_Real xMin, yMin, zMin, xMax, yMax, zMax;
tBounds.Get(xMin, yMin, zMin, xMax, yMax, zMax);