MATE
A mate: where a part meets another, so that once made they can be put together on the 3D page: a lid on its box, a drawer in its sleeve, a laser-cut side on its base, a cabinet's back in its rebates. Draw the parts side by side on the same page (folded blanks, or solids: Assembling parts in 3D); each is made where it lies, and a part whose mate goes to another's is then put with it. To place a mate by clicking, use the Mate Tool.
Syntax
MATE @id,"name",point,height,angle,layer
MATE @id,"name",[first,second,third],layer
MATE @id,"name",point,height,angle,layer,TO "other",gap
MATE @id,"name",point,height,angle,layer,IN "other",gap
MATE @id,"name",point,height,angle,layer,IN "other",gap,TURN=angle,ALONG=distance,ACROSS=distance,STEP=n
| Argument | Meaning |
|---|---|
| "name" | Its name, for other mates to go to. |
| point | Where it is: a point on a panel, in the flat drawing. |
| height | How far above the panel it is, on the panel's inside (the side the box closes round): 0 on the panel, the depth of a box for its rim. On a solid (a board, a plate), how far above its underside, lying as drawn: T its top face. An expression, so it follows the sizes. |
| angle | The way it points, in degrees anticlockwise from the drawing's x axis: which way round the part goes. |
| [first,second,third] | Instead of a point, a height and an angle: three points on the panels. The first is where it is, the second the way it points, and its inside is the side the three run anticlockwise from (folded, the points can be on different panels: three corners of a rim). |
TO "other" |
Put this part with the other's: the two mates on each other, face to face, their insides facing (a lid on a box). |
IN "other" |
Put this part with the other's inside it: the two mates on each other, their insides the same way (a tray in a sleeve). |
| gap | How far apart the two mates are, along the other's inside: the board's thickness T, so the parts touch rather than overlap. Left out: 0. |
TURN=angle |
Then the part turned about the other mate's direction, in degrees: TURN=90 stands a side up on its base's edge. |
ALONG=distance |
Then moved along the other mate's direction. |
ACROSS=distance |
Then moved across it, to its left. |
STEP=n |
When it is put there: 1 first, then 2 … (the same step together); left out, a step of its own after those, in the drawing's order. |
The id, layer and any settings after it are the element settings. A mate is drawn as a small ring and arrow (three points: the triangle they make). It is never cut, creased or exported, and doesn't change the panels: put it on a layer that isn't cut (the Dimension layer, 8).
How the parts are put together
On the 3D page, the parts are made where they lie over the first four fifths of the slider (in the
fold order chosen), then each part with a TO or IN mate is put with the other, a step at a
time: up and round to just off its place (away from the other's inside; going IN without a turn, back along the
other's direction), then in. Play Steps plays each as a step. The Explode slider then draws the parts apart
(exploded view). The mates are shown in the 3D view as small arrows: red the way each points, blue its inside.
Each part is put with one other (its first mate with TO or IN); one part can be put with another that is itself
put with a third. A mate whose point isn't on a panel, that goes to a mate that isn't there, or to one on the same
part, is said on the 3D page, and left out. A mate for a part the drawing makes only sometimes (a shelf past the
number asked for, a base sheet of one build) is left out quietly by its rule, worked out from the variables:
RULE AS=NSH>=5?"":"NONE" leaves the fifth shelf's mate out when there are fewer than five.
Examples
MATE @20,"rim",P1,50,0,8
MATE @21,"corner",[P0,P1,P2],8
The first is 50 above P1 (on its panel's inside), pointing along x; the second is at P0, pointing towards P1, its inside the side P0, P1 and P2 run anticlockwise from.
In the library
P50=[BL/2,BW/2]
MATE @13,"rim",P50,BH,0,8
P51=[LX+LL/2,LW/2]
MATE @14,"lid",P51,0,0,8,TO "rim",T
A telescope box's base and lid (from Run Parametric): the base's rim, its depth above the middle of its base; the lid's top, the middle of it on its inside, put on the rim face to face, the board's thickness apart.
P46=[(S2+S3)/2,SH/2]
MATE @13,"sleeve",P46,0,90,8
P47=[BL/2,BW/2]
MATE @14,"drawer",P47,0,0,8,IN "sleeve",T
A matchbox: the drawer's base put inside the sleeve, on its bottom panel, the drawer's length (x in the drawing) along the sleeve's (y), the board's thickness above it.
P64=[0,W+G]
MATE @64,"front",P64,T,0,8,IN "front edge",0,TURN=90,STEP=1
A finger-jointed box (Laser cutting): the front's corner, on its top face, put on the base's near corner and turned up about the base's edge, first.
Notes
- A mate in a script block isn't one: draw it outside the block.
- A mate on a panel that bends (along a curved crease) is left out.
- A mate can't be made only sometimes (inside an
IF): a part drawn only sometimes is left where it lies.
See also: Mate Tool, Assembling parts in 3D, Pages, element settings.