Smart Objects, In Depth

Introduction to Joinery

The main purpose to which attributes are put is to join two pieces together in a way which works correctly when you resize the group these pieces are contained in.

To illustrate how to join two pieces together, let's create a dado joint for a shelf let into the side of a bookshelf. To make things simple, our bookshelf will only have one left side and one shelf. Let's make these two pieces first, then join them together.

Begin with an empty drawing. Set the View to Front. Choose the Block creation tool and create a tall thin object. In the inspector window, change it's name to "left side" and type the Return key. Switch to the Right view and stretch it into a square. Switch back to the Front view. Choose the Block creation tool and create a flat wide piece. Name it "shelf."

If these instructions don't really help enough, try reading the Getting Started tutorial and then try this page from the top.

Okay, how do I join these two pieces together?

To do this we need to do two things:

  1. create two new authored attributes containing constants
  2. fiddle with some of the expressions (some of them will refer to these new authored attributes)

Step 1. Create the authored attributes

First we have to select the right object for these authored attributes to live in -- the group which contains the two pieces you want to join. To do this, select one of the pieces. Then, near the top of the Inspectors window, click on the popup menu labeled Out: and release the mouse button. This will select the containing group.

Click on the button a bit below this popup menu, the one labeled Add Authored Attribute to blah. This will switch the Inspector to the Attribute inspector. In the empty field just above this button, fill in a name. For our purposes, use the name DadoDepth and tap the Return key. In the text field inside the box labeled Value, type 3/8" and tap the Return key. In the Expression box, click on the button labeled Value. Finally, click on the unlocked padlock in the Value box. It will lock the Value of DadoDepth.

Add another authored attribute, and name it Thickness. Set its value to 3/4" and lock it and use the Value form for the Expression, as above.

Step 2. Modify some expressions

The illustration at right may be of some help to you as you read on. It was generated by Design Intuition. We added an invisible piece, that spans between the two left edges of left side and the shelf pieces, to show the expression for that gap.

Select the left side piece. It will be positioned on the left side of the bookshelf. To tell Design Intuition this, simply click on the row in the Object inspector labeled Left. Then switch to the Attribute inspector. In the Expression box, click on the button labeled Name. This will replace the expression with simply Left, which means the left side piece's left edge will be the group's left edge.

Now we want to set the thickness of this piece. Switch back to the Object inspector and select the row labeled Width. Switch back to the Attribute inspector and, in the Expressions box, erase the text fied and type Thickness. Notice that you only have to type the first few letters. Design Intuition has type-ahead. Type the Return key.

The left side piece is now done.

Select the shelf piece. It's left edge will be dadoed into the left side piece. To represent this, we will embed the shelf into the left side piece. To do this, switch to the Object inspector and select the row labeled Left. Switch to the Attribute inspector and, in the Expressions box, erase the text field and type Left + Thickness - DadoDepth. Notice, again, that you don't have to type more than the first few letters of each attribute name. Type the Return key. This expression will correctly embed the shelf piece into the side piece to a depth equal to DadoDepth.

Now we ought to fix the other two expressions in the same "axial triad" as Left -- Width and Right. Select Right in the Object inspector and switch to the Attributes inspector. Click on the Name button in the Expressions box, so that the right edge of the shelf will be the same as the right edge of the bookshelf. Later, we can add a right side and alter this expression, but this will do for now.

Select the Width in the Object inspector and switch to the Attributes inspector. Click on the Depend button in the Expressions box to make the Width depend on the Left and Right attribute of this same object. Notice that the Refers to Attributes in Object checkbox became unchecked.

Done

Notice that you can resize the bookshelf and the dado will remain in place, regardless of what size you choose.

 

Buy, now!