| Basic Library Version: 9 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Shutter Macro1. General DescriptionA window can use this macro to draw Shutter in 2D and 3D. The macro can manage the different kind of walls, eg. staright and curved walls. 2. ParametersThis macro has similar input parameters as a normal ArchiCAD window:
Geometry parameters of ShutterTo clear the meanings of the geometry specific parameters used in Shutter macro, see the following pictures:
Shutter panel shape and styleThere are two shapes and seven available shutter styles and the undisplayed state. Shapes
Styles
Level of Detail in 2DThere are two level of detail programmed into the macro.
2D RepresentationThe following pictures are helps to understand the meanings of 2D attribute parameters.
3. UsageMaster ScriptThe window have to define the string tables for the gs_window_shutter, gs_shutter_type and gs_shutter_pos parameters. dim stShutterStyle[] stShutterStyle[1] = `Off` stShutterStyle[2] = `Style 1` stShutterStyle[3] = `Style 2` stShutterStyle[4] = `Style 3` stShutterStyle[5] = `Style 4` stShutterStyle[6] = `Style 5` stShutterStyle[7] = `Style 6` stShutterStyle[8] = `Style 7` dim stShutterType[] stShutterType[1] = `Decorative` stShutterType[2] = `Functional` dim stShutterPos[] stShutterPos[1] = `Both Sides` stShutterPos[2] = `Right Side` stShutterPos[3] = `Left Side` For calling this macro from the 2D and 3D script, you have to identify what are the indices of the selected items, in case of the gs_window_shutter, gs_shutter_type and gs_shutter_pos parameters.
! ===== Array index definitions =====
for i=1 to vardim1(stShutterStyle)
if stShutterStyle[i] = gs_window_shutter then
iShutterStyle = i
goto 50
endif
next i
50:
for i=1 to vardim1(stShutterType)
if stShutterType[i] = gs_shutter_type then
iShutterType = i
goto 60
endif
next i
60:
for i=1 to vardim1(stShutterPos)
if stShutterPos[i] = gs_shutter_pos then
iShutterPos = i
goto 70
endif
next i
70:
Parameter ScriptFor implementing the parameter logic of the Shutter, you have to call this macro with passing the following parameters to it. ! ===== Do Shutter Parameter Logic ===== call "Shutter" parameters A = A, isWindow = 1, gs_shutter_type = gs_shutter_type, gs_shutter_pos = gs_shutter_pos, gs_shut_stile_width = gs_frame_width, ! --- Trim 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_thk = gs_trim_thk, gs_trim_thk_out = gs_trim_thk_out, ! --- Corner Window Function --- ac_cw_function = ac_cw_function, ac_corner_window = ac_corner_window, ! --- Stacked Window gs_stack_left = gs_stack_left, gs_stack_right = gs_stack_right, ! --- String Tables --- stShutterStyle = stShutterStyle, stShutterType = stShutterType, stShutterPos = stShutterPos 2D ScriptIn the 2D Script the window have to contains the following codes. It have to empty the transformation stack befor calling this macro (eg. with a del top command) ! ===== Draw Shutter ===== if iShutterStyle <> 1 then call "Shutter" parameters A = A, offsX = 0, iShutterStyle = iShutterStyle, iShutterType = iShutterType, iShutterPos = iShutterPos, gs_shutter_width = gs_shutter_width, gs_shutter_thk = 1 3/4", gs_shut_open = gs_shut_open, ! --- Trim 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_thk = gs_trim_thk, gs_trim_thk_out = gs_trim_thk_out, ! --- Oversize --- gs_left_oversize = gs_left_oversize, gs_right_oversize = gs_right_oversize, ! --- Corner Window Function --- ac_cw_function = ac_cw_function, ac_corner_window = ac_corner_window, ! --- 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_shutter_fill = emptyFill, gs_shutter_fill_pen_fg = 0, gs_shutter_fill_pen_bg = GLOB_DRAWING_BGD_PEN endif 3D ScriptIn this script the window have to contains the following codes. It have to empty the transformation stack befor calling this macro (eg. with a del top command) ! ===== Draw Shutter ===== if iShutterStyle <> 1 then call "Shutter" parameters A = A, B = B, offsX = 0, offsY = 0, iShutterStyle = iShutterStyle, iShutterType = iShutterType, iShutterPos = iShutterPos, iShutterShape = 1, gs_shutter_width = gs_shutter_width, gs_shutter_thk = 1 3/4", gs_shut_louver_width = 2", gs_shut_louver_thk = 3/8", gs_shut_open = gs_shut_open, gs_shut_stile_width = gs_frame_width, gs_shut_bottom_rail_width = gs_frame_width, gs_shut_top_rail_width = gs_frame_width, ! --- Trim 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_thk = gs_trim_thk, gs_trim_thk_out = gs_trim_thk_out, ! --- Sill Parameters iSill = iSill, iSillType = iSillType, gs_sill_oversize = gs_sill_oversize, gs_sill_thk = gs_sill_thk, gs_board_thk = gs_board_thk, ! --- Oversize gs_left_oversize = gs_left_oversize, gs_right_oversize = gs_right_oversize, ! --- Corner Window Function --- ac_cw_function = ac_cw_function, ac_corner_window = ac_corner_window, ! --- Stacked Window gs_stack_left = gs_stack_left, gs_stack_right = gs_stack_right, gs_stack_top = gs_stack_top, gs_stack_bottom = gs_stack_bottom, ! --- 2D Representation gs_pen_2D = gs_pen_2D, gs_shutter_fill = emptyFill, gs_shutter_fill_pen_fg = 0, gs_shutter_fill_pen_bg = GLOB_DRAWING_BGD_PEN, ! --- 3D Representation lod3D = lod3D, gs_frame_pen = gs_frame_pen, gs_resol = res, ! --- Materials gs_shut_frame_mat = gs_shut_frame_mat, gs_shut_fill_mat = gs_shut_fill_mat endif |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
Copyright © 2004 - Graphisoft R&D Software
Development Rt. All rights reserved worldwide. |