The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (API DevKit) for independent software developers

Moderators: ejrolon, Barry Kelly, Karl Ottenstein, LaszloNagy, gkmethy, MOREH Tamas, Akos Somorjai, Ed Brown, Mihály Palenik, Tibor Lorántfy, rmasaki

#308684
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?
#308807
Ralph Wessel wrote:
Tue Mar 24, 2020 10:00 am
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?
#308810
jerry wrote:
Thu Mar 26, 2020 7:02 am
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.
#308816
Ralph Wessel wrote:
Thu Mar 26, 2020 9:49 am
jerry wrote:
Thu Mar 26, 2020 7:02 am
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?
#308819
jerry wrote:
Thu Mar 26, 2020 10:45 am
.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.
#308863
Ralph Wessel wrote:
Thu Mar 26, 2020 11:35 am
jerry wrote:
Thu Mar 26, 2020 10:45 am
.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.