boundingBox is returning negative numbers (-1 always)

Hi everyone, I’m building a python script, to run in background; which takes a STL file, imports it and render it.

The thing is, the resulting Mesh of the STL import, when I call
objMesh.boundingBox
it returns:

[-1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000]

The code that imports the STL is a stripped down version of Lobo’s Batch Stl (http://farmerjoe.info/?p=2).

I need the boundingBox so I can accomodate the Camera and generate a nice render.

Any idea of this behavior, or a workaround to center the mesh on the camera’s focus?

BTW, the mesh IS added to the Scene.

Thanks in advance!!!

Are you doing a mesh.update() after you create the mesh?
Are you linking it to the scene before you attempt to fetch the bounding box?