[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

@@ -318,7 +318,7 @@ void DrawViewDetail::detailExec(TopoDS_Shape shape,
Bnd_Box bbxSource;
bbxSource.SetGap(0.0);
BRepBndLib::Add(myShape, bbxSource);
BRepBndLib::AddOptimal(myShape, bbxSource);
double diag = sqrt(bbxSource.SquareExtent());
Base::Vector3d toolPlaneOrigin = anchorOffset3d + dirDetail * diag * -1.0; //center tool about anchor