Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Determine outer surface of Element

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
Anonymous
1178 Views, 7 Replies

Determine outer surface of Element

Anonymous
Not applicable

Hi,

 

I would like to seek for advice on how to get the outer surface of Revit Element (Slab, Beam). 

There are many opening and profiling inside the element.  

 

how should I determine which face is exposed externally and which face is not?

 

Very very appreciate if anyone can help me.. being stuck in this thing for a month~

Determine outer surface of Element

Hi,

 

I would like to seek for advice on how to get the outer surface of Revit Element (Slab, Beam). 

There are many opening and profiling inside the element.  

 

how should I determine which face is exposed externally and which face is not?

 

Very very appreciate if anyone can help me.. being stuck in this thing for a month~

7 REPLIES 7
Message 2 of 8
jeremytammik
in reply to: Anonymous

jeremytammik
Autodesk
Autodesk

Dear Jasonkhc,

 

Happy New Year to you!

 

Thank you for the interesting query.

 

If the element shape is convex, you could quite easily determine what you need by forming the convex hull and then comparing each face with that.

 

If the holes in the element are generated by intersections with other elements, then the Element.GetGeneratingElementIds method and GeometryObject.IsElementGeometry property may help differentiating.

 

Other than that, I would say that you simply have a normal non-trivial general geometric problem to solve, and the Revit API cannot help much with that.

 

Please let us know how it goes.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes

Dear Jasonkhc,

 

Happy New Year to you!

 

Thank you for the interesting query.

 

If the element shape is convex, you could quite easily determine what you need by forming the convex hull and then comparing each face with that.

 

If the holes in the element are generated by intersections with other elements, then the Element.GetGeneratingElementIds method and GeometryObject.IsElementGeometry property may help differentiating.

 

Other than that, I would say that you simply have a normal non-trivial general geometric problem to solve, and the Revit API cannot help much with that.

 

Please let us know how it goes.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 8
Anonymous
in reply to: jeremytammik

Anonymous
Not applicable

I am able to get outer surface using my own concept but i still cannot determine which surface is on top or bottom .. cuz there is some odd angle and it causes the vector not consistant as 0,0,-1 or 0,0,1.. all XYZ normal now have value.. ><

0 Likes

I am able to get outer surface using my own concept but i still cannot determine which surface is on top or bottom .. cuz there is some odd angle and it causes the vector not consistant as 0,0,-1 or 0,0,1.. all XYZ normal now have value.. ><

Message 4 of 8
jeremytammik
in reply to: Anonymous

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Jasonkhc,

 

If you are expecting a 'top' and 'bottom' surface with normal vectors close to the positive or negative Z axis, I would say that you are in luck and your problem is completely trivial.

 

Simply determine the angle between the normal vector and the Z axis. If the angle is below a certain (possibly small) threshold, you can consider the surface a top or bottom one.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Dear Jasonkhc,

 

If you are expecting a 'top' and 'bottom' surface with normal vectors close to the positive or negative Z axis, I would say that you are in luck and your problem is completely trivial.

 

Simply determine the angle between the normal vector and the Z axis. If the angle is below a certain (possibly small) threshold, you can consider the surface a top or bottom one.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 5 of 8
Revitalizer
in reply to: Anonymous

Revitalizer
Advisor
Advisor
Accepted solution

Hi jasonkhc,

 

note that PlanarFace.Normal does not reliable give you a vector directing outwards.

Revit.chm says: "This property is the "surface normal" vector. This is not necessarily the normal vector pointing out of the solid that contains the face, to get that value use ComputeNormal(UV)."

 

May this be an explanation for your odd vectors ?

 

 

Best regards,

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Hi jasonkhc,

 

note that PlanarFace.Normal does not reliable give you a vector directing outwards.

Revit.chm says: "This property is the "surface normal" vector. This is not necessarily the normal vector pointing out of the solid that contains the face, to get that value use ComputeNormal(UV)."

 

May this be an explanation for your odd vectors ?

 

 

Best regards,

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 6 of 8
Anonymous
in reply to: Revitalizer

Anonymous
Not applicable

how would i use ComputeNormal(UV) as i still need the UV coordinates right?

0 Likes

how would i use ComputeNormal(UV) as i still need the UV coordinates right?

Message 7 of 8
Revitalizer
in reply to: Anonymous

Revitalizer
Advisor
Advisor
Accepted solution

Hi Jasonkhc,

 

planarFace.ComputeNormal(new UV(0.5,0.5))

 

Best regards,

Revtalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Hi Jasonkhc,

 

planarFace.ComputeNormal(new UV(0.5,0.5))

 

Best regards,

Revtalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 8 of 8
Anonymous
in reply to: Revitalizer

Anonymous
Not applicable

Thank you very much, you guys are very helpful ^^

0 Likes

Thank you very much, you guys are very helpful ^^

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report