Hi all,
I’m having difficulties converting between a Autodesk.Revit.DB.Solid
to a Autodesk.DesignScript.Geometry.Solid
in a ZeroTouch node.
I’m extracting data from a curtain panel. First I extract the get_Geometry()
, then I want to iterate over it and get the faces, edges etc…
The main problem is that DesignScript doesn’t allow me access to .Faces
, while Revit.DB does.
The way to find the FaceArray
in theory is (mainly looking at Revit Lookup) through the GetInstanceGeometry
, GetSymbolGeometry
, or SymbolGeometry
, all of which return a Solid
.
So far this is my relevant code:
GeometryElement panelGeometry = panel.get_Geometry(options); // get geometry
foreach (Autodesk.Revit.DB.Solid geometry in panelGeometry) // iterate
{
FaceArray panelFaces = geometry.Faces; // get all faces
Nevertheless, there are 2 issues with this exploration that are bothering me:
-
Why does a rectangular panel element have 8 faces and not 6? (attached image)
-
How to correctly convert the Solid in my code, so that I can access FaceArray, without getting the error displayed in Dynamo (attached error msg image)?
I’ve tried looking online a lot, and tried various combinations of extracting the GetInstanceGeometry or trying to cast to different types, but without luck.
Maybe I need to loop with a different Type and only then filter check for a Solid match? Not sure…
Any help would be appreciated.
Thanks.