BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Archicad C++ API
About Archicad add-on development using the C++ API.

API - Mesh triangulation

Anonymous
Not applicable
Greetings,

I'm working on a importer plugin for Archicad. The plugin needs to create a mesh based on a provided description. I've managed to create meshes with interior vertices using API_MeshLevelCoord. It would seem that Archicad generates the triangles in the mesh automatically if no triangles are specified. This is convenient. However, in my case it is crucial to be able to specify the exact triangles used in the mesh.

My question is, how can I specify the edges/triangles used in a mesh interior using API_Element + API_ElementMemo?
3 REPLIES 3
Akos Somorjai
Graphisoft
Graphisoft
Hello,

You cannot specify the triangulation for the mesh, because ARCHICAD will re-triangulate the mesh if the user edits it. BTW, AC uses a slightly modified version of the Delauney triangulation.
However, you can set you own triangulation for morphs; see the morphBody member in the element memo.

Best, Akos
Anonymous
Not applicable
Akos wrote:
Hello,
However, you can set you own triangulation for morphs; see the morphBody member in the element memo.
Best, Akos
Good to know thanks Akos. Is there any chance for halfedge mesh in archicad?

I was about to sugest using morphs for each triangle separate and then unify all. But this seem like quite faster way.
jimmyenvall wrote:
create a mesh based
Morphs is bit different tool in terms of user edit capabilities but is's also mesh based.

You can explor gdls as well to create mesh object. It all depends if you want to edit mesh in AC or not.
Anonymous
Not applicable
Thanks for the suggestions, I'll have a look into morphs.
Learn and get certified!