Path Sweep

Status: Implemented
Path Sweep is the dedicated swept-solid operation: it drives a closed planar profile along a path curve, optionally twisting it about the path tangent as it goes.
It is a different feature from Sweep (SW). Sweep's default translate mode
slides the profile along straight segments without rotating it, and its pathAlign mode
carries the profile along curves as well, but Sweep refuses any non-zero twist. Use this
feature for a twist, or to have the section centred on the path and square to it.
Both features now take the same kind of path selection (a whole sketch, or connected edges), and they divide on the path's shape:
| The path is | Use | Because |
|---|---|---|
| smooth — a curve, or segments meeting tangentially | Path Sweep (here), or Sweep with orientationMode: pathAlign | the profile turns to follow the path (the two place it differently — see below) |
| a cornered polyline | Path Sweep (here), or Sweep with either mode | a corner between two straight segments is mitred — see Cornered paths. SW's translate is the one that does not rotate the profile |
| smooth and closed, flat or not | Path Sweep (here), or pathAlign | a loop sweeps as one capless ring — see Closed paths |
| cornered and closed (a picture frame), flat or not | Path Sweep (here), or pathAlign | the whole frame: a mitre at every joint, the closing one included, and no caps — see Cornered paths |
| cornered at a curved segment | neither — refused | a mitre needs two straight directions to bisect; a curve has none, and nothing mitres some joints while skinning others |
| a closed path that crosses itself | neither — refused | the sweep would pass through itself where the two sides cross |
Each refusal names the alternative, so a wrong pick tells you where to go.
Path Sweep and Sweep's pathAlign differ in three ways:
- Where the profile goes. Path Sweep transplants it: the centre of the profile's
boundary lands on the path and its plane becomes the plane square to the path, so the sweep
comes out centred on the path and perpendicular to it wherever the profile was drawn and
whatever angle it was drawn at. For a symmetric profile (a circle, a rectangle, a centred
square) that centre is the area centroid; for a lopsided one, such as an L-section, it is
not. Sweep's
pathAligncarries it: the profile keeps its drawn position and its drawn angle to the path, and only moves as the path itself moves. For a profile drawn square to the path start and centred on it the two agree; for any other profile they build different solids, andpathAlignis the one that follows the sketch. - Twist. Only Path Sweep honours
twistAngle. Sweep still refuses a non-zero twist. - Face names. Path Sweep names side faces
{profileEdge}_SWP; Sweep names them{id}:{profileEdge}_SW. A reference stored against one will not resolve against the other, so this is not a choice to change casually on an existing model.
Reach for Path Sweep when you want twist, or when centring the profile on the path is what
you meant. Reach for Sweep's pathAlign when the profile's drawn position and angle are
part of the design, or when you already have a Sweep feature and its path turned out to be
curved — switching the mode keeps the feature, its references, and its path selection.
Walkthrough

