CalculateSpatialElementGeometry(), not retrieving all the boundary faces

CalculateSpatialElementGeometry(), not retrieving all the boundary faces

MiguelGT17
Advocate Advocate
969 Views
6 Replies
Message 1 of 7

CalculateSpatialElementGeometry(), not retrieving all the boundary faces

MiguelGT17
Advocate
Advocate

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

Accepted solutions (1)
970 Views
6 Replies
Replies (6)
Message 2 of 7

jeremy_tammik
Alumni
Alumni

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
Mentor
Mentor
Accepted solution

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
Advocate
Advocate

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
Advocate
Advocate

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
Alumni
Alumni

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
Advocate
Advocate

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

0 Likes