How Non-Planar Slicing Works: Curved Layers, Print-Head Collisions, and 3-Axis G-Code

By Zimeng Xiong on

Non-planar (nonplanar) 3D printing moves the X, Y, and Z axes simultaneously during extrusion so toolpaths follow curved surfaces instead of stepping through flat horizontal planes. On unmodified 3-axis printers, the hard part is not generating 3D G-code moves. The hard part is keeping the nozzle cone, silicone sock, part-cooling fan ducts, bed probe, and X gantry from crashing into plastic that has already been printed. PancakeSlicer handles this inside an OrcaSlicer-derived C++ engine using per-printer 3D head envelopes, automatic slope step-downs, and post-slice collision checks.

Why planar slicing stair-steps sloped surfaces

Every conventional FDM slicer cuts a mesh into horizontal XY planes spaced by layer height (typically 0.12 to 0.24 mm). On vertical walls and flat tops, horizontal layers look clean. On gentle domes, fillets, airfoils, and ergonomic grips, horizontal slicing turns a smooth surface into visible concentric terraces. The shallower the slope, the wider each stair step becomes.

Dropping layer height to 0.08 mm shrinks the steps, multiplies print time, and still leaves visible rings. It also leaves curved structural walls weakest along the horizontal layer seams where shear stress pulls adjacent layers apart. Moving Z continuously along the surface eliminates terraces and lays uninterrupted extruded lines along the curve.

Why naive non-planar G-code crashes 3-axis printers

Research demos often run non-planar prints with long-reach nozzles and no cooling shroud. Stock desktop printers pack a lot of hardware right above the nozzle tip.

Cooling ducts and silicone socks

Part-cooling outlets and heater socks hang only a few millimeters above the nozzle tip. On a Bambu Lab A1 or A1 mini, the nozzle protrudes 4.76 mm below the silicone sock skirt and dual fan duct outlets, which extend 8 to 24 mm out on both sides in X.

Bed-leveling probes and dual nozzles

Older bedslingers place inductive probes almost flush with the nozzle. On a Prusa MK3S or MINI, the probe sits about 1.5 mm above the tip, leaving almost no clearance for dipping into concave regions or climbing ridges. Dual-nozzle toolheads such as the Bambu Lab H2D and X2D carry an idle second nozzle next to the active tip, restricting curved clearance in one direction.

The X gantry

The gantry spans the entire width of the build plate. Even if the nozzle clears a nearby slope, a tall printed feature across the bed can hit the gantry bar (25 mm above the tip on Bambu's A1 clearance envelope) when the nozzle dips into a lower pocket.

A single global angle limit (such as "never exceed 20 degrees") fails both ways: it still crashes when a tall wall sits beside a gentle slope, and it needlessly caps open domes where the print head has plenty of room.

How PancakeSlicer models the physical print head

PancakeSlicer bundles 54 print-head models across 32 printer families, nozzle sizes, and test rigs. Each model describes the physical toolhead in millimeter coordinates relative to the nozzle tip as stacked 3D clearance boxes: the flat nozzle tip and conical taper (for example, a 0.3 mm tip radius and 35-degree cone up to 4.76 mm on the A1 mini), the silicone sock and heater block, the left and right cooling ducts and shroud, the carriage, and the full-width gantry bar.

Every box carries 0.3 mm axial and lateral safety margins plus an allowance around freshly deposited beads. From that geometry, the slicer calculates directional clearance at every azimuth around the nozzle, so an asymmetric toolhead (a probe on one side or a single-sided fan duct) only gets tighter limits in the blocked direction.

Four non-planar slicing methods

Different shapes need different layer structures, so PancakeSlicer provides four non-planar strategies alongside standard flat layers:

MethodHow it worksBest suited for
Curved topsProjects the top shells (3 layers by default) onto gentle slopes where the print head clears.Parts that only need smooth sloped or domed upper surfaces over fast flat infill.
Smooth morphGradually deforms and blends layers from flat at the build plate to curved at the top (up to 1.4× print time).Domes, lids, and curved shells where surface transitions need to stay seamless.
Slant (experimental)Starts flat on the bed for adhesion, then tilts each layer progressively up to the print head's clearance limit.Angled geometries and overhangs that benefit from tilted planes.
Conformal layers (experimental)Extracts native iso-surfaces so top shells follow gentle curves at uniform thickness in unbroken layers.Continuous curved skins where consistent wall thickness matters.

Auto mode evaluates candidate strategies on each part and picks the cleanest collision-free result. For shallow slopes where you want planar slicing everywhere else, the quick print-style picker also exposes Z contour (flat layers with top toolpaths contoured in Z, also called Z-layer anti-aliasing). Non-planar waves can ripple top shells, the full part above a flat base, or sparse infill.

Because effective bead thickness changes as a nozzle climbs or descends a slope, PancakeSlicer modulates extrusion flow along curved passes so sloped lines match flat layers without over- or under-extruding.

Collision detection, angle step-down, and local repair

Before emitting G-code, PancakeSlicer checks every curved toolpath against both the printer's head model and all material already deposited below and beside the nozzle.

If the head envelope penetrates already-printed plastic deeper than the collision tolerance (1 mm by default), the engine automatically steps the maximum allowed slope down through 40, 35, 30, 25, 20, 16, and 12 degrees and reports the angle it used. Any patch the head still cannot clear drops back to flat horizontal layers.

When post-slice validation still finds localized interference, the engine regenerates the affected curved shells with local repairs for up to 3 passes by default. You can set the head clearance check to Off, Warn, or Block export, which refuses to export G-code if any collision remains. Printers without a bundled head model use a conservative generic envelope (a 15-degree stepped pyramid with a 20 mm gantry).

Calibrating custom toolheads with the 8-cone print

Aftermarket fan ducts, longer nozzles, or shifted silicone socks change real-world clearance. Under Calibration > Non-planar > Head clearance, PancakeSlicer generates a test plate of eight progressively steeper and taller cones. Watch the print to see where the sock, duct, or probe first grazes the plastic, enter the steepest clean cone, and save a custom head profile for your machine. Companion calibration tabs tune curved-surface flow on sloped swatches and verify custom head profiles against the test plate.

Hardware limits

A 3-axis printer still cannot reach deep narrow pockets or print steep 60-degree domes with a low-slung dual-duct shroud. Printers with low probes or dual nozzles (Prusa MK3S, Prusa MINI, Bambu Lab H2D, X2D) have tight clearance and stay limited to shallow curves. Inspect the 3D G-code preview before printing and supervise new non-planar setups.

See the non-planar slicer guide and comparison, browse the supported printers list, follow the Docker guide to self-host OrcaSlicer, or read how PancakeSlicer runs OrcaSlicer headless without VNC.