+ fix problem with empty bounding box in sketcher (only occurs with Coin 2.x)

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5042 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
wmayer 2011-10-19 20:19:17 +00:00
parent aebddf3fb4
commit 73875b3112

View File

@ -2256,8 +2256,10 @@ Restart:
SoGetBoundingBoxAction bbAction(viewer->getViewportRegion());
bbAction.apply(sep->getChild(3));
float bx,by,bz;
bbAction.getBoundingBox().getSize(bx,by,bz);
float bx=0,by=0,bz=0;
SbBox3f bbox = bbAction.getBoundingBox();
if (!bbox.isEmpty())
bbox.getSize(bx,by,bz);
SbVec3f textBB(bx,by,bz);
SbVec3f textBBCenter = bbAction.getBoundingBox().getCenter();