Hoops Exchange - Getting bounding box data

Hello,

I already created a ticket for this, asking you information (SDHE-20166).

Is it possible in Hoops Exchange, for gltf files, getting bounding box data information? We will need to, from a gltf file, create an hierarchy of bounding boxes, from the big one to a little one. I don’t know if Hoops exchange has functions that allow us to calculate the volume of a bounding box.

The information I am getting from Part definition bounding box is always the same (the min vector is 1;0;0 and the max vector is -1;0;0).

We also have the original file if we need additional information (we are converting the original file to gltf).

Thank you.

Regards,

Alberto

Hi,

I took a look at your ticket and what you are trying to achieve should definitely be possible via HOOPS Exchange, in fact extracting geometry and properties like bounding box data is among the fundamental features of the library. Have you looked at the “Viewer” or the “PRC2XML” example in the HOOPS Exchange package? Stepping through those samples should give you a good understanding how to parse the prc modelfile and extract information from it.

Hello,
thank you.

I will give it a try. My first focus will be if I can extract bounding box data from the model.

Regards,
Alberto

You should probably have a look at A3DMiscComputeBoundingBox() to extract the bounding info for an entity:

https://docs.techsoft3d.com/exchange/latest/api/A3DSDKMisc_8h.html?highlight=a3dmisccomputeboundingbox#_CPPv425A3DMiscComputeBoundingBoxPK9A3DEntityPK9A3DDoubleP18A3DBoundingBoxData