Contours
V3D V2
V3D V2

18. 3-D Models in Contours

Contours 3D can show the machine or figure your motors move as a 3-D model, moving as a show plays. You bring in the CAD model once, tell Contours how its parts move (you rig it), and from then on every show poses it: in its own window, and in the chart area beside the time chart. This chapter explains what a model and a rig are, which files Contours opens, how to export them from SolidWorks with the Contours exporters, and where the files live.

The model is a picture of what the motors do. Nothing you do with the model moves a motor.

What a model and a rig are

A model is your CAD assembly saved as one file, a STEP or a GLB. It is made of parts, often grouped in subassemblies, just as in the CAD program. Contours reads the parts, their shapes, their colours and where each one sits.

A rig says how those parts move and which axis moves them. It is saved in the project, never in the model file, so the same model can be rigged differently in two projects. A rig is made of:

Term

What it is

Body

Parts that move together as one piece, such as an arm and the motor shaft it is fixed to.

Ground

Every part that is in no body. The ground stays still.

Joint

How a body moves against its parent (the body it hangs from, or the ground): it turns about an axis (a revolute joint), slides along one (a prismatic joint), or one of several other kinds.

Drive

The link from a joint to one of the project's axes, with a ratio. As the axis moves in a show, the joint moves with it.

Mates

A SolidWorks assembly's own mates, exported beside the model. Contours can pose the model from them instead of, or as well as, bodies and joints you make yourself.

Cable

A cable or tube drawn between points on bodies, which bends as they move.

So a show moves an axis, the axis moves the joints its drives link it to, and each joint moves its body and everything hanging from that body. Chapter 20 explains rigging in full, and chapter 21 how the AI can rig a model for you.

From a CAD assembly to a model posed by your shows

Figure 18.1. From a CAD assembly to a model posed by your shows.

What Contours does with a model

  • The Model window is where you open the model, look round it, rig it, and play any show on it at its own pace (chapter 19).

  • The chart area's second pane can hold the model instead of the path. There it is posed at the time cursor on the Shows tab, so it follows Simulate, Run show and your changes in the point editor, and shows where Live update is sending the motors; during Record and a Test run it follows the motors themselves (chapter 17, and "The model in the chart area" in chapter 19).

  • The show AI is told what each axis moves on the model, so you can ask for "lift the left leg" instead of naming axes and numbers (chapter 15).

  • The Model window's AI can rig the model, change it, or make a model from a description (chapter 21).

  • Claude desktop, when you allow it, can read the model and its rig and send a rig into Contours (chapter 24).

The SR joint posed in the chart area's Model pane beside the time chart

Figure 18.2. The SR joint in the chart area's Model pane, posed at the time cursor.

Model files: STEP and GLB

Contours opens two kinds of model file:

  • STEP (.step or .stp), which every CAD program can export.

  • GLB (.glb), the binary form of glTF, a common format for 3-D models.

STEP files and the converter

Contours can't draw a STEP file directly, so the first time you open one it converts it to a GLB with its own STEP converter, installed with Contours 3D. You don't need to install anything else. While it works, the view says Converting the STEP file...; a large assembly can take a while.

The converted copy is saved beside the STEP as <name>.STEP.glb (for example bidexhand v4.STEP.glb), and opening the STEP again uses it. When the STEP is newer than its copy, Contours converts it again. You can delete the copy at any time; Contours makes it again. Because Contours writes the copy beside the STEP, keep the STEP in a folder you can write to.

Colours

A STEP file only holds colours in its newer forms, AP214 and AP242. An AP203 STEP opens all grey, and Contours shows a warning icon beside the model's name over the tree; its (i) says why. Export the model again as AP214 or AP242 to keep the colours. The Contours exporter for SolidWorks always writes AP214.

A GLB keeps its colours. Contours reads a GLB written by SolidWorks with the colours SolidWorks shows.

Exporting the model

  • Export it at its zero pose. Set the assembly so that every axis would be at 0 before you export. Contours takes each part's place in the file as where it is when the axes are at 0, and moves it from there. Choose a pose that is easy to set, such as an arm level or a gripper closed.

  • Keep the parts' names when you export again. Contours knows each part by its name and its place in the assembly. A body keeps its parts across a new export as long as they keep their names; a part that has been renamed or removed is counted as missing from the body that held it.

  • Don't compress a GLB's meshes. Contours can't read a GLB whose meshes are compressed (Draco compression). Untick that option in your CAD program's GLB export.

After you export a new version over the old file, click Reload in the Model window to read it again.

Units and the up axis

A model's units

Each model has its own units: m, mm, in or ft. They are on the model's card in the Model window (Rig tree, Models folder, the model's row), with the model's size in them.

  • A STEP opens in metres, the units the converter writes, so its units are right without setting them.

  • A GLB should be in metres, as glTF says, but many programs write millimetres. Contours takes a new GLB as metres unless that would make it more than 10 m across, when it takes it as millimetres. A GLB that SolidWorks wrote, or one with a mates file beside it, is taken as metres.

Check the model's size against the real thing. If it is far too big or too small, its units are wrong: choose the right ones on its card. When a model is more than 10 m across, a note with a warning icon on the bar over the view names it, gives its size and asks whether it is in the units it is likely to be in; click the note to open that model's card.

The Model window's Rig tree with the model's row chosen and its Model card

Figure 18.3. A model's card, with its file, its units and its size.

