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: 

Does TopographySurface.GetBoundaryPoints guarantee point ordering?

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
512 Views, 3 Replies

Does TopographySurface.GetBoundaryPoints guarantee point ordering?

I'd like to extract consecutive boundary points of a TopographySurface, i.e., by traversing the returned List[XYZ], I'm simulating a continuous, vertex-by-vertex walk around the TopographySurface perimeter. I suspect all of this information must live in the underlying data structure, but I can't find out how to get at it, and the documentation makes no mention of ordering:

http://revitapisearch.com/html/f34dbefb-94de-43e8-967d-8662f6593dac.htm

 

I've also tried probing the Vertices member of the underlying Mesh (with a call to Geometry.GetEnumator()), but this returns boundary and interior points, also in an unknown order.

 

Anyone know how best to extract this information directly from the API, or else have insight into the order guaranteed by a call to TopographySurface.GetBoundaryPoint()?

 

Thanks in advance.

3 REPLIES 3
Message 2 of 4
jeremytammik
in reply to: Anonymous

Dear Klanea,

 

In the far distant past, you could not even ask the topography surface which points were interior or exterior.

 

Therefore, I implemented an add-in to determine this:

 

http://thebuildingcoder.typepad.com/blog/2011/03/toposurface-interior-and-boundary-points.html

 

The interior versus exterior predicate was later added to the API, cf. What's New in the Revit 2014 API > Reading points from a TopographySurface.

 

However, my old add-in should help provide what you need as well.

 

Cheers,

 

Jeremy



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

Message 3 of 4
Anonymous
in reply to: jeremytammik

Hi Jeremy,

 

Thanks for your reply. That's a great blog post; kudos! I'll go ahead and implement a "toposurface boundary loop" utility using the underlying mesh facilities of TopographySurface. I just wanted to make sure I wasn't missing a feature/trick in the API docs! 🙂

 

Thanks again for lighting the way!

Message 4 of 4
jeremytammik
in reply to: Anonymous

Dear Klanea,

 

Thank you for the appreciation!

 

I am glad you find it useful.

 

The Revit API does in fact provide a method to sort a collection of curves into a contiguous loop, provided by the ExporterIfcUtils class and exercised by the RoomEditorApp sample code:

 

http://thebuildingcoder.typepad.com/blog/2015/01/exporterifcutils-curve-loop-sort-and-validate.html

 

I look forward to seeing the implementation that you come up with and will happily share that on The Building Coder as well.

 

Thank you!

 

Cheers,

 

Jeremy



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

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

Post to forums  

Autodesk Design & Make Report