Enlarge boundingbox

Enlarge boundingbox

Anonymous
Not applicable
958 Views
1 Reply
Message 1 of 2

Enlarge boundingbox

Anonymous
Not applicable

Hi, I'm looking to use a bounding box to find the air devices associated with a room.  I can get a boundingbox from room.getboundingbox, and I can use filteredelementcollector to get air devices but I'm not sure how to enlarge the top boundary of the boundingbox by 2feet to capture the air devices above the room.  I see that the transform property can be used to move or rotate the boundingbox, but is there a way to enlarge the top of the box?

 

Thanks in advance,

Ian

0 Likes
Accepted solutions (1)
959 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

Hello,

 

you can get min and max point of your boundingbox, and then manipulate xyz of these two points and then create an outline from your new points:

 

xyz point1 = yourboundingbox.min;
xyz point2 = yourboundingbox.max;

double newz1 = point2.z +2;

Outline VitrualBoxX = new Outline(point1,new XYZ(point1.x,point1.Y,newz1));
BoundingBoxIntersectsFilter X1Fiter = new BoundingBoxIntersectsFilter(VitrualBoxX);


i hope this would help