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:
parent
478afa4eea
commit
c0c9f04c04
@ -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
20
tests/v3d/bugs/bug_gh421
Normal 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
|
Loading…
x
Reference in New Issue
Block a user