Symmetric
symmetric mirrors two points across a line: they end up the same distance from it on opposite sides, on a line perpendicular to it. It also mirrors two whole entities of one kind — two lines, two arcs, two circles, two ellipses — which is what the sketch Mirror tool writes, one statement per mirrored entity. It is how one dimension drives both halves of a symmetric profile.
In the viewport
- Click the two points — or two lines, two arcs, two circles, or two ellipses — then the mirror line: a datum axis, or any sketched line (a
.guide()centreline is the usual choice). The mirror line is always the last pick. - Click Symmetric. Both points (or both entities) get an
Sbadge.


The keyway's walls sit at unequal distances from the centreline.

symmetric(a, b, yAxis())Both walls mirrored across the Y axis: the keyway is centred on the bore.
The code behind it
The keyway's walls are drawn at unequal distances from the bore's centreline. Two symmetric statements mirror the right wall's endpoints from the left wall's across yAxis() (2 DOF each), so the keyway is centred on the bore whatever width the distance sets. Only the left wall needs vertical; the right one follows.
import { sketch, line, circle, origin, yAxis } from 'fluidcad/core';
import { symmetric, coincident, vertical, distance, diameter } from "fluidcad/constraints";
sketch("xy", () => {
// A bore with a keyway. The keyway's two walls are drawn at unequal
// distances from the centreline.
const bore = circle([0, 0], 40);
coincident(bore.center(), origin());
diameter(bore, 40);
const leftWall = line([-4, 19], [-4, 24]);
const rightWall = line([2, 20], [2, 24]);
const top = line([-4, 24], [2, 24]);
coincident(leftWall.end(), top.start());
coincident(top.end(), rightWall.end());
coincident(leftWall.start(), bore); // both walls start on the bore
vertical(leftWall);
// Each wall endpoint mirrors its partner across the Y axis — the
// sketch's centreline — so the keyway stays centred on the bore.
symmetric(leftWall.start(), rightWall.start(), yAxis());
symmetric(leftWall.end(), rightWall.end(), yAxis());
distance(leftWall, rightWall, 6); // keyway width
distance(origin(), top, 23); // keyway depth from the bore center
})
In code
symmetric(a, b, l) // points a and b mirror across line l: 2 DOF
symmetric(a, b, yAxis()) // ... across a datum axis
symmetric(l1, l2, yAxis()) // two lines: both endpoints mirror (4 DOF)
symmetric(c1, c2, yAxis()) // two circles: centers mirror, equal radii (3 DOF)
symmetric(a1, a2, l) // two arcs: centers and starts mirror, ends reflect (5 DOF)
symmetric(el1, el2, l) // two ellipses: centers mirror, equal semi-radii, RX axes reflect (5 DOF)
a and b are points (line ends, centers, point()s) or two entities of the same kind; l is a line or an axis datum. The arc and ellipse forms remove exactly the entity's free dimensions, so a mirrored semicircle stays solvable and never reads as redundant, and a mirrored ellipse turns with its source. To mirror several entities at once, draw one half and use the sketch Mirror tool — it writes one of these statements per entity.
See also
- Midpoint — a point held halfway between two others
- Sketch tools → Mirror