Door Threshold and Trim Macro
1. General Description
A door object can use this macro to draw its threshold and trims in 2D or 3D in ArchiCAD.
The macro can manage the different kind of walls, eg. staright, trapezoid and curved walls.
2. Parameters
This macro has similar input parameters as a normal ArchiCAD window:
| Name |
Type |
Default |
Scripts related to the parameter |
Remarks |
| A |
Length |
1 |
2D / 3D |
Nominal width of the wall opening |
| B |
Length |
1 |
3D |
Nominal height of the wall opening |
| ZZYZX |
Length |
1 |
- |
Not used |
| AC_show2DHotspotsIn3D |
Boolean |
0 |
- |
Not used |
| origA |
Length |
0 |
|
"Original X Dimension" |
| offsX |
Length |
0 |
2D / 3D |
Horizontal coordinate offset length |
| offsY |
Length |
0 |
3D |
Vertical coordinate offset length |
| bOpeningDir |
Boolean |
0 |
2D / 3D |
Opening Direction
|
| gs_nominal |
Boolean |
1 |
2D / 3D |
Identifies the method as the macro handles the nominal opening sizes |
| iWindowShape |
Integer |
0 |
3D |
Shape of the door
| 0 |
 |
| 1 |
 |
|
| archHeight |
Length |
0.25 |
|
Height of the Arc. Only effective when iWindowShape = 1 |
| nArchResolution |
Integer |
0 |
3D |
Arc resolution for arched doors |
| gs_door_frame |
Title |
--- |
|
Door Frame |
| iFrameStyle |
Integer |
1 |
2D / 3D |
Style of the Frame.
Because the Threshold corelates with the Frame. |
| gs_frame_wthk |
Boolean |
1 |
2D / 3D |
Is the thickness of the Frame equals with the Wall thicknes |
| gs_fthk |
Length |
0.1 |
2D / 3D |
Frame Thickness |
| gs_frame_thkin |
Length |
0.1 |
2D / 3D |
Frame Thickness Inside |
| gs_frame_width |
Length |
0.05 |
2D / 3D |
Frame Width |
| gs_ds_thk |
Length |
0.05 |
2D / 3D |
Door Stop Thickness |
| gs_ds_w |
Length |
0.025 |
2D / 3D |
Door Stop Width |
| gs_relate_w_m |
Length |
0.012 |
2D / 3D |
Relate Width |
| gs_door_oversize |
Title |
--- |
|
Oversize |
| gs_left_oversize |
Length |
0 |
2D / 3D |
Left Opening Oversize |
| gs_right_oversize |
Length |
0 |
2D / 3D |
Right Opening Oversize |
| gs_upper_oversize |
Length |
0 |
3D |
Upper Opening Oversize |
| gs_lower_oversize |
Length |
0 |
3D |
Lower Opening Oversize |
| gs_door_panel |
Title |
--- |
|
Door Panel |
| gs_door_num_m |
Integer |
0 |
2D / 3D |
Leaf No. |
| gs_leaf_thk |
Length |
0 |
2D / 3D |
Leaf Thickness |
| gs_sidelight |
Title |
--- |
|
Sidelight |
| gs_sidelight_n_m |
Integer |
0 |
2D / 3D |
Sidelight No. |
| gs_sl_w |
Length |
0.3 |
2D / 3D |
Sidelight Width |
| gs_door_trim |
String |
"Off" |
|
Trim side chooser |
| iTrim |
Integer |
1 |
2D / 3D |
Identifies the Trims to be drawn on the window sides
| 1 |
Off |
| 2 |
Inside |
| 3 |
Outside |
| 4 |
Both Sides |
|
| gs_trim_oversize |
Boolean |
0 |
2D / 3D / Parameter |
Identifies the method as the macro handles the nominal opening sizes when Trims
are turned on.
| 0 |
Nominal opening sizes are measured between wallholes. |
| 1 |
Nominal opening sizes are measured between the inner faces of the Trims. |
|
| gs_trim_width |
Length |
0 |
2D / 3D / Parameter |
Width of the jamb extensions. If it's value is not 0, then gs_trim_width
define the width of trims on each sides, instead of gs_trim_width_in
and gs_trim_width_out.
| 0 |
The width of the trims are defined separately on each sides
(gs_trim_width_in,
gs_trim_width_out)
|
| <> 0 |
The width of the trims are defined with this parameter, they are equals on both
sides. |
|
| gs_trim_width_in |
Length |
0.025 |
2D / 3D / Parameter |
Width of the interior jamb extensions. |
| gs_trim_width_out |
Length |
0.015 |
2D / 3D / Parameter |
Width of the exterior jamb extensions. |
| gs_trim_offs |
Length |
0 |
|
"Trim Offset" |
| gs_trim_offset |
Length |
0 |
2D / 3D / Parameter |
Trim Offset. If it's value is not 0, then gs_trim_offs define the offset of
trims on each sides, instead of gs_trim_offs_in
and gs_trim_offs_out.
| 0 |
The offset of the trims are defined separately on each sides
(gs_trim_offs_in,
gs_trim_offs_out)
|
| <> 0 |
The offset of the trims are defined with this parameter, they are equals on
both sides. |
|
| gs_trim_offs_in |
Length |
0.01 |
2D / 3D / Parameter |
Trim Offset Inside |
| gs_trim_offs_out |
Length |
0.01 |
2D / 3D / Parameter |
Trim Offset Outside |
| gs_trim_thk_frame |
Length |
0.025 |
2D / 3D / Parameter |
Trim Thickness in case of gs_frame_wthk = 1 |
| gs_trim_thk |
Length |
0 |
2D / 3D / Parameter |
Thickness of the casing. If it's value is not 0, then gs_trim_thk define
the thickness of trims on each sides, instead of gs_trim_thk_in
and gs_trim_thk_out.
| 0 |
The thickness of the trims are defined separately on each sides
(gs_trim_thk_in,
gs_trim_thk_out)
|
| <> 0 |
The thickness of the trims are defined with this parameter, they are equals on
both sides. |
|
| gs_trim_thk_in |
Length |
0.025 |
2D / 3D / Parameter |
Thickness of the interior casing |
| gs_trim_thk_out |
Length |
0.02 |
2D / 3D / Parameter |
Thickness of the exterior casing |
| gs_tw_left_in |
Length |
0.05 |
2D / 3D / Parameter |
Width of the interior casing on the left side. |
| gs_tw_right_in |
Length |
0.15 |
2D / 3D / Parameter |
Width of the interior casing on the right side. |
| gs_tw_top_in |
Length |
0 |
3D |
Width of the interior head casing. |
| gs_tw_bottom_in |
Length |
0 |
3D |
Width of the interior casing on the bottom side. |
| gs_tw_left_out |
Length |
0.1 |
2D / 3D / Parameter |
Width of the exterior casing on the left side. |
| gs_tw_right_out |
Length |
0.05 |
2D / 3D / Parameter |
Width of the exterior casing on the right side. |
| gs_tw_top_out |
Length |
0 |
3D |
Width of the exterior head casing. |
| gs_tw_bottom_out |
Length |
0 |
3D |
Width of the exterior casing on the bottom side. |
| bShowTrimInsideSplice |
Boolean |
0 |
3D |
Show or hide inside Trim's splice lines. |
| bShowTrimOutsideSplice |
Boolean |
0 |
3D |
Show or hide outside Trim's splice lines. |
| bShowJambExtension |
Boolean |
1 |
2D / 3D |
Show Jamb Extensions |
| bMergeJambExtensions |
Boolean |
0 |
2D / 3D |
Make the Inside- and the Outside Trims from one piece |
| gs_door_treshold |
String |
"" |
Parameter |
Threshold type chooser |
| iTreshold |
Integer |
1 |
2D / 3D / Parameter |
Threshold type
| 1 |
Off |
| 2 |
Normal Threshold |
| 3 |
Extended Threshold |
|
| gs_treshold_thk |
Length |
0.012 |
3D |
Threshold Thickness |
| gs_treshold_nosing |
Length |
0.025 |
2D / 3D |
Extended Threshold Nosing |
| gs_2D_representation |
Title |
--- |
|
2D Representation |
| lod2D |
Integer |
1 |
2D |
Level of Detail in 2D
| < 4 |
For scales 1:100 < |
| 4 |
For scales 1:99 - 1:50 |
|
| gs_pen_2D |
PenColor |
4 |
2D |
2D Contour Pen |
| gs_open_2D |
Angle |
90 |
2D |
Door Opening Angle in 2D |
| gs_trim_pen_cont |
PenColor |
0 |
2D, 3D (Section View) |
Trim Contour Pen - If it is zero in 2D then gs_pen_2D
defines the cut contour pen.
If it is zero in 3D (Section View) then SYMB_SECT_PEN defines the
cut contour pen.
|
| gs_wcont_line |
Text |
Off |
Parameter |
Wall Contour Line |
| iWallContourLine |
Integer |
0 |
2D |
Wall Contour Line |
| gs_wcont_line_in |
LineType |
4 |
2D |
Wall Contour Line Type Inside |
| gs_wcont_line_out |
LineType |
4 |
2D |
Wall Contour Line Type Outside |
| gs_wallhole_fill |
FillPattern |
0 |
2D |
Wallhole Fill Type |
| gs_wallhole_pen_fg |
PenColor |
0 |
2D |
Walhole Fill Pen |
| gs_wallhole_pen_bg |
PenColor |
92 |
2D |
Walhole Fill Background Pen |
| gs_treshold_fill |
FillPattern |
1 |
3D (Section View) |
Threshold Fill Type - If it is zero in 3D (Section View) then SYMB_FILL
defines the fill type of cut surfaces. |
| gs_treshold_pen_fg |
PenColor |
0 |
3D (Section View) |
Threshold Fill Pen - If it is zero in 3D (Section View) then SYMB_FILL_PEN
defines the fill pen of cut surfaces. |
| gs_treshold_pen_bg |
PenColor |
92 |
3D (Section View) |
Threshold Fill Background Pen - If it is zero in 3D (Section View) then SYMB_FBGD_PEN
defines the fill background pen of cut surfaces. |
| gs_trim_fill_in |
FillPattern |
5 |
2D / 3D (Section View) |
Trim Fill Type Inside - If it is zero in 3D (Section View) then SYMB_FILL
defines the fill type of cut surfaces. |
| gs_trim_pen_fg_in |
PenColor |
7 |
2D / 3D (Section View) |
Trim Fill Pen Inside - If it is zero in 3D (Section View) then SYMB_FILL_PEN
defines the fill pen of cut surfaces. |
| gs_trim_pen_bg_in |
PenColor |
39 |
2D / 3D (Section View) |
Trim Fill Background Pen Inside - If it is zero in 3D (Section View) then SYMB_FBGD_PEN
defines the fill background pen of cut surfaces. |
| gs_trim_fill_out |
FillPattern |
26 |
2D / 3D (Section View) |
Trim Fill Type Outside - If it is zero in 3D (Section View) then SYMB_FILL
defines the fill type of cut surfaces. |
| gs_trim_pen_fg_out |
PenColor |
4 |
2D / 3D (Section View) |
Trim Fill Pen Outside - If it is zero in 3D (Section View) then SYMB_FILL_PEN
defines the fill pen of cut surfaces. |
| gs_trim_pen_bg_out |
PenColor |
59 |
2D / 3D (Section View) |
Trim Fill Background Pen Outside - If it is zero in 3D (Section View) then SYMB_FBGD_PEN
defines the fill background pen of cut surfaces. |
| gs_fillFr |
FillPattern |
0 |
2D / 3D (Section View) |
Frame Fill Type.
It's used to the Jamb Extensions when bMergeJambExtensions = 1 |
| gs_penFr_fg |
PenColor |
0 |
2D / 3D (Section View) |
Frame Fill Pen
It's used to the Jamb Extensions when bMergeJambExtensions = 1 |
| gs_penFr_bg |
PenColor |
0 |
2D / 3D (Section View) |
Frame Fill Background Pen
It's used to fill the Jamb Extensions when bMergeJambExtensions = 1 |
| gs_3D_representation |
Title |
--- |
|
3D Representation |
| lod3D |
Integer |
1 |
3D |
Level of Detail in 3D - not used |
| gs_frame_pen |
PenColor |
2 |
3D |
Frame Pen |
| gs_window_material |
Title |
--- |
|
Materials |
| gs_trim_in_mat |
Material |
0 |
3D |
Interior Trim Material |
| gs_trim_out_mat |
Material |
0 |
3D |
Exterior Trim Material |
| gs_frame_mat |
Material |
15 |
3D |
Maretial of Jamb Extensions when bMergeJambExtensions = 1 |
| gs_treshold_mat |
Material |
0 |
3D |
Threshold Material |
| ac_details |
Title |
--- |
|
AC Details |
| ac_left_oversize |
Length |
0 |
2D / 3D |
Wallhole oversize on the left side |
| ac_right_oversize |
Length |
0 |
2D / 3D |
Wallhole oversize on the right side |
| ac_upper_oversize |
Length |
0 |
2D / 3D |
Wallhole oversize on the upper side |
| gs_window_stack |
Title |
--- |
|
Doors can be combined to form a large units. In this case the following
parameters allows the user to turn off generating Trim, Sill and Board elements
on the related sides
|
| gs_stack_left |
Boolean |
0 |
2D |
Connection on the Left |
| gs_stack_right |
Boolean |
0 |
2D |
Connection on the Right |
| gs_stack_top |
Boolean |
0 |
2D / 3D |
Connection on the Top |
| stTrim |
String |
|
Parameter |
One dimension Array parameter for receiving value list of gs_door_trim |
| stDoorTreshold |
String |
|
Parameter |
One dimension Array parameter for receiving value list of gs_door_treshold |
| stWallContourLine |
String |
|
Parameter |
One dimension Array parameter for receiving value list of gs_wcont_line |
Geometry parameters of Threshold and Trims
To clear the meanings of the geometry specific parameters used in
DoorThresholdTrim macro, see the following pictures:
Level of Detail in 2D
There are two level of detail programmed into the macro.
2D Representation
The following pictures are helps to understand the meanings of 2D attribute
parameters.
3. Usage
Master Script
The door have to define the string tables for the gs_door_trim and
gs_door_treshold parameters.
dim stTrim[]
stTrim[1] = `Off`
stTrim[2] = `Inside`
stTrim[3] = `Outside`
stTrim[4] = `Both Sides`
dim stDoorTreshold[]
stDoorTreshold[1] = `Off`
stDoorTreshold[2] = `Normal Threshold`
stDoorTreshold[3] = `Extended Threshold`
dim stFramestyle[]
stFrameStyle[1] = `Style 1`
stFrameStyle[2] = `Style 2`
stFrameStyle[3] = `Style 3`
dim stWallContourLine[]
stWallContourLine[1] = `Off`
stWallContourLine[2] = `Inside`
stWallContourLine[3] = `Outside`
stWallContourLine[4] = `Both Sides`
For calling this macro from the 2D and 3D script,
it have to identify what are the index of the selected items, in case of the gs_door_trim,
gs_door_treshold and gs_frame_styleparameters.
! ===== Array index definitions =====
for i=1 to vardim1(stTrim)
if stTrim[i] = gs_door_trim then
iTrim = i
goto 10
endif
next i
10:
for i=1 to vardim1(stDoorTreshold)
if stDoorTreshold[i] = gs_door_treshold then
iTreshold = i
goto 20
endif
next i
20:
for i=1 to vardim1(stFrameStyle)
if stFrameStyle[i] = gs_frame_style then
iFrameStyle = i
goto 30
endif
next i
30:
Parameter Script
For implementing the parameter logic of the Trims, Sill and Board, you have to
call this macro with passing the following parameters to it.
! ===== Do Trim and Threshold Parameter Logic =====
call "DoorTresholdTrim" parameters gs_IsCurved = 0,
iWindowShape = 1,
gs_frame_width = gs_frame_width,
! --- Trim ---
gs_door_trim = gs_door_trim,
gs_trim_oversize = gs_trim_oversize,
gs_trim_width = gs_trim_width,
gs_trim_width_in = gs_trim_width_in,
gs_trim_width_out = gs_trim_width_out,
gs_trim_offs = gs_trim_offset,
gs_trim_offs_in = gs_trim_offs_in,
gs_trim_offs_out = gs_trim_offs_out,
gs_trim_thk = 0,
gs_trim_thk_in = gs_trim_thk_in,
gs_trim_thk_out = gs_trim_thk_out,
gs_tw_left_in = gs_tw_left_in,
gs_tw_right_in = gs_tw_right_in,
gs_tw_left_out = gs_tw_left_out,
gs_tw_right_out = gs_tw_right_out,
! --- Threshold
gs_door_treshold = gs_door_treshold,
! --- Stacked Window
gs_stack_left = gs_stack_left,
gs_stack_right = gs_stack_right,
gs_stack_top = gs_stack_top,
! --- 2D Representation
gs_wcont_line = gs_wcont_line,
! --- String Tables
stTrim = stTrim,
stDoorTreshold = stDoorTreshold,
stWallContourLine = stWallContourLine
2D Script
In the 2D Script the door have to contains the following codes.
It have to empty the transformation stack befor calling this macro
(eg. with a del top command)
for i=1 to vardim1(stWallContourLine)
if stWallContourLine[i] = gs_wcont_line then
iWallContourLine = i
goto 100
endif
next i
100:
! ===== Draw Trim and Threshold =====
call "DoorTresholdTrim" parameters A = A,
origA = A,
offsX = 0,
gs_IsCurved = gs_IsCurved,
bOpeningDir = 0,
gs_nominal = gs_nominal,
! --- Door Frame
iFrameStyle = iFrameStyle,
gs_frame_wthk = gs_frame_wthk,
gs_fthk = gs_fthk,
gs_frame_thkin = gs_frame_thkin,
gs_frame_width = gs_frame_width,
gs_ds_thk = gs_ds_thk,
gs_ds_w = gs_ds_w,
gs_relate_w_m = gs_relate_w_m,
! --- Door Leaf
gs_door_num_m = gs_door_num_m,
gs_leaf_thk = gs_leaf_thk,
! --- Sidelight
gs_sidelight_n_m = gs_sidelight_n_m,
gs_sl_w = gs_sl_w,
! --- Trim Parameters
iTrim = iTrim,
gs_trim_oversize = gs_trim_oversize,
gs_trim_width = gs_trim_width,
gs_trim_width_in = gs_trim_width_in,
gs_trim_width_out = gs_trim_width_out,
gs_trim_offs = gs_trim_offset,
gs_trim_offs_in = gs_trim_offs_in,
gs_trim_offs_out = gs_trim_offs_out,
gs_trim_thk_frame = gs_trim_thk_frame,
gs_trim_thk = 0,
gs_trim_thk_in = gs_trim_thk_in,
gs_trim_thk_out = gs_trim_thk_out,
gs_tw_left_in = gs_tw_left_in,
gs_tw_right_in = gs_tw_right_in,
gs_tw_left_out = gs_tw_left_out,
gs_tw_right_out = gs_tw_right_out,
bShowJambExtension = 1,
bMergeJambExtensions = 1,
! --- Threshold
iTreshold = iTreshold,
gs_treshold_nosing = gs_treshold_nosing,
! --- Stacked Window
gs_stack_left = gs_stack_left,
gs_stack_right = gs_stack_right,
! --- 2D Representation
lod2D = lod2D,
gs_pen_2D = gs_pen_2D,
gs_open_2D = gs_open_2D,
gs_trim_pen_cont = gs_trim_pen_cont,
gs_wallhole_fill = gs_wallhole_fill,
gs_wallhole_pen_fg = gs_wallhole_pen_fg,
gs_wallhole_pen_bg = gs_wallhole_pen_bg,
iWallContourLine = iWallContourLine,
gs_wcont_line_in = gs_wcont_line_in,
gs_wcont_line_out = gs_wcont_line_out,
gs_trim_pen_fg_in = gs_trim_pen_fg_in,
gs_trim_pen_bg_in = gs_trim_pen_bg_in,
gs_trim_fill_in = gs_trim_fill_in,
gs_trim_pen_fg_out = gs_trim_pen_fg_out,
gs_trim_pen_bg_out = gs_trim_pen_bg_out,
gs_trim_fill_out = gs_trim_fill_out,
gs_fillFr = gs_fillFr,
gs_penFr_fg = gs_penFr_fg,
gs_penFr_bg = gs_penFr_bg,
! --- Oversize
gs_left_oversize = gs_left_oversize,
gs_right_oversize = gs_right_oversize
3D Script
In this script the door have to contains the following codes.
It have to empty the transformation stack befor calling this macro
(eg. with a del top command)
! ===== Draw Trim and Threshold =====
call "DoorTresholdTrim" parameters A = A, B = B,
origA = A,
offsX = 0,
offsY = 0,
iWindowShape = 0,
archHeight = A / 2,
nArchResolution = 32,
gs_IsCurved = gs_IsCurved,
bOpeningDir = 0,
gs_nominal = gs_nominal,
! --- Door Frame
iFrameStyle = iFrameStyle,
gs_frame_wthk = gs_frame_wthk,
gs_fthk = gs_fthk,
gs_frame_thkin = gs_frame_thkin,
gs_frame_width = gs_frame_width,
gs_ds_thk = gs_ds_thk,
gs_ds_w = gs_ds_w,
gs_relate_w_m = gs_relate_w_m,
! --- Door Leaf
gs_door_num_m = gs_door_num_m,
gs_leaf_thk = gs_leaf_thk,
! --- Sidelight
gs_sidelight_n_m = gs_sidelight_n_m,
gs_sl_w = gs_sl_w,
! --- Trim Parameters
iTrim = iTrim,
gs_trim_oversize = gs_trim_oversize,
gs_trim_width = gs_trim_width,
gs_trim_width_in = gs_trim_width_in,
gs_trim_width_out = gs_trim_width_out,
gs_trim_offs = gs_trim_offset,
gs_trim_offs_in = gs_trim_offs_in,
gs_trim_offs_out = gs_trim_offs_out,
gs_trim_thk = 0,
gs_trim_thk_in = gs_trim_thk_in,
gs_trim_thk_out = gs_trim_thk_out,
gs_tw_left_in = gs_tw_left_in,
gs_tw_right_in = gs_tw_right_in,
gs_tw_top_in = gs_tw_top_in,
gs_tw_bottom_in = gs_tw_bottom_in,
gs_tw_left_out = gs_tw_left_out,
gs_tw_right_out = gs_tw_right_out,
gs_tw_top_out = gs_tw_top_out,
gs_tw_bottom_out = gs_tw_bottom_out,
bShowTrimInsideSplice = 0,
bShowTrimOutsideSplice = 0,
bShowJambExtension = 1,
bMergeJambExtensions = 1,
! --- Threshold
iTreshold = iTreshold,
gs_treshold_thk = gs_treshold_thk,
gs_treshold_nosing = gs_treshold_nosing,
! --- Stacked Window
gs_stack_left = gs_stack_left,
gs_stack_right = gs_stack_right,
gs_stack_top = gs_stack_top,
! --- 2D Representation
gs_trim_pen_cont = gs_trim_pen_cont,
gs_trim_fill_in = gs_trim_fill_in,
gs_trim_pen_bg_in = gs_trim_pen_bg_in,
gs_trim_pen_fg_in = gs_trim_pen_fg_in,
gs_trim_fill_out = gs_trim_fill_out,
gs_trim_pen_fg_out = gs_trim_pen_fg_out,
gs_trim_pen_bg_out = gs_trim_pen_bg_out,
gs_fillFr = gs_fillFr,
gs_penFr_fg = gs_penFr_fg,
gs_penFr_bg = gs_penFr_bg,
gs_treshold_fill = gs_treshold_fill,
gs_treshold_pen_fg = gs_treshold_pen_fg,
gs_treshold_pen_bg = gs_treshold_pen_bg,
! --- 3D Representation
lod3D = lod3D,
gs_frame_pen = gs_frame_pen,
! --- Materials
gs_trim_in_mat = gs_trim_in_mat,
gs_trim_out_mat = gs_trim_out_mat,
gs_frame_mat = gs_frame_mat,
gs_treshold_mat = gs_treshold_mat,
! --- Oversize
gs_left_oversize = gs_left_oversize,
gs_right_oversize = gs_right_oversize,
gs_upper_oversize = gs_upper_oversize
|