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.
SOLVED!

how to understand the meaning of "Floor plan elements which have the same geometry may share data"

Anonymous
Not applicable
In the comments of ACAPI_3D_GetComponent, there is a sentence.
"Floor plan elements which have the same geometry may share the primitives of the 3D representation data"
How can I get the floor plan elements that have the same geometry?

Thanks.
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Ralph Wessel
Mentor
Shared geometry is simply an optimisation of memory use. 3D primitives aren't stored in the ARCHICAD project file and are generated on demand. These are stored in memory in arrays of bodies, faces, edges and vertices. Rather than duplicate all this data for elements that have the same geometry (but perhaps in a different orientation) they will map onto the same array entries and provide a transformation matrix that positions the vertices correctly for that specific instance. So the same underlying geometry can be repeated in many different locations.

I hope that's reasonable clear. I suppose you could search for elements with the same geometry by comparing the indices in the geometry arrays. What are you trying to achieve?
Ralph Wessel BArch

View solution in original post

6 REPLIES 6
Solution
Ralph Wessel
Mentor
Shared geometry is simply an optimisation of memory use. 3D primitives aren't stored in the ARCHICAD project file and are generated on demand. These are stored in memory in arrays of bodies, faces, edges and vertices. Rather than duplicate all this data for elements that have the same geometry (but perhaps in a different orientation) they will map onto the same array entries and provide a transformation matrix that positions the vertices correctly for that specific instance. So the same underlying geometry can be repeated in many different locations.

I hope that's reasonable clear. I suppose you could search for elements with the same geometry by comparing the indices in the geometry arrays. What are you trying to achieve?
Ralph Wessel BArch
Anonymous
Not applicable
Ralph wrote:
Shared geometry is simply an optimisation of memory use. 3D primitives aren't stored in the ARCHICAD project file and are generated on demand. These are stored in memory in arrays of bodies, faces, edges and vertices. Rather than duplicate all this data for elements that have the same geometry (but perhaps in a different orientation) they will map onto the same array entries and provide a transformation matrix that positions the vertices correctly for that specific instance. So the same underlying geometry can be repeated in many different locations.

I hope that's reasonable clear. I suppose you could search for elements with the same geometry by comparing the indices in the geometry arrays. What are you trying to achieve?
Thanks.
If there are two similar windows, I want to share the geometry.
What are the geometry arrays?
Ralph Wessel
Mentor
jerry wrote:
If there are two similar windows, I want to share the geometry.
What are the geometry arrays?
This is not something that a 3rd-party can influence or directly benefit from. It's an optimisation technique used by ARCHICAD's internal geometry engine.
When you retrieve information about a 3D body, face, edge etc you get indices into arrays of these types, i.e. C-style, raw memory. It's read-only and you don't get any say in how this data is structured or allocated.
Ralph Wessel BArch
Anonymous
Not applicable
Ralph wrote:
jerry wrote:
If there are two similar windows, I want to share the geometry.
What are the geometry arrays?
This is not something that a 3rd-party can influence or directly benefit from. It's an optimisation technique used by ARCHICAD's internal geometry engine.
When you retrieve information about a 3D body, face, edge etc you get indices into arrays of these types, i.e. C-style, raw memory. It's read-only and you don't get any say in how this data is structured or allocated.
Thanks.
Except I retrieve information about a 3D body, face, edge etc. Whether I can directly get the triangulated indice of the face?
Ralph Wessel
Mentor
jerry wrote:
.Except I retrieve information about a 3D body, face, edge etc. Whether I can directly get the triangulated indice of the face?
The API doesn't present 3D body geometry directly as triangles. In fact, it can contain complex polygons with holes and concavities.
The API includes a function ACAPI_3D_DecomposePgon that breaks a 3D polygon into convex sub-polygons with no holes, but not necessarily triangles.
Ralph Wessel BArch
Anonymous
Not applicable
Ralph wrote:
jerry wrote:
.Except I retrieve information about a 3D body, face, edge etc. Whether I can directly get the triangulated indice of the face?
The API doesn't present 3D body geometry directly as triangles. In fact, it can contain complex polygons with holes and concavities.
The API includes a function ACAPI_3D_DecomposePgon that breaks a 3D polygon into convex sub-polygons with no holes, but not necessarily triangles.
Thanks very much. I get it.
Learn and get certified!