Skip to main content

Fastened

A fastened mate locks two parts together: the second connector is placed onto the first and no motion remains. It is the joint for anything bolted, glued or pressed on — a cover on its housing, a bracket on a beam.

Free motionnone

In the viewport

  1. Click Fastened on the assembly toolbar. The mate dialog opens with its first connector slot armed and every part connector shown as a triad.
  2. Click the connector on the part that stays put (the driver), then the connector on the part being fastened. The preview snaps the second part into place.
  3. If it landed upside down, tick Flip. Use Rotate to spin it about the joint's Z and Offset to shift it in the driver's frame.
  4. Click Apply.

Cover fastened onto the base plate

The code behind it

The cover's only connector is the face that lands on the plate:

cover.part.js
cover.part.js
import { part, sketch, line, circle, extrude, fillet, chamfer, color, select, connector } from 'fluidcad/core';
import { face } from 'fluidcad/filters';
import { coincident, distance, fix, horizontal, vertical } from 'fluidcad/constraints';

// A 4 mm cover that bolts onto the base plate: same outline and mounting
// holes, a Ø30 window over the pivot, edges broken and anodised blue.
export const cover = part('Cover', () => {
sketch('xy', () => {
const b = line([-40, -25], [40, -25]);
const r = line([40, -25], [40, 25]);
const t = line([40, 25], [-40, 25]);
const l = line([-40, 25], [-40, -25]);
coincident(b.end(), r.start());
coincident(r.end(), t.start());
coincident(t.end(), l.start());
coincident(l.end(), b.start());
horizontal(b);
horizontal(t);
vertical(r);
vertical(l);
fix(b.start(), [-40, -25]);
distance(b.start(), b.end(), 80);
distance(r.start(), r.end(), 50);
fillet(6, b, r, t, l);
circle([20, 0], 30);
circle([-30, -17.5], 5);
circle([30, -17.5], 5);
circle([30, 17.5], 5);
circle([-30, 17.5], 5);
});
const body = extrude(4);
chamfer(0.5, body.endEdges());
color('steelblue');

// The underside — the face that lands on the base plate.
connector('bottom', select(face().planar().onPlane('xy', 0)));
});
cover-assembly.assembly.js
import { assembly, insert, mate } from 'fluidcad/core';
import { plate } from './asm-plate.part.js';
import { cover } from './asm-cover.part.js';

export const coverAssembly = assembly('cover-assembly', () => {
// The base plate is the anchor: grounded parts never move.
const base = insert(plate).grounded();
// The cover starts wherever it is inserted; the mate places it.
const lid = insert(cover).translate(0, 0, 40);

// Fastened removes every degree of freedom. The cover's underside frame
// is glued face-to-face onto the plate's top frame: origins coincide,
// the two Z axes point at each other, so the cover lies on the plate
// with its holes over the plate's holes.
mate('fastened', base.connectors.top, lid.connectors.bottom);
});

Options

mate('fastened', a, b)
.flip() // second Z along the first instead of against it
.rotate(45) // spin the second part 45° about the shared Z
.offset(20, 0, 5) // shift it 20 along X and 5 along Z of the driver's frame

A fastened mate accepts offsets on every axis. Use them to fasten a part beside a connector rather than on it — a standoff 25 mm from a face centre — without adding a connector for every position.

Face-to-face

Both connectors here sit on the faces that touch: the plate's top and the cover's underside. Face frames point their Z out of the solid, and a mate aligns the two Zs against each other by default, so the two faces meet. The cover's holes land over the plate's holes because both parts drew them at the same sketch coordinates and both frames sit at their face's centre.