Inputs
profile(reference_selection, filter["SKETCH","FACE"], defaultnull,multiple: false) – a single closed planarSKETCHor resident solidFACE. Required.path(reference_selection, filter["SKETCH","EDGE"], defaultnull,multiple: true) – the trajectory. Required.- a whole sketch contributes its published chain, so one selection covers the entire trajectory. Click the sketch's sheet in the 3D view and you get the whole thing; click one of its drawn segments and you get that edge.
- individual connected edges — sketch curves, resident solid edges, or a mix — are chained head-to-tail by endpoint coincidence, and an edge that runs the "wrong" way is reversed for you.
- The first pick seeds the chain in its own drawn direction, so it decides which way the sweep runs; which of the rest you clicked first makes no difference.
- The joints must be smooth, or every segment straight (a cornered polyline is mitred) — see Cornered paths and Limitations.
twistAngle(number, default0) – total rotation of the profile about the path tangent, applied linearly in arc length, in degrees.0is a plain sweep. On a closed path it must carry the section onto itself: a whole number of turns, or a step of the section's own symmetry about the path (see Closed paths). On anything but a single open segment the twist may be at most 16 turns.consumeProfileSketch(boolean, defaulttrue) – remove the referenced sketch afterwards; turn it off to keep the sketch in the scene. A face profile is never consumed.boolean(boolean_operation, default operationNONEwith no targets andmergeCoplanarFaces: true) – optional union / subtract / intersect against selected solids, applied after the swept solid is built.id(string, defaultnull) – optional identifier for the history entry.
Behaviour
- A multi-segment path sweeps as one continuous tube, not as one solid per segment: the whole run is sampled together and a single rotation-minimising frame is carried across every joint. So splitting a path into pieces does not change the solid, and the profile arrives at the far end in the orientation the near end implies.
- A profile with several regions sweeps each region and unions the results into one solid. Hole loops sweep along the same path, with the same twist, and are subtracted.
- Only the first region's outer loop is centred on the path; every other loop (holes, and the outer loops of further regions) keeps its position relative to it, so the profile's internal spacing is preserved.
- Face naming: side faces take the profile edge's name with a
_SWPsuffix. Missing names useEDGE_SWP; if that produces duplicates, registration adds[0],[1], and so on. Sketch-region caps are{id}:L{loopId}_STARTand_END, with{id}_START/_ENDregistered as container names for all region caps. A face profile, which has no stable sketch loop id, uses the un-keyed names directly. Unlike Sweep, side names carry no{id}:prefix.
Closed paths
A path that comes back to where it started has no ends. A smooth loop is a ring,
skinned round the loop: the stations go round with the first and last station the same
station. A cornered loop is a frame, mitred at every joint including the closing one
(see Cornered paths). Either way the result has
no end caps. A closed sweep's faces are its side walls and nothing else, no _START /
_END name is registered, and the body is genus 1, like a torus.
The volume is Pappus: the section's area times the distance its centroid travels. For a
symmetric section, whose centroid Path Sweep places on the path, that is A × path length —
A · 2πR for a circle of radius R, A × perimeter for a rounded rectangle. Measured on a
circle path, R = 10 with a radius-1 section: 2.6e-7 relative to 2π²Rr², falling 16× per
doubling of the stations.
A flat loop's frame turns only about the plane's normal, so it returns to itself after one lap and the section meets itself at the seam. A loop that leaves its plane returns rolled by the path's holonomy — the solid angle its tangent direction sweeps out on the unit sphere — and the sweep closes it with the smallest counter-twist: on a smooth ring, minus that roll spread evenly along the path; on a cornered frame, shared over the sides by length and turned over each side's middle half, so the mitres stay exact. A loop with a mirror symmetry, or one lying on a sphere, comes back unrolled and gets no twist.
A twist on a closed path must close. A twist you ask for is laid down on top of that
counter-twist, over the whole lap, so after one lap the section comes back turned by exactly
your twistAngle. That only closes when the turn carries the section onto itself:
- any section closes on a whole number of turns (360°, 720°, −360°, …);
- a section that is symmetric about the path also closes on its symmetry steps: every 90° for a centred square, every 180° for a centred rectangle, every 120° for a centred equilateral triangle. After a fractional turn each side wall ends where the next side started, and the sweep joins it there, so there is still one wall per profile edge, named for the edge it leaves from;
- the symmetry is read about the path, not about the section's own centre, and off the curves as drawn. A hole or region off the path has no symmetry about it, so a holed profile closes only on whole turns unless its holes share the outer loop's symmetry. A circle drawn as two half-arcs closes every 180°, not at any angle. A square with one side split in two closes only on whole turns;
- the angle must match exactly. On a square, 90° closes and 90.001° is refused.
A twist that does not close is refused by name, and the error quotes the two nearest twists
that do: path sweep: … a requested twist does not close this closed path: … this section maps onto itself under 2 rotations about the path, so a twist closes only in steps of 180.000000°. The nearest twists that close are 0.000000° and 180.000000°. A twist that makes each wall run
several laps before it closes, past the 1024-station limit, is refused with the count.
A closed path must not cross itself. On a cornered frame, two sides meeting anywhere but at a corner are refused by name, and the refusal names both sides and how close they come. A smooth ring that crosses itself fails the final validity check instead, without naming the sides.
A closed path also stations itself from its own turning rather than only its length — 16
stations per quarter turn — so a rounded rectangle's short corner arcs are resolved rather
than cut (by length alone, a 30 × 18 path with 4 mm corners came out 6 % under
A × perimeter).
A section that reaches past a turn's centre on the inside of that turn — for a section centred on the path, one wider than twice the turn's radius — is refused by name, as on an open path, rather than swept through itself. The exception is a circular section on one circular arc, which builds the swept envelope — see A section wider than its own bend.
Cornered paths: a mitre at every joint
A joint where two straight segments meet at an angle is built as a mitre: the section
is swept along each segment, both sweeps are cut off on the plane that bisects the joint,
and on that plane they share one face loop — the same vertices and edges, one face each
side, and nothing between them. The inner side of the bend is folded away and the outer side
extended past the joint to reach the plane, exactly as a picture frame's corner is cut, so a
section centred on the path encloses section area × total path length. Sweep's pathAlign
mitres the same joints while carrying the section from where it was drawn.
A closed cornered path is the whole frame: the closing joint is mitred like every
other and the result has no caps at all. What makes it close is the flat loop's own geometry —
each joint turns the section by that joint's angle about the path plane's normal, and a closed
flat loop's turns add up to a full circle, so the section carried once round comes back exactly
as the section it started as. For n sides and a section of m edges the frame is n · m
walls and nothing else — genus 1, like a ring. For a symmetric section the volume is exactly
section area × perimeter — measured 128 on a 2 × 2 section round a 10 × 6 rectangle, where
four un-mitred prisms unioned would fall short by the four corner overlaps.
A frame's own refusal is the overlapping mitre: every side of a frame is cut at both ends, so a section wider across the bend than a side is long leaves that side no wall at all. It is the same refusal as a bend too tight for its section, and it names the side, its length and both of its joints.
A mitred path has one wall per (profile edge × path segment), so its walls are named
{profileEdge}:{pathSegment}_SWP, with the un-keyed {profileEdge}_SWP registered as the
group standing for that edge's walls along the whole path — a reference stored while the path
was straight still resolves after a corner is added. The two end caps are unchanged; a mitre
joint has no cap, and a closed path has no cap at all.
What is refused, each quoting what it measured:
- a bend too tight for the section. The inner fold reaches back along the segment by
(half the section's width across the bend) × tan(half the joint angle); if that passes the far end of the segment, the bisector plane cuts the section a second time and the inner side of the solid would pass through itself. Lengthen the segment, open the bend, or narrow the section. - a collapsed bend — a joint at or past 168.522°, where the bisector plane is within 6° of containing the path and the section's footprint on it is stretched more than 10 : 1. At 180° the path doubles back and there is no bisector plane at all.
- a closed cornered loop that crosses itself — see Closed paths — and a
side with no room for its share of the twist (the counter-twist of a loop that is not flat,
plus any
twistAngle): a section whose mitres reach into the middle half of the side, or one reaching so far from the path that the turn would tilt a wall past the 0.1 grazing floor. - a path that MIXES corners with curved segments (a rectangle with one corner rounded). The mitre needs every segment straight and the smooth lane needs every joint tangent-continuous, and nothing builds one construction for some joints and the other for the rest. Round every corner, or leave every corner sharp.
- a twist on an OPEN cornered path. A twist is laid down along the sampled stations, and a mitre has none. A closed frame turns it over the middle half of each side, where a roll keeps the shared loops exact (and a share over a quarter turn is split into several rolls there), but an open cornered run does not have that construction.
Limitations
- A corner at a CURVED segment is refused, and the error names both segments at the
corner, the angle, and a curved segment of the path (not necessarily one at that corner):
path sweep: the path must be tangent-continuous: segments 'Run' and 'Sweep' meet at a 90.0° corner — segment 'Sweep' is CURVED. …. This is a real boundary rather than a missing feature: a mitre cuts both sweeps to the plane that bisects their directions, and a curve has no single direction to bisect, while skinning the joint instead would round the corner off — a wrong solid that would still look watertight. Split the path at that corner and sweep each run separately, or round the corner so the joint is tangent-continuous. A break under about 1° is treated as smooth, so curves a sketch joined on endpoint coincidence still chain as one tube. - A mitre needs room, and a bend can be too tight or collapsed — see Cornered paths.
- A selection that does not form one connected run is refused, and the error names the selection that joins nothing.
- A missing path is a hard error (
requires a path edge selection). - The profile's outer loop must have at least two boundary curves; a one-curve loop is refused.
- A profile name that resolves to neither a sketch profile nor a face fails with
profile '…' not found.
Related
- Sweep (
SW) — the translational sibling; itstranslatemode is the one that sweeps a cornered path without rotating the profile. - Extrude, Revolve, Loft.