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~
Solved! Go to Solution.
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~
Solved! Go to Solution.
Solved by Revitalizer. Go to Solution.
Solved by Revitalizer. Go to Solution.
Solved by jeremytammik. Go to Solution.
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
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
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.. ><
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.. ><
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
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
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
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
how would i use ComputeNormal(UV) as i still need the UV coordinates right?
how would i use ComputeNormal(UV) as i still need the UV coordinates right?
Hi Jasonkhc,
planarFace.ComputeNormal(new UV(0.5,0.5))
Best regards,
Revtalizer
Hi Jasonkhc,
planarFace.ComputeNormal(new UV(0.5,0.5))
Best regards,
Revtalizer
Thank you very much, you guys are very helpful ^^
Thank you very much, you guys are very helpful ^^
Can't find what you're looking for? Ask the community or share your knowledge.