[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

@@ -357,7 +357,7 @@ void DrawViewSection::sectionExec(TopoDS_Shape baseShape)
// cut base shape with tool
//is SectionOrigin valid?
Bnd_Box centerBox;
BRepBndLib::Add(baseShape, centerBox);
BRepBndLib::AddOptimal(baseShape, centerBox);
centerBox.SetGap(0.0);
// make tool
@@ -414,7 +414,7 @@ void DrawViewSection::sectionExec(TopoDS_Shape baseShape)
// check for error in cut
Bnd_Box testBox;
BRepBndLib::Add(rawShape, testBox);
BRepBndLib::AddOptimal(rawShape, testBox);
testBox.SetGap(0.0);
if (testBox.IsVoid()) { //prism & input don't intersect. rawShape is garbage, don't bother.
Base::Console().Warning("DVS::execute - prism & input don't intersect - %s\n", Label.getValue());