Ellipse
An ellipse with its axes aligned to the sketch plane.
There is no Ellipse button on the sketch toolbar: an ellipse is written in the code editor. Once it is in the file it behaves like any other sketch entity — its centre shows as a draggable point and takes constraints.
By hand
ellipse(center, rx, ry)
rx and ry are the semi-radii (half the width and half the height) along the plane's X and Y axes.

The code behind it
plate.part.js
import { sketch, ellipse, circle, origin } from 'fluidcad/core';
import { coincident, diameter } from 'fluidcad/constraints';
sketch("xy", () => {
// An elliptical cam with its shaft bore.
// ellipse(center, rx, ry): semi-radii along the plane's X and Y axes.
// The centre is a solver point; the radii are fixed literals.
const cam = ellipse([0, 0], 50, 30);
// Pin the centre on the sketch origin — the only accessor an ellipse has.
coincident(cam.center(), origin());
// The shaft bore, offset from the cam's centre so the lobe leads.
const bore = circle([-15, 0], 12);
diameter(bore, 12);
})
Accessors
| Accessor | Meaning |
|---|---|
e.center() | The centre point — the only solver entity an ellipse registers |
The radii stay fixed literals: the solver positions the ellipse through its centre but never resizes it. To change the size, change the numbers or bind them to a param().
Modifiers
ellipse([0, 0], 50, 25).guide()
ellipse([0, 0], 50, 25).name('cam')