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.

Find surface areas in each of wall directions

Anonymous
Not applicable
I can find total surface areas of the wall from "API_WallQuantity", but I can't find surface areas in each of wall directions, such as, the wall of North direction, etc.

How to know what direction of the wall is. I'd like to apologize. If my language is wrong. Sorry for any inconvenience

Thank you
4 REPLIES 4
Ralph Wessel
Mentor
aud_kit wrote:
I can find total surface areas of the wall from "API_WallQuantity", but I can't find surface areas in each of wall directions, such as, the wall of North direction, etc.
How to know what direction of the wall is.
I think you will have to iterate through the faces in the 3D body to calculate that. Take a look at the Model Access API - it provides easy methods for accessing all the bodies, polygons, vertices, etc in the 3D model (including the polygon materials). Use the surface normals to calculate the wall direction.
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
Ralph wrote:
I think you will have to iterate through the faces in the 3D body to calculate that. Take a look at the Model Access API - it provides easy methods for accessing all the bodies, polygons, vertices, etc in the 3D model (including the polygon materials). Use the surface normals to calculate the wall direction.
Thank you very much. I will be back to reply the result.
Anonymous
Not applicable
Calculating the surface normal would help determine the orientation of the wall. However, before I calculate the surface normal, I need to determine which side of the wall I wanna calculate the surface normal.

What I wanna do is that I am trying to check if a given wall element is exterior or interior and determine which side of the wall is exposed to the outside if the wall element is an exterior wall. Then, I can compute the surface normal of only the wall side facing the outside.

Do you guys have any idea on how to determine whether the wall element is exterior and which side of the wall faces the outside of the building?
Ralph Wessel
Mentor
aud_kit wrote:
What I wanna do is that I am trying to check if a given wall element is exterior or interior and determine which side of the wall is exposed to the outside if the wall element is an exterior wall. Then, I can compute the surface normal of only the wall side facing the outside.
Not sure if you noticed, but the ModelAccess API provides surface normals (you don't have to calculate them).

ArchiCAD doesn't explicitly identify the relationship between building surfaces and the exterior. I had to grapple with the same problem for Encina's gbXML Export add-on. All surfaces in gbXML must explicitly state their function and relationship to either the exterior or adjoining spaces, e.g. InteriorWall, ExteriorWall, Roof, SlabOnGrade, etc.

My first approach was completely automated. The algorithm would connect all building surfaces to find enclosed spaces, and the connections between spaces then determined which surfaces were to the exterior. However, there are several problems with that approach:
  • 1) Almost all building models are flawed, with elements not quite connecting (especially at early design stages).
    2) Sometimes areas enclosed by walls are not a genuine space (think walled courtyard).
    3) Buildings are not always modelled with walls, roofs, etc. Worse still, many users resort to workarounds like modelling roofs with profiled beams or walls (which makes it extremely difficult for an automated process to make sense of the model).
The end result was that the user had poor control over how the building model was interpreted, but - worse still - they had no comprehension of this because the process was entirely automated.

I've finally settled on using zones to explicitly identify the interior perimeter of rooms and the exterior perimeter of the building. That latter is necessary because the fact that a wall surface does not bound an interior zone does not implicitly mean that it is an exterior surface. I also provided a tool to automatically place these zones, which should spare the user from doing most of the hard slog (they can just clean up as required).
Ralph Wessel BArch
Software Engineer Speckle Systems