- •Contents
- •General Overview
- •Starting Out
- •Scripting
- •Library Part Structure
- •Analyze, Deconstruct and Simplify
- •Elaboration
- •Entry Level
- •Intermediate Level
- •Advanced Level
- •Expert Level
- •3D Generation
- •The 3D Space
- •Coordinate Transformations
- •The GDL Interpreter
- •The GDL Script Analysis
- •GDL Syntax
- •Statements
- •Line
- •Label
- •Characters
- •Strings
- •Identifiers
- •Variables
- •Parameters
- •Simple Types
- •Derived Types
- •Coordinate Transformations
- •2D Transformations
- •3D Transformations
- •Managing the Transformation Stack
- •3D Shapes
- •Basic Shapes
- •BLOCK
- •BRICK
- •CYLIND
- •SPHERE
- •ELLIPS
- •CONE
- •PRISM
- •PRISM_
- •CPRISM_
- •BPRISM_
- •FPRISM_
- •HPRISM_
- •SPRISM_
- •SLAB
- •SLAB_
- •CSLAB_
- •CWALL_
- •BWALL_
- •XWALL_
- •XWALL_{2}
- •BEAM
- •CROOF_
- •MESH
- •ARMC
- •ARME
- •ELBOW
- •Planar Shapes in 3D
- •HOTSPOT
- •RECT
- •POLY
- •POLY_
- •PLANE
- •PLANE_
- •CIRCLE
- •Shapes Generated from Polylines
- •EXTRUDE
- •PYRAMID
- •REVOLVE
- •RULED
- •RULED{2}
- •SWEEP
- •TUBE
- •TUBEA
- •COONS
- •MASS
- •Elements for Visualization
- •LIGHT
- •PICTURE
- •3D Text Elements
- •TEXT
- •RICHTEXT
- •Primitive Elements
- •VERT
- •TEVE
- •VECT
- •EDGE
- •PGON
- •PIPG
- •COOR
- •BODY
- •BASE
- •Cutting in 3D
- •CUTPLANE
- •CUTPOLY
- •CUTPOLYA
- •CUTSHAPE
- •CUTFORM
- •Solid Geometry Commands
- •GROUP
- •ENDGROUP
- •ADDGROUP
- •SUBGROUP
- •ISECTGROUP
- •ISECTLINES
- •PLACEGROUP
- •KILLGROUP
- •SWEEPGROUP
- •Binary 3D
- •2D Shapes
- •Drawing Elements
- •HOTSPOT2
- •LINE2
- •RECT2
- •POLY2
- •POLY2_
- •POLY2_A
- •POLY2_B
- •POLY2_B{2}
- •POLY2_B{3}
- •CIRCLE2
- •SPLINE2
- •SPLINE2A
- •PICTURE2
- •PICTURE2{2}
- •Text Element
- •TEXT2
- •RICHTEXT2
- •Binary 2D
- •FRAGMENT2
- •FRAGMENT2
- •3D Projections in 2D
- •PROJECT2
- •PROJECT2{2}
- •PROJECT2{3}
- •Drawings in the List
- •DRAWING2
- •DRAWING3
- •DRAWING3{2}
- •DRAWING3{3}
- •Graphical Editing
- •Hotspot-based Editing Commands
- •HOTSPOT
- •HOTLINE2
- •HOTARC2
- •Status Codes
- •Status Code Syntax
- •Additional Status Codes
- •Previous part of the polyline: current position and tangent is defined
- •Segment by absolute endpoint
- •Segment by relative endpoint
- •Segment by length and direction
- •Tangential segment by length
- •Set start point
- •Close polyline
- •Set tangent
- •Set centerpoint
- •Tangential arc to endpoint
- •Tangential arc by radius and angle
- •Arc using centerpoint and point on the final radius
- •Arc using centerpoint and angle
- •Full circle using centerpoint and radius
- •Attributes
- •Directives
- •Directives for 3D and 2D Scripts
- •RADIUS
- •RESOL
- •TOLER
- •LINE_PROPERTY
- •[SET] STYLE
- •SET STYLE 0
- •Directives Used in 3D Scripts Only
- •MODEL
- •[SET] MATERIAL
- •SECT_FILL
- •SHADOW
- •Directives Used in 2D Scripts Only
- •DRAWINDEX
- •[SET] FILL
- •[SET] LINE_TYPE
- •Inline Attribute Definition
- •Materials
- •DEFINE MATERIAL
- •DEFINE MATERIAL BASED_ON
- •DEFINE TEXTURE
- •Fills
- •DEFINE FILL
- •DEFINE FILLA
- •DEFINE SYMBOL_FILL
- •DEFINE SOLID_FILL
- •DEFINE EMPTY_FILL
- •Line Types
- •DEFINE LINE_TYPE
- •DEFINE SYMBOL_LINE
- •Styles
- •DEFINE STYLE
- •DEFINE STYLE {2}
- •Paragraph
- •Textblock
- •Additional Data
- •External file dependence
- •Non-Geometric Scripts
- •The Properties Script
- •DATABASE_SET
- •DESCRIPTOR
- •REF DESCRIPTOR
- •COMPONENT
- •REF COMPONENT
- •BINARYPROP
- •SURFACE3D ( )
- •VOLUME3D ( )
- •POSITION
- •DRAWING
- •The Parameter Script
- •VALUES
- •PARAMETERS
- •LOCK
- •HIDEPARAMETER
- •The User Interface Script
- •UI_DIALOG
- •UI_PAGE
- •UI_CURRENT_PAGE
- •UI_BUTTON
- •UI_SEPARATOR
- •UI_GROUPBOX
- •UI_PICT
- •UI_STYLE
- •UI_OUTFIELD
- •UI_INFIELD
- •UI_INFIELD {2}
- •UI_INFIELD{3}
- •UI_TOOLTIP
- •Expressions and Functions
- •Expressions
- •VARDIM1(expr)
- •VARDIM2(expr)
- •Operators
- •Arithmetical Operators
- •Relational Operators
- •Boolean Operators
- •Functions
- •Arithmetical Functions
- •CEIL
- •ROUND_INT
- •Circular Functions
- •Transcendental Functions
- •Boolean Functions
- •Statistical Functions
- •Bit functions
- •BITTEST
- •BITSET
- •Special Functions
- •String Functions
- •SPLIT
- •STRLEN
- •STRSTR
- •STRSUB
- •Control Statements
- •Flow Control Statements
- •NEXT
- •GOTO
- •GOSUB
- •RETURN
- •END / EXIT
- •Parameter Buffer Manipulation
- •Macro Objects
- •The Output Statement
- •File Operations
- •OPEN
- •INPUT
- •VARTYPE
- •OUTPUT
- •CLOSE
- •Miscellaneous
- •Global Variables
- •General environment information
- •Story information
- •Fly-through information
- •General element parameters
- •Object, Lamp, Door, Window parameters
- •Object, Lamp parameters
- •Object, Lamp, Door, Window parameters - available for listing and labels only
- •Object, Lamp parameters - available for listing and labels only
- •Window, Door and Wall End parameters
- •Window, Door parameters - available for listing and labels only
- •Lamp parameters - available for listing and labels only
- •Label parameters
- •Wall parameters - available for Doors/Windows
- •Wall parameters - available for listing and labels only
- •Column parameters - available for listing and labels only
- •Beam parameters - available for listing and labels only
- •Slab parameters - available for listing and labels only
- •Roof parameters - available for listing and labels only
- •Fill parameters - available for listing and labels only
- •Mesh parameters - available for listing and labels only
- •Free users’ globals
- •Requests
- •REQUEST
- •Doors and Windows
- •General Guidelines
- •Creation of Door/Window Library Parts
- •3D related challanges
- •Rectangular Doors/Windows in Straight Walls
- •Non-Rectangular Doors/Windows in Straight Walls
- •WALLHOLE
- •WALLNICHE
- •Rectangular Doors/Windows in Curved Walls
- •Non-Rectangular Doors/Windows in Curved Walls
- •2D Related Challanges
- •Cutting custom wall opening
- •WALLHOLE2
- •WALLBLOCK2
- •WALLLINE2
- •WALLARC2
- •GDL Created from the Floor Plan
- •Keywords
- •Common Keywords
- •Reserved Keywords
- •3D Use Only
- •2D Use Only
- •Non-Geometric Scripts
- •Property Script
- •Parameter Script
- •Interface Script
- •Alphabetical List of Current GDL Keywords
- •Parameter Naming Convention
- •GDL Data I/O Add-On
- •Description of Database
- •Opening a Database
- •Reading Values from Database
- •Writing Values into Database
- •Closing Database
- •GDL DateTime Add-On
- •Opening Channel
- •Reading Information
- •Closing Channel
- •GDL File Manager I/O Add-On
- •Specifying Folder
- •Getting File/Folder Name
- •Finishing Folder Scanning
- •GDL Text I/O Add-On
- •Opening File
- •Reading Values
- •Writing Values
- •Closing File
- •Property GDL Add-On
- •OPEN
- •CLOSE
- •INPUT
- •OUTPUT
- •GDL XML Extension
- •Opening XML Document
- •Reading XML Document
- •Modifying XML Document
- •Index
- •Numerics
3D Shapes
PYRAMID
PYRAMID n, h, mask, x1, y1, s1, ... xn, yn, sn
Pyramid based on a polyline in the x-y plane. The peak of the pyramid is located at (0, 0, h). |
|
|
|
|
|
Z |
|
|
|
|
|
|
|
|
|
|
|
|
|
||
n: number of polyline nodes. |
|
|
|
|
|
|
|
|
|
|
mask: controls the existence of the bottom and (in the case of an open polyline) side polygon. |
|
|
|
|
|
|
|
|
|
|
si: status of the lateral edges. |
|
h |
|
|
|
|
|
|
||
Parameter restrictions: |
|
|
|
|
|
|
|
|
|
|
h > 0 and n > 2 |
|
|
|
|
|
|
|
|
|
|
Masking: |
|
|
|
|
|
|
|
|
Y |
|
|
|
|
|
|
|
|
|
|||
mask = j1 + 4*j3 + 16*j5 |
|
|
|
|
|
|
j3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
where j1, j3, j5 can be 0 or 1. |
X |
|
|
|
|
n |
1 |
j1 |
||
j1 |
(1): base surface is present. |
|
|
|
|
|
j5 |
|||
j3 |
(4): side (closing) surface is present. |
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
j5 |
(16): base edges are visible. |
|
|
|
|
|
|
|
|
|
Status values:
0:lateral edges starting from the node are all visible.
1:lateral edges starting from the node are used for showing the contour.
Additional status codes allow you to create segments and arcs in the planar polyline using special constraints.
See “Additional Status Codes” on page 141 for details.
ArchiCAD 11 GDL Reference Guide |
67 |
3D Shapes
Example:
PYRAMID 4, 1.5, 1+4+16, -2, -2, 0, -2, 2, 0, 2, 2, 0, 2, -2, 0
PYRAMID 4, 4, 21, -1, -1, 0, 1, -1, 0, 1, 1, 0, -1, 1, 0
ADDX -1.4
ADDY -1.4
GOSUB 100
ADDX 2.8
GOSUB 100
ADDY 2.8
GOSUB 100
ADDX -2.8
GOSUB 100 END
100:
PYRAMID 4, 1.5, 21, -0.25, -0.25, 0, 0.25, -0.25, 0, 0.25, 0.25, 0, -0.25, 0.25, 0
RETURN
68 |
ArchiCAD 11 GDL Reference Guide |
3D Shapes
REVOLVE
REVOLVE n, alpha, mask, x1, y1, s1, ... xn, yn, sn
Surface generated by rotating a polyline defined in the x-y plane around the x |
|
|
|
Z |
|
axis. |
|
|
|
|
|
n: number of polyline nodes. |
|
|
|
|
|
alpha: sweep angle in degrees. |
|
|
|
|
|
mask: controls the existence of the bottom, top and (in the case of alpha |
|
|
|
|
|
< 360°) side polygons. |
|
|
j1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
si: status of the latitudinal arcs. |
|
|
|
Y |
|
|
j4 |
n |
|||
Parameter restrictions: |
|
|
|
||
j6 |
|
|
|||
n >= 2 |
|
|
|||
|
|
|
|
|
|
yi >= 0.0 |
|
|
j3 |
j5 |
|
yi and yi + 1 (i.e., the y value of two neighboring nodes) cannot be zero |
|
alpha |
|
|
|
at the same time. |
|
|
|
||
|
j2 |
|
|
||
Masking: |
2 |
|
|
||
|
|
|
|
|
|
mask = j1 + 2*j2 + 4*j3 + 8*j4 + 16*j5 + 32*j6 + |
|
1 |
|
|
|
64*j7 |
|
|
|
|
|
where j1, j2, j3, j4, j5, j6, j7 can be 0 or 1. j1 (1): base surface is present.
j2 (2): top surface is present.
j3 (4): side surface is present at initial angle.
j4 (8): side surface is present at final angle.
j5 (16): edges on side surface at initial angle are visible. j6 (32): edges on side surface at final angle are visible.
j7 (64): cross-section edges are visible, surface is not smooth.
Status values:
0:latitudinal arcs starting from the node are all visible.
1:latitudinal arcs starting from the node are used for showing the contour.
ArchiCAD 11 GDL Reference Guide |
69 |
3D Shapes
2: when using ArchiCAD/ArchiFM or Z-buffer Rendering Engine and setting Smooth Surfaces, the latitudinal edge belonging to this point defines a break. This solution is equivalent to the definition of additional nodes. The calculation is performed by the compiler. With other rendering methods, it has the same effect as using 0.
Additional status codes allow you to create segments and arcs in the planar polyline using special constraints.
See “Additional Status Codes” on page 141 for details.
REVOLVE{2} n, alphaOffset, alpha, mask, siedMat, x1, y1, s1, mat1, ...xn, yn, sn, matn
Advanced version of REVOLVE, where the start angle and the face materials are conrolable. alphaOffset: sweep start angle
alpha: sweep angle length in degrees, may be negative sideMat: material of the closing faces
mati: material of the face generated from the i-th edge
Examples:
70 |
ArchiCAD 11 GDL Reference Guide |
3D Shapes
ROTY -90
REVOLVE 22, 360, 1+64, 0, 1.982, 0, 0.093, 2, 0, 0.144, 1.845, 0, 0.220, 1.701, 0, 0.318, 1.571, 0, 0.436, 1.459, 0, 0.617, 1.263, 0, 0.772, 1.045, 0, 0.896, 0.808, 0, 0.987, 0.557, 0, 1.044, 0.296, 0, 1.064, 0.030, 0, 1.167, 0.024, 0, 1.181, 0.056, 0, 1.205, 0.081, 0, 1.236, 0.096, 0, 1.270, 0.1, 0, 1.304, 0.092, 0, 1.333, 0.073, 0, 1.354, 0.045, 0, 1.364, 0.012, 0, 1.564, 0, 0
ArchiCAD 11 GDL Reference Guide |
71 |