Retrieving references to faces of a beam

Retrieving references to faces of a beam

Anonymous
Not applicable
1,135 Views
1 Reply
Message 1 of 2

Retrieving references to faces of a beam

Anonymous
Not applicable

I am trying to retrieve the references to the faces of a beam. I need this to display analysis results on these faces.

 

I tried using:

Element.Geometry

GeometryInstance.GetInstanceGeometry as Solid

 

but then Solid.Faces was empty.

 

I was more successful trying GeometryInstance.GetSymbolGeometry. I retrieved faces, but could not get references to these faces.

 

I need references and not just faces, because when I use SpatialFieldManager.AddSpatialFieldPrimitive(Face, Transform) the analysis colors does not display correctly - the "analysis gradient face" and actual face overshadows each other - I am not sure how to describe it, the same things happens when you have a duplicated element with different colors.

0 Likes
Accepted solutions (1)
1,136 Views
1 Reply
Reply (1)
Message 2 of 2

Joe.Ye
Alumni
Alumni
Accepted solution

 

 

Some time for an element, you can retrieve several solids via geometry retrieving API methods . Some of them are valid solid, and some of them are invalid. You need to go through all the returned solids to check if it is valid by checking if Solid.Faces.Count is greater than 0. 

 

To get the reference of a face, you need to set the Options.ComputeReferences = true when retrieving geometry data via Element.Geometry() property.



Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
0 Likes