# BoundingBox node - Dynamo crashes

**URL:** <https://forum.dynamobim.com/t/boundingbox-node-dynamo-crashes/65451>\
**Category:** Revit\
**Tags:** revit, dynamo\
**Created:** [June 23, 2021, 11:29am UTC](https://forum.dynamobim.com/t/boundingbox-node-dynamo-crashes/65451 "2021-06-23T11:29:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mairh\_tsek](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@mairh\_tsek](https://forum.dynamobim.com/u/mairh_tsek)\
**Post date:** [June 23, 2021, 11:29am UTC](https://forum.dynamobim.com/t/boundingbox-node-dynamo-crashes/65451/1 "2021-06-23T11:29:48Z")

</div>

Hello all,

I want to create a solid from a revit profile (it is just a rectangle). Every time that I run the script after the node ‘BoundingBox.ToCuboid’ Dynamo crashes.  
The python script that I use in order to get the curves from the revit profile is the following :

import clr  
clr.AddReference(‘ProtoGeometry’)  
from Autodesk.DesignScript.Geometry import \*

# Import ToDSType(bool) extension method

clr.AddReference(“RevitNodes”)  
import Revit  
clr.ImportExtensions(Revit.Elements)

# Import DocumentManager and TransactionManager

clr.AddReference(“RevitServices”)  
import RevitServices  
from RevitServices.Persistence import DocumentManager  
from RevitServices.Transactions import TransactionManager

from System.Collections.Generic import \*

# Import RevitAPI

clr.AddReference(“RevitAPI”)  
import Autodesk  
from Autodesk.Revit.DB import \*

doc = DocumentManager.Instance.CurrentDBDocument  
uiapp = DocumentManager.Instance.CurrentUIApplication  
app = uiapp.Application

type = UnwrapElement(IN[0].Family.Name)  
name = UnwrapElement(IN[0].Name)

family = UnwrapElement(IN[0]).Family

TransactionManager.Instance.ForceCloseTransaction()  
famDoc = doc.EditFamily(family)

famCollector = FilteredElementCollector(famDoc)  
sketch = famCollector.OfClass(Sketch)

for i in sketch:  
cArray = list(i.Profile)  
cArray[:] = [[Revit.GeometryConversion.RevitToProtoCurve.ToProtoType(y, True ) for y in x] for x in cArray]  
OUT = cArray

 ![tocuboid-crash](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/2/028b7d95984336ecb38169c6cd1fb9df38f7bca5.png)  
 ![dynamo crash](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/1/c1f35c4d6b9dea40434e19399de46fcc9bb75027.png)

Any idea?

Thank you!

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [June 23, 2021, 12:12pm UTC](https://forum.dynamobim.com/t/boundingbox-node-dynamo-crashes/65451/2 "2021-06-23T12:12:57Z")

</div>

My guess is that this is an issue with the geometry engine having a hard time making or displaying a cuboid with no height. Try pulling the minimum and maximum point instead, and use the XY values to build a rectangle which you can patch.
