Rigging tells Contours 3D how a model moves: which parts move together, how they move against each other, and which axes move them. Once a model is rigged, every show poses it: in the Model window, in the chart area's model pane, and while a show plays on the motors. This chapter rigs a model by hand. Chapter 21 has the AI do it for you, and the two mix freely: the AI can start a rig and you can finish it, or the other way round.
Everything here happens in the Model window. Chapter 18 covers model files and bringing them in, and chapter 19 covers the window itself: the Rig tree and Parts list, the card column, looking around the view, clicking and ticking parts, the selection bar, Undo and the JOG and AXIS rows.
Note. The rig is saved in the project. Contours never changes your model file or its mates file: names, bodies, joints and changes to mates all live in the .cntp file, so you can export the model again from your CAD program at any time.
How a rig is built
A rig uses the standard words of 3-D mechanisms:
-
Body: a set of parts that move together as one rigid piece, such as an arm and the motor shaft it is fixed to. A part that is in no body stays still: it is part of the ground.
-
Joint: how a body moves against its parent, the body it hangs from (or the ground). A revolute joint turns, a prismatic joint slides, and so on. When the parent moves, the joint and the body go with it.
-
Drive: what sets a joint's value. A joint can be driven by one or more axes, passive (placed by the mechanism around it), or it can follow another joint.
-
Offset and limits: the joint's value when its axes are at 0, and how far it may go.
-
Linkage: bodies joined in a loop, such as a crank, a rod and a rocker. Each body hangs from one parent by its own joint; an extra joint closes the loop.
A joint's value is 0 where the model file puts the parts. A revolute joint's value is in degrees; a prismatic joint's is in the window's lengths, mm or inches, chosen under Lengths on the bar over the view.
Figure 20.1. The SR joint's rig as bodies and joints. Each body hangs from its parent by its own joint (solid arrows): the arms from the ground on revolute joints that Motor L and Motor R drive, each leg from its arm by a pin slot, and the plate from the ground on a ball joint. Extra joints (dashed) close the loops: each leg slides up and down its guide on the ground, and the plate rests on leg_L by a ball in slot and on leg_R by a ball on plane.
Tip. Rig in the order the motion flows: start with the bodies that hang from the ground, then the ones they carry. A new body hangs under the body you have chosen, so working down the chain sets each parent as you go.
Bodies
Making a body
-
Tick the parts that move together: tick them in the Parts list, or click them in the view. A click on a part on the ground ticks it; a click on a part already in a body chooses that body, so hold Ctrl to tick it instead.
-
In the selection bar at the top left of the view, choose where the new body hangs: Ground, or one of the bodies. It starts on the body you chose last, and that body is shown in a contrasting colour while parts are ticked.
-
Click New body. Its second line says where it will hang ("under arm_L", "on the ground").
The new body is named after the first part you ticked, gets a colour of its own (with Colours set to Bodies), and gets a revolute joint through the middle of its parts along the model's up axis, not yet driven. The new body is chosen, and its joint is the row under it, ready to set up.
The New body button at the top of the Rig tree does the same. With nothing ticked it makes an empty frame body: a body with no parts that only carries a joint. Use a frame to chain two joints, for example a plate that tilts about two axes: the frame tilts about the first, and the plate tilts on the frame about the second.
Other ways to make a body:
-
Right-click a part and choose New body from this part.
-
On a subassembly's or one of your own groups' card in the Parts list, click New body from these parts. This is the quickest start when the model file already groups a moving piece.
Adding and taking out parts
-
Tick parts, choose the body in the selection bar's list, then click Add to (it names the body).
-
On the Body card, click Add ticked parts.
-
Right-click a part and choose Move to body, then a body or Ground.
-
On a Part card, choose the Body it moves with. Ground takes it out of every body.
-
The × on a part's chip on the Body card sends it back to the ground.
A part that the assembly's mates move (see Using the assembly's mates, below) has no tick and can't go in a body, because a joint of yours would fight the mates.
The Body card
|
Setting |
What it does |
|---|---|
|
Name |
The body's name, used in the tree, on joints and by the AI. |
|
PARTS |
The parts in the body, as chips. A body with no parts says A frame: no parts. |
|
Add ticked parts |
Adds the ticked parts to this body. |
|
Show only these |
Hides every other part until you click Show the rest again (chapter 19). |
|
Add a joint (title band) |
Gives a body with no joint its own joint, or adds an extra joint to one that has one. |
|
Delete body (title band) |
Deletes the body and its joints. Its parts go back to the ground, and any body that hung from it now hangs from the ground. Undo puts it back. |
|
Eye |
Shows or hides all the body's parts. |
A body with no joint of its own stays where the file puts it; its row says "no joint: held where it is".
The ground
Every part in no body is the ground. Its card counts those parts and has Show all parts. On a new rig it also says the first step: tick the parts that move together, then New body.
Joints
A body's own joint and extra joints
Each body's first joint is its own: it hangs the body from its Parent, a body or the ground, and the Rig tree shows the body under that parent. A body can have more joints. An extra joint pins the body To another body (or the ground) and closes a loop, which is how a linkage is built. In the SR joint, leg_L hangs from arm_L by its own joint, a pin slot (a pin on the leg in a slot in the arm), and an extra prismatic joint to the ground, leg_L guide, lets the leg only slide up and down its guide. The plate hangs from the ground on a ball joint, and two extra joints rest it on the legs (Figure 20.1).
To add an extra joint, choose the body and click Add a joint on its card, or right-click the body and choose Add joint. The new joint is a passive revolute to the ground through the body's middle, chosen at once so you can set its type and To.
Each joint is a row of its own under its body, its own joint first. The row says what the joint is, such as "Revolute to Ground" or "Pin slot to arm_L" (an extra joint with a name of its own, such as "leg_L guide", goes by its name), and then in grey what drives it: an axis's name, "passive", or "follows Gear A × -0.5". An alert icon on the row means a driven joint has no axis yet, or the card has a warning for you.
Figure 20.2. A joint chosen in the Rig tree. Its card sets the type, parent and axis; the view draws the axis and fades every part the joint doesn't join.
Joint types
Choose the type in the Joint card's Type list. Each type's line in the list says what it does, and the (i) beside JOINT says more.
|
Type |
What it does |
Its value |
Drive |
|---|---|---|---|
|
Revolute |
Turns about an axis: a hinge, a shaft in a bearing. |
Angle |
Driven, Passive or Follows |
|
Prismatic |
Slides along an axis: an actuator's rod, a carriage on a rail. |
Distance |
Driven, Passive or Follows |
|
Cylindrical |
Turns and slides on one axis: a rod in a bore, a cylinder's rod with rod ends. The turn is free. |
The slide |
Driven, Passive or Follows |
|
Screw |
Turns and slides on one axis, the slide tied to the turn by the Lead (length per turn, negative for a left-hand thread): a lead screw's nut. With a lead of 0 it slides freely, and the card says to set the lead. |
The slide |
Driven, Passive or Follows |
|
Ball |
Turns freely every way about a point: a rod end, a ball and socket. |
None |
Always passive |
|
Universal |
Two crossed axes meeting at a point: a cardan joint. The first axis is on the parent, the second on this body. For an exact cross, use a frame body on two revolutes instead. |
None |
Always passive |
|
Planar |
Slides anywhere in a plane and turns about its normal: a puck on a plate. |
None |
Always passive |
|
Pin slot |
A pin on one body in a straight slot on the other: the pin turns about its axis and slides along the slot. |
The pin's place along the slot |
Passive or Follows |
|
Arc slot |
A pin on one body in a circular slot on the other: the pin turns and goes round the arc. |
The pin's angle round the arc |
Passive or Follows |
|
Ball in slot |
A ball whose centre slides along a line, as in a groove or on a rail; it turns freely every way. |
Its place along the line |
Passive or Follows |
|
Ball on plane |
A ball whose centre slides anywhere in a plane, as on a flat; it turns freely every way. |
None |
Always passive |
|
Fixed |
Holds the body to its parent, or the ground, where the file puts it: a body that never moves, or parts that ride on another body. It has no axis. |
None |
Never driven |
A joint with no value has no Drive section on its card. A Fixed joint has no axis section either; its card says it is held where the file puts it.
Figure 20.3. The Type list. Each type has a line saying what it does.
The Joint card
|
Setting |
What it does |
|---|---|
|
Name |
An extra joint's own name. A body's own joint goes by the body's name. |
|
Type |
The joint type (table above). |
|
Parent / To |
For a body's own joint, what it hangs from: when the parent moves, the joint and the body go with it. The list leaves out bodies that would make the tree a loop. For an extra joint, the body (or ground) it pins this body to. |
|
JOINT AXIS |
Where the joint is and which way it points, with how it was set ("Picked on shaft_L · 0.0018° from −Y"). For a ball it is CENTRE, for a slot joint PIN, for a universal FIRST AXIS and for a planar PLANE. |
|
Pick axis |
Sets the axis from a part you click (next section). Its name follows the type: Pick centre, Pick pin, Pick first axis, Pick plane. |
|
Flip |
Reverses the axis: the positive direction turns or slides the other way. |
|
Lead |
A screw joint's lead, length per turn. |
|
SLOT, ARC, PLANE or SECOND AXIS |
The second element of a slot, plane or universal joint, with Pick slot, Pick arc, Pick plane or Pick second axis, and Flip for a slot. |
|
SLOT ON, ARC ON, PLANE ON |
Which of the two bodies has the slot, arc or plane; the pin or ball is on the other. A pick sets it from the part you click. |
|
Origin and direction |
Folded: the numbers themselves, in the window's lengths and the model file's own frame. Type them for an axis you can't pick. |
Note. Which body has the slot changes the motion. A pin in a slot on a crank (a slotted crank) moves its partner differently from a slot on the follower (a Scotch yoke). Put the slot on the body that really has it.
Picking an axis, centre, plane, slot or arc
Picking sets a joint from the model's own shapes, which is quicker and more exact than typing.
-
Choose the joint and click Pick axis (or Pick centre, Pick pin and so on). A line at the top of the view says what to click, and the button reads Cancel pick.
-
Click the shape on the model:
-
Pick axis, Pick pin, Pick first axis or Pick second axis: the pin, shaft or bore the joint turns or slides on. A click on a flat face of the part uses its largest round surface.
-
Pick centre: the ball or its socket.
-
Pick plane: the flat face it slides on.
-
Pick slot: a flat side of the slot (for a ball in slot, also the rod or rail it runs along).
-
Pick arc: the curved side of the arc slot. Pick the pin first: the arc's centre is on the pin's axis.
-
-
The card shows the result. To give up, click Cancel pick or press Esc.
Contours fits the axis to the part's surface, then snaps it exactly onto X, Y or Z, or parallel to another joint, when the fit is within half a degree. Models are rarely perfectly square, and a loop of joints whose axes are a hair apart can't close; snapping keeps a linkage moving. An axis that is close to X, Y or Z but not on it says so: "0.0086° from +X". Directions you type are left as you typed them.
A pick that finds nothing says why at the top of the view, for example that no ball was found on the part you clicked, or that the side you clicked isn't square to the pin.
Figure 20.4. Picking an axis. The line at the top of the view says what to click; Cancel pick or Esc gives up.
Seeing the joint in the view
Choose a joint row and the view draws it: the axis as a solid rod in the model, dashed where parts hide it, with a ring at each end for a joint that turns. A ball's centre is a cross and two rings. A slot, plane or arc is drawn in light blue. Every part outside the joint's two bodies is faded, so you can see what the joint joins. Choosing a body fades everything but that body. To see the joint move, drag the JOG row under the view (chapter 19).
Drives
The DRIVE section of a joint's card says what sets its value. Choose one of three:
Driven
One or more axes set the joint. Click + Axis, choose the Axis and type its Ratio: the line under it says what the ratio is in, such as "° per deg of Motor L" or "mm per mm of Lid". The joint's value is its offset plus each axis's position times its ratio. The × beside a ratio takes that axis out.
-
A negative ratio drives the joint the other way. (So does Flip on the axis.)
-
Two axes on one joint add together. A CoreXY gantry, for example, moves by ½ × Motor A − ½ × Motor B.
-
A driven joint with no axis yet is held at its offset, and its row shows an alert until you give it one or make it passive. A new body's joint starts like this.
In the SR joint, each arm turns on a revolute joint driven by its motor's axis at a ratio of 1: arm_L by Motor L and arm_R by Motor R, both in degrees. Every other joint is passive: as an arm turns, its slot pushes the pin on its leg, the leg slides up or down its guide, and the legs tilt the plate. In the Joint types demo, the Lid axis drives an actuator's rod on a cylindrical joint, in mm, and the rod pushes the lid round on its two arc slot pins.
Tip. An axis is a motor. Drive the joint the motor itself moves (a linear actuator's rod, a motor's shaft) and make everything it pushes passive. Then a show sends the motor what it really does, and the model follows the real mechanism.
Passive
No axis drives the joint: the linkage places it, within its limits. Use it for every joint in a linkage except the ones the motors move. Ball, universal, planar and slot joints are always passive.
Follows
The joint's value is its offset plus a Ratio times another Joint's value. Use it for gears, belts, a rack and pinion, or two arms that mirror each other.
-
A gear pair's ratio is minus the ratio of the teeth counts: a gear with twice the teeth of its driver follows at × -0.5.
-
A belt's ratio is plus the ratio of the pulleys.
-
A rack follows its pinion in length per degree: π × the pinion's radius ÷ 180.
Follows is greyed when no other joint has a value to follow. The list leaves out any joint that already follows this one. If you delete a joint, the joints that followed it become passive.
Figure 20.5. A gear that follows another. Gear B has twice Gear A's teeth, so it follows at × -0.5.
Offset and limits
The LIMITS section has:
|
Setting |
What it does |
|---|---|
|
Offset |
The joint's value with every drive axis at 0 (for Follows, with the joint it follows at 0). A passive joint has none. |
|
Min, Max |
How far the joint may go. A blank limit is none. |
|
No limits |
Clears both. |
|
Now |
The joint's value as the view shows it. |
A driven joint never goes past its limits, whatever the axis asks; a passive one is placed only within them. Give a passive joint limits only where the real mechanism has a stop: a limit the real joint doesn't have can lock a linkage that should move.
Figure 20.6. A driven joint's drive and limits. The Motor L axis turns arm_L one degree for each degree it moves; with Min and Max blank, the joint has no limits.
What each axis means
Two short descriptions tell the AI what an axis does to the model, so a request such as "lift the left leg" reaches the right axis:
-
Your own words, in the axis's Description on the Axes tab's General tab (chapter 7), for example "Turns the left arm, which raises and lowers leg_L". Left and right are the model's own.
-
The AI model builder's line, shown read-only under MEANING on a drive's card and as "From the model:" under the axis's description. To change it, ask the AI (chapter 21).
The show AI gets both, and yours win where they differ (chapter 15).
When a drive can't move
Contours poses the model with its own solver, from geometry alone (no physics), each pose starting from the last. When something stops it, it says so:
-
"Fights ... over the same motion" on a drive's card: two drives set the same motion. Leave one of them with no axis.
-
"It moves nothing: the joints and mates around it hold it. Check their axes." The linkage is locked, usually by a joint on a wrong axis. Pick the axes again, or check that loop joints are passive.
-
"can't reach" and the drive's name, beside the time in the show row under the view: a joint's limit stops the drive, or the linkage locks before the drive gets there. Widen the limit that stops it, or narrow the drive's own.
Using the assembly's mates
A model exported from SolidWorks with the Contours exporters has a mates file beside it (chapter 18). Its mates already say how the assembly moves, and its limit mates become drives you link to axes. When there is a mates file, the Rig tree has a Mates row.
Turning them on
Choose the Mates row. Its card names the mates file and when it was exported. Tick Use the assembly's mates. (A rig with no bodies yet uses them as soon as the model loads.) The card then counts the mates used, changed, switched off and left out, and lists their types.
Under the Mates row, each limit mate is a drive, followed by All mates, the searchable list of every mate. A drive's card has:
-
a Name of your own (blank shows the mate's name), the two parts it is between and the parts it moves;
-
the DRIVE section: Driven by an axis, as for a joint, or not driven (free inside its range, wherever the linkage puts it);
-
the LIMITS section: the Offset (it starts at the mate's lower limit, so the axis at 0 is the start of the range), and Min and Max, SolidWorks' range. Changing them overrides that range in this project, and Back to SolidWorks puts it back.
For example, an assembly whose three linear actuators each have a limit mate for their stroke has three drives under the Mates row: link each to its actuator's axis, and the mates move the rest of the mechanism.
Bodies and joints of your own work together with the mates. Tick parts on the ground to make bodies of them, for example a motor shaft that has only a concentric mate and so has no drive until it is a body on a revolute joint.
Changing or switching off a mate
Open a mate's card from the All mates list (type in Search to find one), from the MATES chips on a part's card, or with the Mate button in a drive card's title band.
|
Setting |
What it does |
|---|---|
|
Use this mate |
Off leaves the mate out, as SolidWorks does with a suppressed mate. |
|
RANGE |
A limit mate's Min and Max, SolidWorks' beside them. A blank end is SolidWorks'. |
|
VALUE |
A distance or angle mate's value, SolidWorks' beside it. Contours puts the model together again for the new value before anything is driven. |
|
Flip |
Holds the mate the other way, where it can hold two ways; the (i) says which. |
|
Back to SolidWorks |
Puts the mate back as the file has it. |
|
‹ (Back to Mates) |
Back to the Mates card. |
These changes are kept in the project by the mate's name, so they apply again when you export the assembly again. One that no longer fits (the mate has gone, or changed type) is listed on the Mates card under OVERRIDES NOT APPLIED, with Remove. When a changed value means re-assembling the model, the card says how many parts moved, or how far off the mates still are if they can't all hold.
Problems found
When a mates file loads, Contours checks it and lists what won't work under PROBLEMS FOUND on the Mates card. The Mates row and the affected drives show an alert, and a note at the top of the view says so once. It finds:
-
a limit mate that can't be driven, or that may open the wrong way (an angle exported with its two planes parallel);
-
a drive that stops short of its range, naming the mate or linkage that stops it;
-
a limit mate inside a subassembly that is rigid in SolidWorks. A rigid subassembly moves as one piece in Contours too, as it does in SolidWorks; make it flexible in SolidWorks and export again to drive mates inside it;
-
mates Contours leaves out that held parts, by reason.
Mates SolidWorks itself doesn't solve (suppressed, broken, or on removed geometry) aren't problems; they are listed under Left out at the foot of the card. Contours doesn't yet solve these SolidWorks mate types either: gear, cam, slot, path, screw, rack and pinion, hinge, universal, width and symmetric. Rig those parts with joints of your own: a Follows joint stands in for a gear or rack and pinion mate.
When the mates can't move part of the assembly, switch the mates that hold it off and rig it yourself: New body from these parts on a subassembly's card makes one body of a moving piece in one step.
Building bodies and joints from the mates
Build from the mates, on the Mates card, turns the mates into bodies and joints of your own, which you can then change on their cards: another joint type, a parent, Follows, limits. Parts the mates hold together become a body; the mates between two bodies become a joint of the matching type; and a limit mate that measures a joint's own motion gives that joint its limits and its drive. The mates it replaces are switched off; mates that make no joint stay mates.
Build this linkage, on a drive's card, does the same for just the parts that drive moves.
When it finishes, the card says how closely the built rig poses compared with the mates. Back to the mates undoes the build while the project is open (and Undo works too). If you later delete the bodies or joints a build made, the mates they replaced are switched back on.
Note. Built bodies and joints no longer follow the mates when you export again. A new export still updates the parts' shapes and places, and mates it adds come in as mates.
Several models in one rig
A rig can hold several model files: a robot and the fixture beside it, or a mechanism and the gearmotors that drive it. The first model sets the rig's frame; each one added is placed against it. Chapter 18 explains how the files and their units come in; here is how to place and rig them.
Adding a model
-
Click Add model... (the cube on the bar over the Rig tree, or the button on the Models card) and choose a STEP or GLB file.
-
Or drop STEP or GLB files on the Model window.
The new model is placed beside the rig, gets a header of its own in the Parts list and a row in the Models folder of the Rig tree, and its card opens. Its parts can go in bodies with any other model's parts.
The Model card
|
Setting |
What it does |
|---|---|
|
Name |
The model's name in the tree and the Parts list. Blank uses the file's name. |
|
FILE |
The model file and its part count. |
|
UNITS |
What the file's lengths are in, with the model's size. If the size isn't the model's real size, the units are wrong (chapter 18). An added model also has Y up and Z up; it is turned so its up is the rig's. |
|
PLACE |
An added model's X, Y, Z and Turn about X, Turn about Y, Turn about Z, in the rig's frame. It is turned about its own origin, about X, then Y, then Z, then moved. |
|
Move by dragging |
Moves an added model by dragging it in the view (below). |
|
THE RIG'S FRAME |
The first model's card instead of PLACE: it sits where its file puts it. Change file... opens another file in its place, keeping the bodies, joints and other models. |
|
Remove from the rig (title band) |
Removes the model (below). |
When you move or turn a model, the joints and cable points on its own bodies go with it; joints that tie it to another model's bodies stay where they are.
Moving a model by dragging
-
Choose the model's row in the Models folder (or its header in the Parts list) and click Move by dragging. The button turns the theme colour and reads Done moving.
-
Drag the model in the view. It moves across the screen, in the plane facing you; turn the view to move it in depth. A drag anywhere else still turns the view.
-
Click Done moving, or press Esc.
Each drag is one step for Undo. The first model can't be moved: it is the frame.
Figure 20.7. An added model's card. With Move by dragging on, a drag on the model moves it.
Removing a model
Click Remove from the rig on its card, right-click its row and choose Remove from the rig, or choose its row and press Delete. Contours asks first and says what goes with it: its parts and mates, and the bodies, joints, cables and groups made only of its parts. A body that stays and hung from one that goes hangs from the ground. The other models stay where they are. Undo brings it all back.
Cables
A cable is drawn as a tube through its points, each on a body (or the ground), so it bends as the rig moves: a Bowden cable, a belt, a hose. Contours draws cables; they don't pull on anything or stop the rig moving.
Making a cable by hand
-
Choose the Cables row in the Rig tree and click New cable. It starts with two points on the ground, either side of the model's middle.
-
On the cable's card, set each point: On (the body it moves with, or Ground) and X, Y, Z where it is as the model is modelled, in the window's lengths.
-
Click Add a point for each place the cable passes: each fitting, guide, hole or drum it runs through or wraps. The × beside a point removes it.
|
Setting |
What it does |
|---|---|
|
Name |
The cable's name. |
|
Radius |
The tube's radius. |
|
Colour |
The tube's colour, as #RRGGBB. |
|
POINTS |
Each point's body and place. |
|
Delete |
Deletes the cable. |
The cable is drawn as a smooth curve through every point, so it keeps to the holes it runs through; you don't need extra points at bends.
Making a cable from a part
Cables and tubes usually come from CAD as rigid parts, which stay put as the rig moves. Turn one into a cable that bends:
-
Right-click the part and choose Make a cable from this part, or click the same button on its card.
-
When a SolidWorks export includes the paths of swept parts, the Cables card also has Make cables from the swept parts, with how many it found.
The cable follows the sweep's path when the export gives it, otherwise the centreline Contours traces from the part, at the part's own radius and colour. Each of its points is put on the part it passes through or touches, so it moves with that part's body. The part itself is hidden, not deleted, and Undo puts it back.
A part that isn't one simple tube is refused, with the reason at the top of the view: no round wall (a box), several tubes merged into one part, a branched harness, or a tube that changes radius. A cable can't follow a part the mates move unless that part is in a body.
Figure 20.8. A cable's card. Each point moves with its body, so the cable bends as the leg moves.
Checking your rig
-
Drag the JOG row to move the chosen joint alone, and the AXIS row to move one axis and everything it drives. Neither moves a motor, and Back to the show returns to the show's pose (chapter 19).
-
Play a show in the Model window's show row, or in the chart area's model pane (chapter 19).
-
Choose each body with Colours on Bodies to check it holds the parts you expect.
-
Read the alerts in the tree: each card says what is wrong.
Every change to the rig is one step for Undo (Ctrl+Z) and Redo (Ctrl+Y), and the Delete key deletes the chosen body or extra joint (chapter 25). Save the project to keep the rig.