In most CAD tools a fillet is a separate step: build the shape, then pick edges and round them, and hope the fillet tool can resolve the geometry. In a signed distance field (SDF) modeller the fillet is part of the Boolean itself. One number — the blend width — decides whether two shapes meet in a sharp crease or flow into each other.

Below is a cube and a sphere joined by one SDF Boolean. Drag the blend radius and watch it happen. Everything runs in the browser on Rig Cad's engine, and you can download the result.

SDF smooth blend playground
Project

SDF smooth blend playground

@p12/sdf-smooth-blend-playground
SDF smooth blend playground
SDF smooth blend playground

A cube and a sphere under one SDF Boolean. Blend radius is the smooth width in millimetres: 0 is an ordinary sharp Boolean, and anything above it grows a fillet where the shapes meet. Switch the operation to see the same blend scoop a rounded pocket (difference) or soften a lens (intersection).

@p12/sdf-smooth-blend-playground
A cube and a sphere under one SDF Boolean. Blend radius is the smooth width in millimetres: 0 is an ordinary sharp Boolean, and anything above it grows a fillet where the shapes meet. Switch the operation to see the same blend scoop a rounded pocket (difference) or soften a lens (intersection).

How a smooth blend works

An SDF describes a shape as a function: for any point in space it returns the distance to the surface, negative inside and positive outside. Booleans become arithmetic on those distances. A union keeps the smaller of the two distances; a difference and an intersection are built from the same minimum and maximum.

A smooth union replaces that hard minimum with a smooth one. Where the two distances are far apart, nothing changes. Where they are close — within the blend width of each other, which is exactly the neighbourhood of the join — the two values are mixed, and the surface rounds over instead of meeting in a crease.

Two consequences are worth knowing before you use it on a real part:

  • The blend value is a width, not a fillet radius. How far the rounding reaches depends on how the shapes meet, so measure the result rather than assuming millimetres.
  • A smooth union adds material. It fills the neck and swells the outline near the join. If an outer dimension matters, clip the blend group to its bounds or trim the bulge with a following cut.

The full picture — exact primitives, Boolean composition, sphere tracing and level sets — is in Signed Distance Fields (SDF) Explained: Geometry as a Function.

Rules that keep blended parts accurate

  • Blend the body, cut the holes sharp. Put the shapes you want flowing together in one smooth group, and put bores, slots and windows in a plain Boolean above it. A hole inside the blend group gets rounded into a blob; the same hole outside it stays crisp.
  • Keep the blend under half the gap. Two features closer together than about twice the blend width will fuse into one. Check that the part still has the number of bodies you expect.
  • Blend in 2D before you extrude. A smooth 2D Boolean on a profile gives self-filleting necks and webs for a fraction of the cost of a 3D blend.
  • Mind the sample size. An SDF is meshed from samples, so very sharp edges inside a blend group come out slightly stepped. Round them a little, or refine the precision — Why Is My Model Slow? explains the trade-off.

Where to go next