getBoundingBox result includes dimension annotations

We are using getBoundingBox on the node to implement collision detection with nodes that have dimensions added to them. When we add dimensions to the node with an offset, the getBoundingBox is returning a box that includes the dimensions with the offset value and therefore is much larger than the node. I could see that you might want to know the bounding box with dimensions, but it would be helpful is there was a way to get the box without them.

Example for a window from my testing:

  1. Bounding box with no dimensions has a width of 0.5 and height of 1.0
  2. Bounding box with Width dimension offset by 0.25 (x direction) and Height offset by 0.1 (y direction) results in a bounding box with a width of 1.0 and height of 1.2

We are doing a workaround by having a top level node in the model we create with all the geometry underneath it and then putting dimensions at the same level as it. We can then transform that node (Window1.shed-window.Window) in this example assuming Window1 was the name for the node added:
image

But we really want to transform the whole model using Window1 as the name because doing this transform of a sub-node results in more complexity for our users (without going in to detail as to why).

Is there any way to get the bounding box without including the dimensions in your APIs? I was unable to find anything. I view dimensions as just an annotation and not part of the node for calcs.

Hey Mike,

Let me look into this and follow up with some resources.

Hey @mheskamp - I followed up with engineering and got some details about this. It looks like the getBoundingBox method can take the following parameters:

ignoreChildren?: boolean;
whitelistTypes?: string[];
relativeTransform?: Matrix4;
visibleOnly?: boolean; // default is true
targetBoundingBox?: Box3;

It has been suggested that you can try to specify what types of node you would like to include: whitelistTypes=['PolyMesh']

Without having access to the example you are specifying it was a little challenging to test on my end - if there is a sharable asset in the platform you can DM it to me and I would be happy to test, otherwise let me know if this gets you pointed in the right direction.

1 Like

Thanks Will! The whitelistTypes parameter looks like it should do what we need. I’ll try it out to make sure and confirm.

1 Like

Fantastic, let me know if there is anything else I can help with.