Graphisoft®

Basic Library Version: 16

Wall End Elements

Index

  1. General Description
  2. Parameters
  3. ArchiCAD context
  4. Scripts

1. General Description

This document is a common description of wall end elements in ArchiCAD. For the implementation of wall ends, the ArchiCAD development chose the generic solution of GDL objects. Hereby a user can possibly create specific objects and the ones included into ArchiCAD Library are easy to alter. See the 2D appearance of some wall ends from the Library to get a vision about the possibilites.

Wall End 2 2D Wall End 3 2D Wall End Pointed 2D

2. Parameters

Only the differences from the Building Element subtype are listed here.

Name Type Description
AC_Hole_Hotspot_Control Integer
0 There aren't any automatic generated hotspots
1 ArchiCAD generates only 2D hotspots - at the 4 bounding vertices of the 2D wall-hole
2 ArchiCAD generates only 3D hotspots - at the 8 bounding vertices of the 3D wall-hole
3 ArchiCAD generates 2D and 3D hotspots
These hotspots won't do if you want correct hotspots, so this value should be set to 0. Use the Resize Wall End macro for correct hotspots in 2D.
AC_HoleSideMaterial Boolean Has the same function as in windows and doors.
AC_HoleMaterialCurved Boolean Has the same function as in windows and doors.
AC_WALL_INTID Integer The internal ID of the container wall. This value can be used in listing.
AC_CutWidth Length The length of cut in the wall. The length is measured parallel to the reference line of the wall in the centerline.
Cutwidth in 2D
AC_fit_to_wall_height Boolean If set the object should fit the full height of the wall. The 3D coordinate system's origin is still at GLOB_ELEVATION height, so the 3D model building should start with ADDZ -GLOB_ELEVATION and the value of WALL_HEIGHT should be used instead of ZZYZX for the object height.

3. ArchiCAD context

The object coordinate system is set as shown below:
Trapeze wall Curved wall

Global variables which describe the wall geometry

Variable Description of the meaning of the variable
WALL_INCL Side inclination of trapeze wall, 0 for not inclined walls. Non negative angle in degrees.
WALL_THICKNESS Thickness of the wall at the end where the current object is located.
WALL_HEIGHT Height of the wall.
SYMB_MIRRORED
0
The object origin is on the reference line's side.
1
The object origin is not on the reference line's side.

Trapeze wall
WIDO_ORIG_DIST Is 0 for non-curved walls and the distance of the curve origin and the object origin for curved walls. Can be positive or negative implicitly.
Curved wall
WIDO_POSITION Distance of the object origin from the wall origin. It is used to determine the direction of declination.

The different geometries are the following:

Ending Case SYMB_MIRRORED WALL_THICKNESS WIDO_ORIG_DIST
Straight 0 or 1 = WALL_START_THICKNESS
= WALL_END_THICKNESS
0
Trapeze 1 = WALL_START_THICKNESS
< WALL_END_THICKNESS
0
Trapeze 1 = WALL_START_THICKNESS
> WALL_END_THICKNESS
0
Trapeze 0 = WALL_START_THICKNESS
< WALL_END_THICKNESS
0
Trapeze 0 = WALL_START_THICKNESS
> WALL_END_THICKNESS
0
Curved 0 or 1 = WALL_START_THICKNESS
= WALL_END_THICKNESS
< 0
Curved 0 or 1 = WALL_START_THICKNESS
= WALL_END_THICKNESS
> 0

4. Scripts

Master script

The function of a typical wall end master script is to determine the container wall geometry. This means to find out which case of the above compositions is the current one.

Example:

EPS = 0.001 length = AC_CutWidth ! --- wall geometry --- if abs(WIDO_POSITION) < EPS then onWallBeg = 1 endif wallIncl = WALL_INCL maxWThickn = WALL_START_THICKNESS if maxWThickn < WALL_END_THICKNESS then maxWThickn = WALL_END_THICKNESS if abs(maxWThickn - WALL_THICKNESS) > EPS and SYMB_MIRRORED then wallIncl = -WALL_INCL endif if abs(maxWThickn - WALL_THICKNESS) < EPS and SYMB_MIRRORED then wallIncl = -WALL_INCL endif isCurved = 0 if abs(WIDO_ORIG_DIST) > EPS then isCurved = 1 r0 = abs(WIDO_ORIG_DIST) if WIDO_ORIG_DIST > 0 then alpha = (length / (r0 - WALL_THICKNESS/2)) / PI*180 r0 = r0 - WALL_THICKNESS else alpha = (length / (r0 + WALL_THICKNESS/2)) / PI*180 endif endif

2D script

A wall end object has usually three main tasks in 2D: draw the cap/ending, draw the remaining part of the wall and place hotspots.

For that you'll get a natural coordinate system if you start the 2D script with rot2 -90. This coordinate system is needed to use the SkinRect and Resize Wall End macros.

Draw the End cap

