Bounding Box | Ignore Hidden Geometry

Hello,

The Element.BoundingBox node seems to be taking some hidden geometry into account, while omitting others.

Below are instances of the same family with different parameter settings, which are enclosed by their bounding boxes:

Taking the front view to be x- and y- axes, note:

  • viewport 1 surrounds its family perfectly in the x- and y-axes (except for the bit below y=0)
  • viewports 2-10 of the viewports surround their highest y-point correctly by not taking the hidden beams into a account
  • viewports 2-10 don’t bound their x-coordinate correctly, and seem to be taking the hidden pallets into account.

Below shows how when viewport 2 is overlayed above viewport 1, that it aligns perfectly with the pallets most left from viewport 1, which are hidden in viewport 2.

Here’s a snippet of the viewport code, as copied from:
https://www.linkedin.com/pulse/methods-fitting-crop-region-elements-revit-using-dynamo-ashwin-kumar-:

Could someone advise me to as to why this would happen, or else direct me to where I could find the solution.

Kind regards,
Connor

Hi Connor, would you mind expanding out your nodes? I wonder if it’s to do with different numbers of views and types? Perhaps the bounding box of a family is being used for the wrong view?

Thanks for your response Mark.

Sure. Please see below:


So I realised that all the hidden beam levels not used were set to 0, hence them not affecting the max height of the bounding box, which also explains the bounding box min height going below zero:
image

With this I would have to correct my previous post in that all geometry with visibility off is used in defining the bounding box of the element.


Note how the bounding box below goes above, due to me setting a (hidden) beam and pallet family’s level to above the frame height.


By deleting the third pallet (most to the left) in the nested beam and pallet family the bounding boxes also adapted accordingly. Note that the bounding boxes for the two pallet wide profiles are now correct, while the singles are not.


So it seems that the issue lies with Element.BoundingBox taking all geometry into account, even if its visibility is set to off. How could I go about changing that setting?

Thanks!

Hmm… good work…

I can’t think of a great way.

A hacky kind of way, that might just work… Rebuild the bounding box?.. i think you’d get it’s base curves (clockwork node?) extrude up by the ‘heights’ you’ve defined in your family… then grab the min and max point to make a new bounding box?

Apologies,

Mark

1 Like

Yes, that’s how I had the script originally, but later on I would like to apply this script to many different types of family, so it would be ideal if it automatically gets the bounding box - the best solution would be to write a node that ignores hidden geometry. I will refer to the Revit API forums and try to get a solution there and post here once resolved.

Thanks again for your time @Mark.Ackerley

Sorry if I misunderstand… I was thinking automatically… Pulling the info from the family parameters as well as properties… keep us posted.

Cheers,

Mark