Retrive mesh of area element

Retrive mesh of area element

Anonymous
Not applicable
675 Views
3 Replies
Message 1 of 4

Retrive mesh of area element

Anonymous
Not applicable

I'm trying to triangulate an area element and then turn it into an svg object.
It's possible? Does anyone know a method to do it?

Thank you.

 

Sorry for my English.

0 Likes
676 Views
3 Replies
Replies (3)
Message 2 of 4

jeremytammik
Autodesk
Autodesk

First of all, explore the area element and its geometry using RevitLookup and see what you can find.

 

I would probably start by retrieving its boundary segments and use those to construct the SVG:

 

https://apidocs.co/apps/revit/2019/8e0919af-6172-9d16-26d2-268e42f7e936.htm

 

http://thebuildingcoder.typepad.com/blog/2009/04/area-boundary-segments.html

 

By the way, my RoomEditorApp retrieves and exports room surfaces to SVG, so that might be of interest as well:

 

https://github.com/jeremytammik/RoomEditorApp

  

Cheers,

 

Jeremy

 

 



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

0 Likes
Message 3 of 4

Anonymous
Not applicable

Thanks Jeremy,

sorry if I answer you only now but I have been busy in other jobs.
I have found your suggestions very useful with which they are able to recover the vertices of the area, but now we have decided to abandon SVG for a WebGL viewer that requires the triangulation of the area. Do you know if there is a method in the API? Can you give me an example?

 

Cheers

 

0 Likes
Message 4 of 4

jeremytammik
Autodesk
Autodesk

Every single geometrical object provided by the Revit API can be easily triangulated using the Triangulate method:

 

https://apidocs.co/apps/revit/2019/8cd4a132-b874-442d-6739-43df3319eac9.htm

 

Analogously, curves provide a Tessellate method:

 

https://apidocs.co/apps/revit/2019/f95f3199-3251-c708-c5a3-a0e9ef95ecfa.htm

 

Cheers,

 

Jeremy

 



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

0 Likes