Hello people!
So I was trying to create a BoundingBox and get its min, max and center point with a python node, but I get different values than with a Dynamo Node.
Does anyone know why? Are these two based on two different coordinate systems?
I tought maybe there was a Problem with the Units conversion in Python, so I tried using the UnitUtils method but that was not it…
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("System")
from System.Collections.Generic import List
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
UIunit = Document.GetUnits(doc).GetFormatOptions(UnitType.UT_Length).DisplayUnits
# Die Eingaben für diesen Block werden in Form einer Liste in den IN-Variablen gespeichert.
dataEnteringNode = IN
elements = UnwrapElement(IN[0])
# Code unterhalb dieser Linie platzieren
elem_box = []
mins = []
max = []
centre = []
for item in elements:
elem_box.append(item.get_BoundingBox(None))
for item in elem_box:
mins.append(item.Min.Z)
# Weisen Sie Ihre Ausgabe der OUT-Variablen zu.
OUT = mins