Lengths in the window

Lengths on the bar over the view (mm or in) is how the Model window shows every length: the rig's size, a joint's position, a slide's limits. It doesn't change the model. It starts as millimetres for a model in metres or millimetres, and inches for one in inches or feet. At the Model window's default size, Lengths and Up (below) are in that bar's ⋮ menu; they show on the bar itself when the window is wide enough.

Which way is up

Up (Y or Z), on the bar or in its ⋮ menu, tells Contours which of the file's axes points up, so the model stands the right way in the view. SolidWorks and glTF use Y up; many other CAD programs use Z up. If the model opens lying on its back, choose the other one. Changing the units or the up axis puts the camera back to its preset view.

Exporting from SolidWorks with the Contours exporters

For a SolidWorks assembly, Myostat provides two macros that export the model together with the assembly's mates, so Contours can pose the model from the mates you already have. CHECK (Where does a customer get the exporter macros, and which SolidWorks versions are supported? The README says they were built in SolidWorks 2026 and tested on 2021, and that a .swp may need rebuilding for an older SolidWorks.)

Macro

Writes beside the assembly

ExportStepForContours

<assembly>.STEP, the mates file and a log.

ExportGlbForContours

<assembly>.glb, the mates file and a log.

Either works. The STEP macro is the one most used; Contours converts its STEP the first time you open it. The GLB macro uses SolidWorks' own glTF export, which Contours opens without converting.

Running a macro

  1. Open the rig's top assembly in SolidWorks and save it.

  2. Set the assembly to its zero pose (every axis at 0).

  3. Choose Tools › Macro › Run... and choose the macro's .swp file.

  4. Wait for the message at the end. A blue message means there were no problems. A yellow one names the first problem; the rest are listed at the end of the mates file.

  5. Copy the model file, the mates file and the log to the Contours PC together, into the same folder.

  6. Open the model in Contours' Model window (chapter 19). Contours finds the mates file beside it by its name.

The macros change nothing in your assembly. The STEP macro always writes AP214 with the parts' colours, whatever your SolidWorks export options say, and puts your options back afterwards.

Note. If the GLB macro says the meshes are compressed, open File › Save As, choose glTF Binary, open its Options, untick Use Draco, and run the macro again.

The files it writes

For an assembly called Gripper, the STEP macro writes:

  • Gripper.STEP: the model.

  • Gripper.contours-mates.json: the mates file. It lists every component and where it sits, which are fixed, whether each subassembly is rigid or flexible, every mate with its type and limits, and the path each swept part (a cable or tube) is swept along. Contours reads it to pose the model from the assembly's own mates, and to make a swept part into a cable that bends.

  • Gripper.contours-export.log: what the macro did, step by step. Myostat may ask for it if an export doesn't come through as you expect.

Contours poses the model from most kinds of mate, including limit mates, which become drives you link to axes. A subassembly that is rigid in SolidWorks moves as one piece in Contours too: to drive the mates inside it, make it flexible in SolidWorks and export again. Mates it can't use yet (gear, cam, slot, path, screw, rack and pinion, hinge, universal, width and symmetric mates) are listed on the Mates card, with anything else it found that won't move. Chapter 20 explains how to use the mates, change or switch one off, and build bodies and joints of your own from them.

Models from other CAD programs

From any other CAD program, export the assembly as a STEP (AP214 or AP242, to keep the colours) or as a GLB, at its zero pose. There is no mates file, so you rig the model in Contours by hand (chapter 20) or ask the Model window's AI to rig it (chapter 21).

Where model files live

  • The project links to the model; it doesn't hold it. The project remembers where the model file is relative to the project file, as it does a show's video. Keep the model and its mates file in the project's folder, or a folder under it, and you can move or copy the whole folder to another PC. If the file isn't where the project expects it, Contours looks for a file of the same name beside the project. When you send a project to someone, send its model files with it.

  • The converted copy of a STEP (<name>.STEP.glb) sits beside the STEP.

  • The <project> models folder beside the project file holds models that Contours makes for you: each version of a model the Model window's AI changes or makes (<model> v1.glb, with <model> v1.py, the script that made it), and models sent in from Claude desktop. Contours never changes your own model file. Save a new project before asking for such a model, so the folder has a place to go.

If a model file is missing when you open a project, the rig is kept as it was; see "A missing model file" in chapter 19. Contours 2 can open a Contours 3D project but drops its model and rig if it saves it (chapter 5).

Several models in one rig

A rig can hold more than one model: for example a mechanism, the gearmotors that drive it and the stand it sits on, each its own file. Contours joins them into one scene:

  • The first model sets the rig's frame: it sits where its own file puts it.

  • Every other model is placed against it, by a position and turns you type or by dragging it in the view.

  • Each model keeps its own units, its own up axis and its own mates file. The same file can be added twice, for two identical gearmotors.

  • Bodies and joints can join parts of different models, so a gearmotor's output shaft in one model can turn an arm in another.

  • Each model has a row in the Rig tree's Models folder, and a header in the Parts list. Removing a model takes its parts out of the rig, with the bodies, joints and cables made only of them.

Chapter 20 explains how to add, place, move and remove models.

Two copies of the SR joint in one rig, each with a header in the Parts list

Figure 18.4. Two models in one rig, here the SR joint and a second copy of it placed beside it, each with its own header in the Parts list.

Where to go next