Basic Library Version: 9

WallLogic Macro

1. General Description

This macro is used to retrieve wall-type-independent information about transformations used by window panels assembled in the wall.

Trapeze wall

Trapeze wall

Curved wall

Curved wall

The macro returns some basic information on the top of the GDL stack in the following order:

Name Description Value in figure 1 Value in figure 2
xMul Multiplier for the x' axis to get the default direction rightwards (1 / -1). 1 1
yMul Multiplier for the y' axis to get the default direction upwards (1 / -1). -1 -1
isCurved Wall is straight (or trapeze) or curved (0 / 1). 0 1
isRefLeft Wall has left reference-side (0 / 1).
angleOrigin Rotation angle of the bottom left corner of the panel. 0 beta
innerRadius Inner radius of the wall (0 for non-curved walls). 0 R
x-Offset X offset of the bottom left corner. ofsX ofsX
y-Offset Y offset of the bottom left corner. ofsY ofsY

2. Parameters

The macro has the following input parameters:

Name Type Description
A Length Width of window panel.
WOD Length Origo distance of window panel.
EPS RealNum Tolerance value.

3. Usage

The macro works with window panels. It handles them as they were normal windows in a virtually smaller wall opening (see virtual wall segment faded out in the figure below). This example shows a window with two curved panels. As you can see, the OA distance is the original WIDO_ORIG_DIST value for the large opening. In case of the left panel, the macro gets this value in its WOD parameter. The A parameter contains the length of the window chord. These values will be used to calculate the desired window-relative transformation components (offsets and angles).

The returned innerRadius value for this panel is the length of the OB line, and the AOB-angle is the angleOrigin value. The x-Offset, y-Offset coordinates belong to the AB vector in the (x', y') Carthesian coordinate system. This vector is used in the main window to transform the local origin to the wall's corner (point B) before the left side CavityClosure macro call.
Note, that the left panel has (x, y) local coordinate axes, where the angle between the y and y' axes (the AOD angle) is exactly the half of the AOB angle which is returned by this macro.

Double window in curved wall

Let's explain the meanings of the returned parameters with the following example script. We transform the local origin from point A to point D (see figure above). This operation is required to draw the left side curved panel later with BasicWindowPanel as if it was an ordinary window:

WOD = abs(WIDO_ORIG_DIST)

call "WallLogic" PARAMETERS EPS = 0.0001,      ! tolerance
                            A   = SYMB_A_SIZE, ! total width (2 * CA dist.)
                            WOD = WOD

mul2 get (2)                   ! transform local coordinate system to x', y'

curvedWall = get (1)           ! retrieve wall type
wallIsLeft = get (1)           ! retrieve wall type

angOrig    = get (1)           ! retrieve AOB angle
inRadius   = get (1)           ! retrieve OB distance
ofsX       = get (1)           ! retrieve x' component of AB vector
ofsY       = get (1)           ! retrieve y' component of AB vector

if curvedWall then
    add2 ofsX, ofsY                            ! move from A to B
    rot2 angOrig
    add2 0, -inRadius                          ! move to O
    rot2 -angOrig / 2
    add2 0, WOD / cos (angOrig) * cos (angOrig / 2) ! move to D

    ! At this point the local coordinate system is in point D, as desired.

    del 5
endif

...

del 1

4. Remark

For more information about window panels, see BasicWindowPanel.

Copyright © 2004 - Graphisoft R&D Software Development Rt. All rights reserved worldwide.