Skip to content

Thicken

Converts a thin path into a closed shape with thickness — open paths get end caps, closed paths become donut topology.

Category: Shape Ops Menu path: Shape Ops > Thicken

Ports

PortTypeDirectionDescription
shape_inshapeinputSource shape (open or closed paths)
outshapeoutputClosed thickened shape

Parameters

ParamTypeDefaultDescription
widthscalar10Total thickness in comp pixels. The output extends ±width/2 perpendicular to each path's tangent
capenumRoundEnd-cap style for open paths: Butt (flat), Round (semi-circle), Square (extends half-width along tangent)
joinenumMiterCorner-join style for the offset polyline. v1 uses miter direction with miterLimit clamp; Round and Bevel fall back to bevel-style clamping past the limit
miterLimitscalar4Max miter scale factor. Acute corners exceeding this fall back to a bevel-style clamp (same convention as SVG / CSS)

Expose Channels

When enabled (E button on node header), adds input ports that override params via edge connections:

PortTypeOverrides
width_inscalarwidth

How It Works

For each input path, Thicken:

  1. Linearizes the path — bezier segments are sampled into a polyline (16 samples per segment).
  2. Generates two offset polylines by shifting each vertex along its outward normal (bisector of adjacent edge tangents), one to each side at distance ±width/2. Miter length scales by 1/cos(angle/2); acute corners exceeding miterLimit clamp.
  3. Builds the output contour:
    • Open paths — the forward offset, an end cap, the reverse offset, a start cap, all stitched into a single closed contour.
    • Closed paths — the outer and inner offsets become two separate closed paths. Output fill_rule is forced to NonZero so DrawShape renders the donut correctly (outer filled, inner cut out).

The output uses fresh PointIds. Per-vertex attributes from the input do not carry over (resampling changes vertex topology); per-path attributes (color, strokeWidth, opacity from ShapeAttributes) propagate to each output contour. A clean sequential index attribute is regenerated on the output points.

Usage Examples

Basic: thicken a trimmed line

Line → TrimPath(start: 0, end: 0.6) → Thicken(width: 12) → DrawShape (fillEnabled: true). The trimmed segment becomes a filled rectangle/capsule that can be styled, masked, or further processed as geometry.

Donut from a closed shape

Circle(radius: 100) → Thicken(width: 8) → DrawShape. Produces a ring. Equivalent to combining a +4 and -4 OffsetPath manually, but topology is correct out of the box.

Animated stroke fill

Path → Thicken(width: keyframed 0 → 30) → DrawShape. The stroke grows from invisible to its full thickness over time as a geometric region (animatable in ways a render-time stroke isn't).

Boolean ops on stroke regions

Line → Thicken → ShapeBoolean(Subtract) ← OtherShape → DrawShape. Cut chunks out of a thickened path using boolean ops — only possible because Thicken's output is a closed region with area.

Round-cap pen tip

EditableShape → Thicken(cap: Round, width: 20) → DrawShape. Gives the same visual result as DrawShape's stroke + round cap, but as geometry that can be deformed, animated, or chained into further shape ops.

Tips

  • Open vs closed input matters. Open paths get caps; closed paths become donut topology. Force a closed input by setting closed: true on EditableShape, or close downstream of TrimPath if needed.
  • Bezier sampling is fixed at 16 per segment in v1. For very long curves, downstream ResampleShape can smooth the result. For very short straight segments, no sampling cost.
  • Per-vertex attributes are dropped. Topology changes too much to carry them through meaningfully. If you need per-vertex styling, run ShapeAttributes after Thicken.
  • Compared to DrawShape's stroke: DrawShape's strokeWidth is a render-time effect — pixels only. Thicken produces a real geometric region you can boolean, deform, sample, or pipe back into another shape op. Use DrawShape's stroke for simple visual strokes; use Thicken when you need the area as data.
  • OffsetPath — parallel curve at signed distance; useful for inflating/contracting closed shapes without changing topology
  • TrimPath — common upstream when you want to thicken only a segment of a path
  • ResampleShape — post-Thicken smoothing for fewer / more uniform vertices
  • ShapeBoolean — boolean ops on thickened regions
  • DrawShape — rasterize the result; for a stroke effect with no extra geometry, prefer DrawShape's built-in stroke
  • RoundCorners — round the corners produced by Thicken's miter clamps