LocationPoint vs. BoundingBox, what do i call?

Hi @Draxl_Andreas,


Your point values are in internal units of Revit.

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)

elements = UnwrapElement(IN[0])
points =[]

for e in elements:
bb = e.get_BoundingBox(None)
if not bb is None:
	centre = bb.Min+(bb.Max-bb.Min)/2
	points.append(centre.ToPoint())

OUT = points

Add ToPoint() to convert in Dynamo Point.

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)

elements = UnwrapElement(IN[0])
    boxes =[]

    for e in elements:
        bb = e.get_BoundingBox(None)
        boxes.append(bb.ToProtoType())

    OUT = boxes

Add ToProtoType() to convert in Dynamo BoundingBox.

3 Likes