Cylindrical
A cylindrical mate is a revolute and a slider in one: the two connectors share their Z axis, and the second part may both rotate about it and travel along it. It is the joint of a piston in a bore, a shaft in a plain bearing, a pin in a slot.
| Free motion | rotation about Z, travel along Z |
|---|
In the viewport
- Click Cylindrical on the assembly toolbar and pick the two connectors — the bore's frame first, then the piston's.
- The piston snaps onto the bore axis. Drag it to slide it in and out, or spin it.
- Offset takes a Z value only and sets the rest position along the axis — negative here, down into the bore; Rotate sets the rest angle. There are no limits on a cylindrical mate.
- Click Apply.

The code behind it
The cylinder's connector is the top face's frame, centred on the bore mouth with Z pointing up the axis; the piston's sits on its skirt with Z pointing down, so face-to-face puts the piston upright on the axis and the negative Z offset sends it down the bore:cylinder.part.js
piston.part.js
import { assembly, insert, mate } from 'fluidcad/core';
import { cylinder } from './asm-cylinder.part.js';
import { piston } from './asm-piston.part.js';
export const actuator = assembly('actuator', () => {
const body = insert(cylinder).grounded();
const ram = insert(piston).translate(0, 0, 80);
// Cylindrical = revolute + slider: the piston can spin about the bore
// axis AND travel along it. Only a Z offset is allowed, since the two
// frames share their axis — here it puts the skirt 20 mm down the bore,
// so the piston stands half in, half out.
mate('cylindrical', body.connectors.bore, ram.connectors.skirt).offset(0, 0, -20);
});
Options
mate('cylindrical', body.connectors.bore, ram.connectors.skirt)
.offset(0, 0, -20) // rest 20 down the bore (Z only)
.rotate(90) // rest angle about the axis
.flip()
.offset() with a non-zero X or Y and .limits() are refused on a cylindrical mate. When you need travel bounds, use a slider; when you need the rotation locked, a slider too; when you need the travel locked, a revolute.