1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-01 17:36:21 +03:00

Visualization - AIS_Shape bounding box re-computation is not working properly #422

Fixed issue with bounding box cleaning algorithm that was causing the bounding box to be only increased.
Now the bounding box is increased and decreased to fit the shape.
This commit is contained in:
Pasukhin Dmitry 2025-03-09 00:07:17 +00:00 committed by GitHub
parent 478afa4eea
commit c0c9f04c04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 0 deletions

View File

@ -735,6 +735,8 @@ const Bnd_Box& AIS_Shape::BoundingBox()
if (myCompBB)
{
// Clear the bounding box to re-compute it.
myBB.SetVoid();
BRepBndLib::Add(myshape, myBB, false);
myCompBB = Standard_False;
}

20
tests/v3d/bugs/bug_gh421 Normal file
View File

@ -0,0 +1,20 @@
puts "============"
puts "Visualization - Bounding box is not decreasing for mode 2 #421"
puts "============"
puts ""
pload MODELING VISUALIZATION
vclear
box b 100 200 300
vinit View1
vdisplay b -dispMode 2
# OK
box b 10 200 300
vdisplay b -dispMode 2
vfit
checkcolor 243 2 0 0 0
vdump $::imagedir/${::casename}.png