Skip to main content

Point

A standalone point. It draws no edge and adds nothing to the profile; it exists to be constrained against — a pivot hole held at the middle of a link, a probe location, the centre of a circular copy.

Points are written in the code editor; there is no Point button on the sketch toolbar.

By hand

point([x, y])

A pivot hole centred on a link bar through a point

The code behind it
plate.part.js
import { sketch, line, point, circle } from 'fluidcad/core';
import { coincident, fix, horizontal, diameter } from "fluidcad/constraints";

sketch("xy", () => {
// A link bar with a pivot hole exactly halfway along it. The bar is a
// guide line; the point marks where the pivot goes.
const bar = line([0, 0], [80, 0]).guide();
horizontal(bar);
fix(bar.start(), [0, 0]);
fix(bar.end(), [80, 0]);
// A standalone point: no edge, only something to constrain against.
const pivot = point([30, 10]);
// .mid() is accepted by coincident() only — it lowers to a midpoint.
coincident(pivot, bar.mid());
// The pivot hole rides the point.
const hole = circle([30, 10], 12);
coincident(hole.center(), pivot);
diameter(hole, 12);
})

Accessors

The statement is the point: pass it straight into a constraint (coincident(p, l.mid()), distance(p, origin(), 40), fix(p)).

For the three points every sketch already has — the origin and the two axes — see sketch datums.