# Create bounding box with 1mm offset

**URL:** <https://forum.dynamobim.com/t/create-bounding-box-with-1mm-offset/76620>\
**Category:** Revit\
**Tags:** revit, python, dynamo\
**Created:** [May 17, 2022, 4:42am UTC](https://forum.dynamobim.com/t/create-bounding-box-with-1mm-offset/76620 "2022-05-17T04:42:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![shashank.baganeACM](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@shashank.baganeACM](https://forum.dynamobim.com/u/shashank.baganeACM)\
**Post date:** [May 17, 2022, 4:42am UTC](https://forum.dynamobim.com/t/create-bounding-box-with-1mm-offset/76620/1 "2022-05-17T04:42:20Z")

</div>

Hi all I am trying to create bounding box around the elements with 1mm offset. The pictures are shown as below.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/4/041a69c5356616d6de73bee14d72cf5545fa73fe.png)

I am trying with below code but is somewhat different. I have extract the b and h values of column elements and I was trying to add 1mm to every corner nodes. But it the rotation of bounding box is the main Isuue. Please let me know how do I proceed ?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/0/a0b1d52d2655c7ab515cee4970e44afc0bb8a9e2.png)

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [May 17, 2022, 4:59am UTC](https://forum.dynamobim.com/t/create-bounding-box-with-1mm-offset/76620/2 "2022-05-17T04:59:27Z")

</div>

You cant rotate boundingbox there are x y aligned but saw the other day @GavinNicholls had a work around…Think it was with cuboid

---

<div class="post-metadata">

**Author:** ![shashank.baganeACM](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@shashank.baganeACM](https://forum.dynamobim.com/u/shashank.baganeACM)\
**Post date:** [May 17, 2022, 5:01am UTC](https://forum.dynamobim.com/t/create-bounding-box-with-1mm-offset/76620/3 "2022-05-17T05:01:27Z")

</div>

Hi @sovitek I want to know how to rotate solids or bounding box ? Because as we have nodes for elements but I want to rotate my solids or boxes. Please let me know

---

<div class="post-metadata">

**Author:** ![GavinNicholls](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gavinnicholls/32/190442_2.png) [@GavinNicholls](https://forum.dynamobim.com/u/GavinNicholls)\
**Post date:** [May 17, 2022, 5:02am UTC](https://forum.dynamobim.com/t/create-bounding-box-with-1mm-offset/76620/4 "2022-05-17T05:02:07Z")

</div>

Ah, this old chestnut again…

Yes I rotate the geometry of the family instance by its rotation angle, bound that, then rotate the cuboid of that bounding box back the other way. As far as I know element aligned bounding boxes aren’t (easily) a thing in Dynamo. I believe you can use Revit API to assess Revit bounding boxes at a rotation if you reference a rotated coordinate system based on previous answers on these threads.

As for the 1mm offset, you’ll need to get the min/max bounding box points and move them to form a new one by shifting them 1mm in the X/Y positive (max point) and negative directions (min point).

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [May 17, 2022, 5:03am UTC](https://forum.dynamobim.com/t/create-bounding-box-with-1mm-offset/76620/5 "2022-05-17T05:03:11Z")

</div>

In your case why not just intersect with a plane and get the perimeter curves

---

<div class="post-metadata">

**Author:** ![Daniel\_Hurtubise](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daniel_hurtubise/32/146534_2.png) [@Daniel\_Hurtubise](https://forum.dynamobim.com/u/Daniel_Hurtubise)\
**Post date:** [May 17, 2022, 5:20am UTC](https://forum.dynamobim.com/t/create-bounding-box-with-1mm-offset/76620/6 "2022-05-17T05:20:22Z")

</div>

Something like this

 ![intersect](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/9/49b97a952b692d0887eb370099e4f02f54f2913a.png)  
This is slightly processive intense so if you happen to have a few thousands i would simply recreate the outer boudaries with the parameters

---

<div class="post-metadata">

**Author:** ![shashank.baganeACM](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@shashank.baganeACM](https://forum.dynamobim.com/u/shashank.baganeACM)\
**Post date:** [May 17, 2022, 7:19am UTC](https://forum.dynamobim.com/t/create-bounding-box-with-1mm-offset/76620/7 "2022-05-17T07:19:10Z")

</div>

Thanks alot @GavinNicholls @sovitek I got the solution. As you motioned I extracted the max and min points and the gave diagonal offset of 1mm to both the points and then I recreated cuboid with min and max points. The script follows as below

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/4/148e8240564f845d47a587e271fb2a5960834e3a.jpeg)

Thanks for the suggestions.

---

<div class="post-metadata">

**Author:** ![shashank.baganeACM](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@shashank.baganeACM](https://forum.dynamobim.com/u/shashank.baganeACM)\
**Post date:** [May 17, 2022, 7:19am UTC](https://forum.dynamobim.com/t/create-bounding-box-with-1mm-offset/76620/8 "2022-05-17T07:19:48Z")

</div>

Hi @Daniel_Hurtubise Thanks for your response. I’ll definitely give a try.
