LocationPoint vs. BoundingBox, what do i call?

Hello,

I did compare dynamo Nodes vs. PythonCode, i recognized some differences:

1.) Location point

Should be the values not identicaly?
my code calles the center of boundingBox?

And Element.Location+ which “points” get i here?

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)

OUT = points

2.) BoundingBox:

Her i can call surfaces, solids, geometry but not the “full” instance, how can i get the similar values?
I call boxes for each face, why?

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

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

OUT = boxes

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