We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

How to triangulate wall and any other entity of loaded model

rajatsabale
Participant

I'm currently seeking triangulation data to identify points that form various entities within a loaded model, such as walls or slabs. Could you assist me with this? For instance, in a wall model, I need to extract points from the corners of the wall.

Thank you.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Solution
Ralph Wessel
Mentor

I assume you want the 3D coordinates of the wall mesh/body? If so, take a look at the example project "3D_Test", specifically the function Do_Get3DOfClickedElem in "3D_Test.c". The function ACAPI_ModelAccess_Get3DInfo is used to extract the detailed 3D geometry of an element, which includes the 3D vertices of the body. This code can extract the 3D geometry of any 3D Archicad element (including walls).

Ralph Wessel BArch
Software Engineer Speckle Systems

View solution in original post

Solution

You want to display a point in the 3D view to confirm the extracted geometry is correct? If so, you can't arbitrarily draw into the 3D view. Everything in 2D and 3D is rendered from elements, e.g. walls, roofs, slabs, (and in 2D) lines, fills etc. Therefore, the only way to add 3D content is to place an element that renders the required output. The simplest way is to create a GDL object with a 3D script. But this will draw relative to the placement point (and transformations) of the placed object - not absolute 3D coordinates.

 

Why do you have doubts about the output?

Ralph Wessel BArch
Software Engineer Speckle Systems

View solution in original post

4 REPLIES 4
Solution
Ralph Wessel
Mentor

I assume you want the 3D coordinates of the wall mesh/body? If so, take a look at the example project "3D_Test", specifically the function Do_Get3DOfClickedElem in "3D_Test.c". The function ACAPI_ModelAccess_Get3DInfo is used to extract the detailed 3D geometry of an element, which includes the 3D vertices of the body. This code can extract the 3D geometry of any 3D Archicad element (including walls).

Ralph Wessel BArch
Software Engineer Speckle Systems

Hi Ralph,

I appreciate your prompt response, and I'm glad to hear that your solution worked. I have a lingering doubt, though. I'm attempting to display a point on the ArchiCAD viewer to better understand its position relative to other objects, but I'm encountering some difficulty in doing so. Could you provide assistance with this matter?

Once again, thank you for your help.

 

image (6).png

Solution

You want to display a point in the 3D view to confirm the extracted geometry is correct? If so, you can't arbitrarily draw into the 3D view. Everything in 2D and 3D is rendered from elements, e.g. walls, roofs, slabs, (and in 2D) lines, fills etc. Therefore, the only way to add 3D content is to place an element that renders the required output. The simplest way is to create a GDL object with a 3D script. But this will draw relative to the placement point (and transformations) of the placed object - not absolute 3D coordinates.

 

Why do you have doubts about the output?

Ralph Wessel BArch
Software Engineer Speckle Systems

Thank you for getting back to me @Ralph Wessel.

I'm wondering if creating a GDL object using 3D scripting will give me the points and coordinates I need. If it does, I'd really appreciate your help in getting started with GDL scripting in Archicad.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!