Drawing the cap itself is the simpliest of the whole thing. If the cap consists of rectangles (in a normal straight wall), it can be worthwhile to use the SkinRect makro, because it handles trapeze and curved walls automatically. If the cap joins the composite structure of the wall, attention must be paid to the position of the last core skin - which shapes trapeze in trapeze walls -, it can be the first, the last or an inner skin.

Draw the remaining wall

Drawing a wall part isn't an easy thing to do. The outcome of the script must exactly match the wall - which is generated by the ArchiCAD Wall tool. This wall-part is mostly a rectangle, so the usage of SkinRect macro is highly recommended. For a non-composite wall this can be made pretty simple.

The example shows the creation of the whole missing wall-segment.

fill WALL_FILL call "SkinRect" PARAMETERS startX = 0, startY = 0, endX = AC_CutWidth, endY = WALL_THICKNESS, trapType = 1, innerRadius = innerRadius, incAngle = wallIncl, fillPen = WALL_FILL_PEN, fillBGPen = WALL_FBGD_PEN, startLinePen = WALL_SECT_PEN, startLineCont = 1, bottomLinePen = WALL_SECT_PEN, bottomLineLineType = WALL_LINETYPE, bottomLineCont = 1, topLinePen = WALL_SECT_PEN, topLineLineType = WALL_LINETYPE, topLineCont = 1

In composite walls the following factors must be considered: wall geometry (which side is inclining in a trapeze wall), position of the last core skin, state of the Construction Fills setting in the Display Options dialog (draw line between skins or not). You don't have to care much about display options, if you set correctly the line property of the lines you draw. You can read about this issue in Chapter 4.2 of the GDL Technical Standards.

Place hotspots

The four hotspots generated by ArchiCAD may not fulfill all expectations. For that reason the Resize Wall End macro was developed. This macro places the following hotspots:
Hotspots in 2D
For a more complex wall end object more hotspots may be needed. In the wall ends of the ArchiCAD Library this subroutine is used:

! ===== move the coorinate system to a given X coordinate ===== 1: additionIfMirr = 0 additionNotMirr = 0 if innerRadius > EPS then if onWallBeg < EPS then add2 0, -innerRadius rot2 -(xMoveTo / (innerRadius + WALL_THICKNESS/2)) / PI*180 add2 0, innerRadius else add2 0, innerRadius + WALL_THICKNESS rot2 (xMoveTo / (innerRadius + WALL_THICKNESS/2)) / PI*180 add2 0, -innerRadius - WALL_THICKNESS endif moveStepNum = 3 else if SYMB_MIRRORED then additionIfMirr = xMoveTo * tan(wallIncl) else additionNotMirr = xMoveTo * tan(wallIncl) endif add2 xMoveTo, 0 moveStepNum = 1 endif return

This subroutine moves the coordinate system to a given x position - even if the wall is curved and this is done by rotation - and returns additional values for trapeze walls. When called, the following values have to be set: onWallBeg - true if the object is at the beginning of the wall, innerRadius - the inner radius of the curved wall or 0 in straight wall, xMoveTo - the x position to go to. The subroutine returns these values: additionIfMirr - addition to the y coordinate as needed, additionNotMirr - addition to the y coordinate as needed, moveStepNum - number of steps to delete from the transformation stack when the transformation is no longer needed.

Example of usage:

Two fix hotspots

xMoveTo = thickCap gosub 1 hotspot2 0, additionIfMirr + thickFirst, unID unID = unID + 1 hotspot2 0, additionNotMirr + WALL_THICKNESS - thickSecond, unID unID = unID + 1 del moveStepNum

3D script

A wall end object has usually two main tasks in 3D: cut a hole into the wall and generate a body. The hole generation is only needed is the wall end object cuts into the wall.

The 3D coordinate system is set this way:

3D coordinate system

ArchiCAD doesn't move this coordinate system if the Fit to wall height checkbox (AC_fit_to_wall_height parameter) is checked, so a typical 3D script begins with the following:

elevation = 0 if AC_fit_to_wall_height > EPS then ZZYZX = WALL_HEIGHT elevation = -GLOB_ELEVATION endif addz elevation

For either the gerenation of the hole and the generation of the body the SkinRect macro can be used.

Place hotspots

The bounding hotspots can be generated using the Resize Wall End macro. If more hotspots are needed, you can use a subroutine for the placing very similar to the 2D one:

! ===== move the coorinate system to a given X coordinate ===== 1: additionIfMirr = 0 additionNotMirr = 0 if innerRadius > EPS then if onWallBeg < EPS then addy -innerRadius rotz -(xMoveTo / (innerRadius + WALL_THICKNESS/2)) / PI*180 addy innerRadius else addy innerRadius + WALL_THICKNESS rotz (xMoveTo / (innerRadius + WALL_THICKNESS/2)) / PI*180 addy -innerRadius - WALL_THICKNESS endif moveStepNum = 3 else if SYMB_MIRRORED then additionIfMirr = xMoveTo * tan(wallIncl) else additionNotMirr = xMoveTo * tan(wallIncl) endif addx xMoveTo moveStepNum = 1 endif return