Project
Project throws curves onto faces: a logo or a parting line drawn flat and laid onto a curved body, a path on a surface to sweep along, a guide that must lie on a face. The curves travel along a line, or each point goes to the closest point of the faces. The faces stay as they are; the result is a curve.
In the viewport
- Open the Curves menu on the toolbar and click Project. The dialog opens with the Curves row armed (blue border).
- Click the curves to throw: a click on a sketch takes the whole sketch, an edge of a curve (a helix, an intersection curve) takes that curve — the whole statement unless it holds several, see Picking a curve — and an edge of a solid or a surface takes that edge. A sketch's or a curve's row in the timeline works too. Once Curves holds a pick, Onto is armed.
- Click the faces to land on. A click on a face takes that face, of a solid or of a surface; a surface that is a single face, such as an extruded line, is taken whole, as its row in the timeline takes any surface. As soon as both rows hold a pick, the projected curve previews in blue.
- Click Apply. The timeline gains a Projected Curve row and the statement is written to the file.

- 1CurvesThe curves to throw. Takes several picks: whole sketches and curves, edges of solids and surfaces. Click a chip’s ✕ to drop it.
- 2OntoThe faces the curves land on: faces of solids and of surfaces, and whole surfaces. Click a row to arm it before picking for it.
- 3ModeAlong direction: every point travels along one line. Normal to surface: every point goes to the closest point of the faces.
- 4DirectionThe line, for Along direction only. Empty, it is the normal of the plane the curves lie in. Click the row to arm it, then pick a world axis, an axis, a straight edge, a connector, a plane or a planar face.
- 5KeepWhich images of the curves stay: Nearest, what faces them; All, every image.
- 6ApplyWrites project(curves, faces) with its options. Both rows need a pick. Exit closes the dialog without writing anything.
If nothing lands, the dialog says so instead of drawing a preview: the curves miss the faces along that line, or they lie in no plane and no direction is set.
A rectangle and a line drawn on a plane above a dome, dropped onto it with the Direction row left empty:

The code behind it
The dialog names a picked face with a selector of its own; any face selection, a solid or a surface works in its place.
import { sketch, sphere, split, plane, line, project, select } from 'fluidcad/core';
import { rect } from 'fluidcad/shapes';
import { face } from 'fluidcad/filters';
// The dome: a ball of radius 40 cut flat at XY, its top half kept.
const ball = sphere(40);
split('xy', ball).keep('front');
// Drawn flat on a plane 60 above XY: a closed rectangle and an open line.
const logo = sketch(plane('xy', 60), () => {
rect([0, 0], 30, 20).centered();
line([-25, 28], [25, 28]);
});
// The sketch dropped onto the dome's round face. No .direction(): the
// curves travel along the normal of the plane they lie in, Z here, and each
// lands where that line through its points meets the dome. The sketch hides;
// later statements can still read it.
const mark = project(logo, select(face().sphere()));
Picking several curves or faces at once
- Double-click an edge or a face of a solid: the armed row takes the whole group it belongs to, such as the end edges of an extrude or every side face of it; an edge on a surface's open rim takes the rim loop.
- Right-click an edge or a face of a solid: a menu lists the groups it belongs to, such as its tangent edges, the loops it is on and the faces of the feature that made it. Hover an item to preview it; click it to add it to the armed row.
A sketch and a face of a surface already stand for the whole object, so neither gesture applies to them. On one curve of a statement that holds several, a double-click takes all of its curves.
The direction
The direction is a line, not an arrow. The curves are projected both ways along it, so a sketch above a body and one below it both reach it, and there is no flip. Which of the images stay is what Keep decides.
With the Direction row empty, the line is the normal of the plane the curves lie in: a sketch's own plane. To set another, click the row to arm it; the world axes and the origin planes show in the viewport. It takes:
- a world axis, an
axis()line, a straight edge, or a connector (its Z axis); - an origin plane, a
plane()quad, or a planar face, standing for its normal.
A curved edge or face gives no direction: the row says so and keeps what it had. The chip's ✕ empties the row again.
A circle on a tilted plane, thrown straight down along the world Z axis, lands as an ellipse:

The code behind it
import { sketch, circle, extrude, plane, project } from 'fluidcad/core';
sketch('xy', () => {
circle([0, 0], 80);
});
const disc = extrude(10);
// A circle on a plane tilted 30° about X.
const tilted = sketch(plane('xy', { offset: 40, rotateX: 30 }), () => {
circle([0, 0], 30);
});
// Along the world Z axis instead of the tilted plane's normal: an ellipse
// on the disc's top face.
const mark = project(tilted, disc.endFaces()).direction('z');
Curves that lie in no plane, such as a helix, have no plane normal: along a direction they need one set, or use Normal to surface.
Keep
The line through a point of the curves can meet the faces more than once, on the near side of a body and on the far side. Keep chooses which images stay.
- Nearest (the default) keeps, along the line, what each point of the curves meets first. A line drawn across a cylinder or a ball keeps the half facing it; the far half is behind. Every stretch of the near side stays: a line across a pocket lands on the top face on each side and on the pocket's floor, three curves, while the walls and the bottom face are behind.
- All keeps every image, the far side of a closed body too.

project(bar, tube)The half of the tube facing the line.

