In this exercise, I am going to take a look at scripting from scratch. The object in this study is not anything that I would ever advocate using or making, but it does illustrate the ease of assembling simple geometries and linking them to length and distance parameters. This exercise also uses transformation stacks to position different elements correctly. Using these concepts, incorporated into modeled/saved geometries, you can create very flexible and adjustable objects. Incorporating some basic shapes into the script will tie it all together. This is a similar concept to what has already been covered in Selectively Adjustable Dimensions.
The only scripts used are BLOCK, ADD and DEL, and then some creative coordinate settings tied to the default A, B, ZZYZX (default distances/size) and an additional seatHeight parameter.
Step 1: Add a new parameter to script the seat height to. This is a length parameter, its variable will be seatHeight, its name will be Seat Height and its default value will be 1'-6". Lets also change the default values for A, B and ZZYZX to 2', 2' and 3'.
Fig. 1.0 New Length Parameter
Step 2: Now we only need to script a series of blocks and position them correctly, tying the size and/or position of each block to the correct size/length parameters.
Fig. 2.0a Seat Platform placed at seatHeight with ADDz, then create the geometry with the BLOCK command tied to the A/B lengths
Fig. 2.0b First piece of the seat frame is generated relative to the seatHeight, but subtract 3/4" for the difference in block dimension. Then ADDy for the width of the frame. The BLOCK is tied to only the A dimension, then the width and depth are given numeric values.
Fig. 2.0c Repeat the process for the next frame piece, but the ADDy adjusts to the depth of the seat by the A parameter
Fig. 2.0d Repeat again, this time adjusting the block to be 2" longer than the B parameter to overlap the previous frame elements. This will require an ADDx and ADDy to position correctly.
Fig. 2.0e The last piece of the seat frame is a simple block ADDx to shift to the A dimension and ADDy to adjust for the extra length (B+2")
Fig. 2.1 The seat legs have two different height parameters they will link to. The first two which create the seat back are tied to the ZZYZX parameter. The Second two are tied to the seatHeight +1.25" to extend to the height of the seat frame. this could be -1.75" if you wanted them to stop at the bottom of the 2" frame already scripted. Use appropriate ADDx and ADDy commands tied to the A/B where necessary and numeric values where already in the correct axis.
Fig. 2.2 The seat back is a fixed dimension, but an additional length parameter could be created for this. I started by generating the BLOCK, tying it to the chair width with the A parameter, then giving it a thickness of .5" and a height of 6". Next it was positioned with an ADDz, tying it to the ZZYZX, less the already scripted height of the block (6"). Including an ADDy -.75" places it near the center line of the 1.5" seat legs.