Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

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: 

CalculateSpatialElementGeometry(), not retrieving all the boundary faces

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
MiguelGT17
512 Views, 6 Replies

CalculateSpatialElementGeometry(), not retrieving all the boundary faces

Hi mates, hope this topic find you all well

 

I'm currently working on a automatic skirtingboard placement add-in and it'll be necessary to gather all the boundary faces to remove part of the baseboard or overextend them a bit more:

MiguelGT17_1-1664158956140.png

 

I've managed to tessellated the faces returned by the combination of CalculateSpatialElementGeometry(), GetBoundaryFaceInfo() &  GetBoundingElementFace () methods and I came up with this: 

MiguelGT17_0-1664158339297.png

MiguelGT17_2-1664159132530.png

 

I'm not getting the face from the orthogonal walls. 

 

Do you have any ideas to get those faces as well?

Thanks in advanced, all the best

 

Miguel Gutiérrez

6 REPLIES 6
Message 2 of 7
jeremy_tammik
in reply to: MiguelGT17

The only suggestion I have off-hand is to query the room for its boundary edges and compare those with the spatial element geometry faces. I think the boundary edges may give you access to the walls that generate them, so you might be able to add the missing face pieces from those.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 7
RPTHOMAS108
in reply to: MiguelGT17

I don't know if there is a better solution offhand but you can try temporarily setting the join type of the wall to miter instead of abut to see if that helps. This setting can be found on LocationCurve.JoinType.

 

This changes the geometry of the wall used for graphics. It is abutted by default which means the face of the wall stops in line with the other face and you have a hidden contextual edge. 

 

MiterMiterAbutAbut

You can also try setting SpatialElementBoundaryLocation to centre and offsetting the line.

 

As is always the case with these kinds of things the reliability of the result is going to depend on the standard of work used within the model.

Message 4 of 7
MiguelGT17
in reply to: jeremy_tammik

Hi Jeremy, Indeed I used the boundary edges to query the wall faces but the faces belonging to orthogonal walls were not returned. Thomas approach seems to work fine.

Message 5 of 7
MiguelGT17
in reply to: RPTHOMAS108

Thanks for replying me Thomas, you are the men! I was not aware of the WallJoins tool, Now, I can have the full face from the boundary walls. Thank you so much!

 

MiguelGT17_0-1664213339981.png

 

 

 

Message 6 of 7
jeremy_tammik
in reply to: MiguelGT17

Brilliant! Thanks to Richard for the great and effective suggestion and to Miguel for the nice topic and illustrations. Preserved for posterity on the blog:

 

https://thebuildingcoder.typepad.com/blog/2022/09/aps-au-and-miter-wall-join-for-full-face.html#6

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 7 of 7
MiguelGT17
in reply to: jeremy_tammik

Awesome! I'm glad to know that my struggle will help someone esle in the future, cheers!

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

Post to forums  

Autodesk Design & Make Report