project(bar, tube).keep('all')Underneath too: a full circle.
The code behind Nearest
import { sketch, circle, extrude, plane, line, project } from 'fluidcad/core';
// A tube lying along X.
sketch('yz', () => {
circle([0, 20], 30);
});
const tube = extrude(60).new();
// A line drawn across it, above it.
const bar = sketch(plane('xy', 60), () => {
line([30, -30], [30, 30]);
});
// Projected straight down onto the whole tube. The line through each point
// of the source meets the tube twice, on top and underneath; Nearest, the
// default, keeps the top half, the side facing the line.
const top = project(bar, tube);
The code behind All
import { sketch, circle, extrude, plane, line, project } from 'fluidcad/core';
sketch('yz', () => {
circle([0, 20], 30);
});
const tube = extrude(60).new();
const bar = sketch(plane('xy', 60), () => {
line([30, -30], [30, 30]);
});
// .keep('all') keeps every image: the half underneath too, so the line
// lands as a full circle round the tube.
const ring = project(bar, tube).keep('all');
The code behind it
import { sketch, extrude, cut, plane, line, project } from 'fluidcad/core';
import { rect } from 'fluidcad/shapes';
// A block with a pocket in its top.
sketch('xy', () => {
rect([0, 0], 80, 40).centered();
});
const block = extrude(20);
sketch(plane('xy', 20), () => {
rect([0, 0], 30, 30).centered();
});
cut(8);
// A line drawn above the block, across the pocket.
const bar = sketch(plane('xy', 40), () => {
line([-35, 0], [35, 0]);
});
// Straight down onto the block, keeping what each point meets first: the
// top face on either side of the pocket and the pocket's floor, three
// curves. The walls under the line and the block's bottom face are behind.
const groove = project(bar, block);
In Normal to surface mode, Nearest keeps the image closest to the curves, and All keeps every one.
Normal to surface
Click Normal to surface: each point of the curves goes to the closest point of the faces. The Direction row hides, and what it holds is left out of the statement; switch back to Along direction and it is there again.
A helix inside a shaft lands on the shaft's wall as a helix of the same pitch:

The code behind it
import { sketch, circle, extrude, helix, project } from 'fluidcad/core';
sketch('xy', () => {
circle([0, 0], 40);
});
const shaft = extrude(60);
// A helix inside the shaft, around its axis.
const h = helix('z').radius(10).pitch(8).height(40);
// Normal to surface: each point goes to the closest point of the shaft's
// wall, giving a helix of the same pitch on its surface. A helix lies in no
// plane, so along a direction it would need a .direction().
const groove = project(h, shaft.sideFaces()).mode('normal');
Editing
Double-click the Projected Curve row in the timeline. The view rolls back to just before the statement and the dialog reopens with every choice as written: each row on its argument as Current: … chips, lit where it names edges, faces or a surface; the mode; the direction (a world axis or an origin plane as its chip, anything else as Current: …); and Keep.
Pick in a row to change it. Where the row names edges or faces, the first pick adds to them and a chip's ✕ takes one off; anything else in the row is replaced by the pick. In the Direction row a pick replaces the direction; its ✕ goes back to the statement's own, and the ✕ of that one removes the direction. Apply rewrites only what you changed: a row, the mode, Keep, the direction. Switching to Normal to surface removes the statement's direction.
In code
import { project } from 'fluidcad/core';
const pc = project(source, target);
const pc = project(source, target).direction('z');
const pc = project(source, target).mode('normal');
const pc = project(source, target).keep('all');
| Argument | Takes |
|---|---|
source | Curves: a sketch, a curve (a helix, an intersection curve, another projected curve), a selection of edges, or a list of those |
target | A face selection (faces of solids or of surfaces), a surface, a solid (all its faces), or a list of those |
| Chained method | Meaning |
|---|---|
.mode('direction') | The default: every point travels along one line. |
.mode('normal') | Every point goes to the closest point of the target. |
.direction(d) | The line, for mode 'direction': 'x', 'y', 'z', an axis(), a straight edge, a connector; or 'xy', 'xz', 'yz', a plane(), a planar face, for its normal. Left out, the normal of the plane the source lies in. |
.keep('nearest') | The default: along the line, what each point of the source meets first; in mode 'normal', the image nearest the source. |
.keep('all') | Every image. |
The methods chain in any order; the dialog writes them in this order and leaves out each one at its default. Written outside a sketch, project is this tool. Inside a sketch() callback it is the sketch tool that lays 3D geometry onto the sketch plane: see Project in a sketch.
The source curves hide and stay readable: a later statement can read the sketch again. The target is read, not used up.
One curve per image
The result holds one curve for each connected image, each running the way its source runs. Images come in the order of their sources.
pc.edges() // every edge, curve after curve, each in the order it runs
pc.edges(0) // one edge
pc.start() // where the first curve starts
pc.end() // where it ends
Errors
| Situation | Message |
|---|---|
| Along a direction, none set, and the source lies in no plane | project: the source does not lie in a plane, so it has no natural direction. |
.direction(…) with .mode('normal') | project: .direction() is for mode 'direction'. |
| Nothing lands on the target, or the direction runs along the faces | project: the projection misses the target. |
.mode(…) or .keep(…) with another value | project: .mode() takes 'direction' or 'normal'. |
| The direction is a curved edge or face | project: the direction is a curved edge; only a straight edge gives a direction. |
| The source is a solid or faces | project: the source is a solid; pick the edges to use. |
| Fewer than two arguments outside a sketch | project: outside a sketch, give the curves to project and the faces to project them onto: project(source, target). |
| The source forks | project: the source branches at (x, y, z); a curve cannot fork. |
A fork is three or more curve ends meeting at one point, as in a T: remove one of the curves that meet there, or give each branch a statement of its own. Curves that meet without sharing an end are not a fork but separate curves: a line that ends on the middle of another, a line touching a circle, two curves that cross.
Limitations
- Datum planes cannot be picked in the Onto row; write them in code.
- In Normal to surface mode a whole solid projects onto its caps too; pick the faces you mean, such as
shaft.sideFaces().
See also
- Before: a sketch of the outline to throw, and the faces to throw it onto
- After: trim a surface or split a face along the curve, run an offset curve beside it, or fill the loop it closes