Graphisoft®

Basic Library Version: 16

Windows and Doors in GDL

Index

  1. Introduction
  2. Review of requirements
  3. Positioning
  4. Usage of the Detail window
  5. Special issues

1. Introduction

The scripting of doors and windows has extreme importance since these objects are visualized far more times than any other object type. This implies increased quality and optimality requirements.

To fulfill these requirements the GDL programmer should follow all general instructions presented in the previous sections and he has to pick some more information.

2. Review of requirements

3. Positioning

There are general placing conventions for windows and doors. The library parts' coordinate system is in a special rotated position: the origin is placed in the bottom center of the wall opening, on the exterior side of the wall, and the x-y plane is vertical. Door/window zero level is on the external surface of the wall. What is outside of this is in the negative (-Z) range in 3D, and in the positive (+Y) range in 2D. A door is well defined if when inserting it in the wall, clicking to the right of the insertion point means that the door leaf is opening to the same side on the right. When a window is placed in the same way, the side that it is clicked to indicates the outer side.

The positioning of an opening can be one of 8 states. These are represented by three global variables in GDL:

Usually each part of the window should react in a different way to these conditions. The specification must be clear on deciding how the parts of the object should, or should not, react to these conditions. E.g. a door leaf moves with this transformations, but the cavity closure does not. To keep the library part consistent, several transformations should be used for these combinations.

Illustration of the 8 states with a simplified door - the little circle flags the origin.

Demonstration of the geometrical placements
Global variables Example drawing
WIDO_REVEAL_SIDE = 0
SYMB_MIRRORED = 0
SYMB_ROTANGLE = 0
to left on the ref.side
WIDO_REVEAL_SIDE = 0
SYMB_MIRRORED = 1
SYMB_ROTANGLE = 0
to right on the ref.side
WIDO_REVEAL_SIDE = 1
SYMB_MIRRORED = 0
SYMB_ROTANGLE = 180
to right on the opp.side
WIDO_REVEAL_SIDE = 1
SYMB_MIRRORED = 1
SYMB_ROTANGLE = 180
to left on the opp.side
WIDO_REVEAL_SIDE = 1
SYMB_MIRRORED = 0
SYMB_ROTANGLE = 0
to right on the opp.side
WIDO_REVEAL_SIDE = 1
SYMB_MIRRORED = 1
SYMB_ROTANGLE = 0
to left on the opp.side
WIDO_REVEAL_SIDE = 0
SYMB_MIRRORED = 0
SYMB_ROTANGLE = 180
to left on the ref.side
WIDO_REVEAL_SIDE = 0
SYMB_MIRRORED = 1
SYMB_ROTANGLE = 180
to right on the ref.side

Sample code undoing the automatic transformations done by ArchiCAD:

! 2D script bRotated = round_int (SYMB_ROTANGLE) = 180 if bRotated then rot2 180 endif if SYMB_MIRRORED then mul2 -1, 1 endif if WIDO_REVEAL_SIDE exor bRotated then add2 0, WALL_THICKNESS endif

! 3D script bRotated = round_int (SYMB_ROTANGLE) = 180 if bRotated then roty 180 endif if SYMB_MIRRORED then mulx -1 endif if WIDO_REVEAL_SIDE exor bRotated then addz -WALL_THICKNESS endif

Note that though flipping and mirroring is possible for all doors and windows, it is incorrect in manufacturer libraries where a library part models a real window - which, of course, cannot be turned inside out. In this case the script should undo the mirroring done by ArchiCAD.

4. Usage of the Detail window

Details Dialog of a Sample Window object

General information

The edit boxes accept only 256 characters. This can be circumvented using a parameter here which gets its value in the parameter script.

These edit boxes represent one GDL code line. This implies the following:

Nominal frame thickness

This value is used in the following contexts:

Parapet wall inset

The value set here will define the behavior of the zone fill when the 'Update zones' option is activated.

-1
It will have no effect on zones
(WIDO_REVEAL_SIDE * (WALL_THICKNESS - WIDO_SILL - WIDO_FRAME_THICKNESS) + not(WIDO_REVEAL_SIDE) * WIDO_SILL) * (2 * (abs(GLOB_ELEVATION) < 0.0001) - 1)
The zone will show up on both sides of the frame (see picture below), even in the case of flipping. For windows, it can be used when they are inserted in the wall without any parapet height (GLOB_ELEVATION = 0).

Oversizing

The oversize values have an effect on the size of the rectangular holes cut in the containing wall automatically by ArchiCAD for doors/windows. It can be used, for example, for placing a sunshade's box above the window; using scripted jambs instead of ArchiCAD jambs and so on. These values must be carefully designed during the specification phase to have a satisfactory result.

5. Special issues

Special opening shapes in section

When special shaped openings are requested try to avoid using filling bodies; use wallhole and wallniche commands instead. Using these, you should be able to crate any wall opening and delve shape.

If you still need a filling body, mind the following:

Building a special window you cannot use the macros contained in the Basic Library, you have to model your own trim or shading devices. Doing this pay extra attention to correct segmentation and positioning.

Scripted reveal in plan view

A scripted reveal is needed when the one created by Archicad doesn't fulfill the needs. This way this functionality is an option of the library part in a parameterized form. This may be needed, for example, when the specification orders to omit the jamb in 1:100 scale. The scripted reveal must function for composite wall structures as well, and must react correctly to all positioning - even asymmetric - cases, both in 2D and 3D.

You have two main choices for the user interface:

In both cases you have to hide the reveals placed by Archicad. In 3D it can be simply done by using a proper wall niche command, in 2D by calling wallhole2 and wallblock2.

The CavityClosure macro of the Basic Library is implemented according these quidelines.

Composite windows and doors

A window or door consists of many standard elements, like trim, shutter, sill, board, treshold, shading device, frame, sash, etc. The models and control logics of them may not be coded in all openings.

For structures built in the window, you should write a macro and use it in each window/door of your library. You can use the macro set of the Basic Library, too. This solution is needed when there is interaction between the window panel and the special structure - this is the typical case.

For elements which are not in close interaction with the window, you can write an independent object which can be placed on the according point of the opening by the user. F.ex.: shaders, separator columns for window stacking.

For customizable parts consider using the Custom Component Addon, which is shipped wich Archicad.

Preparing for automatic dimensions

You surely want your window and door objects to be dimensioned by Automatic Dimensions and by Interactive Schedule. To achieve this, the object must have hotspots in definite positions.

If you would like to have a dimension on nominal width and height, the object must have 4 hotspots in a vertical plane, with distance A horizontally and B vertically. These hotspots must have own unique IDs. These IDs shouldn't change when you change the scale or anything. This nominal sizing works with the default hotspot provided by ArchiCAD also.

If you would like to dimension the reveal, wallhole or unit width/height, you need more hotspots with the distance "ac_reveal_width", "ac_reveal_height" or "ac_wallhole_width", "ac_wallhole_height" or "ac_unit_width", "ac_unit_height".

In case your major concern are the dimension lines in the schedule, you can omit these hotspots depending on the GLOB_CONTEXT global. Its value is 6 for scheduling and listing. Interactive Schedule sets the - usually hidden - bShowAddHotspotsForIS parameter to 1 in the LibraryGlobal settings objects in case there is one and it has such a parameters. It can be used for the exact identification of the IS situation. See Library Global View Options section of the Technical Standards for details about Library Globals.