OpenSCAD User Manual/WIP/Offset Extrude

Offset Extrude edit

NOTE: offset_extrude() is not available in snapshot builds, but roof() provides similar functionality and is available in snapshots as of August 2022.

Offset Extrusion is a operation that takes a 2D object as input and generates a 3D object as a result.

The extrusion takes place on the Z axis by first taking an offset of the 3d object, then extruding up/down to that offset.

A slices parameter is also available to increase the resolution of the extrusion, increasing the number of offsets.

See offset() for how the offsetting works.

Usage

offset_extrude(height, r = 1, slices = 1, center = false[, $fn, $fa, $fs]) {...}

offset_extrude(height, delta = 1, slices = 1, chamfer = false, center = false[, $fn, $fa, $fs]) {...}

Parameters

height is the height of the extrude. It can be positive or negative.

slices is the number of slices to make, with an offset at each slice. It must be greater than or equal to 1.

r, delta, and chamfer define the offset function. It works exactly the same as offset().

center defines if the extrusion should be centered on the Z-Axis at the current 2d objects height.

Possible Issues

If an offset causes the resulting model to not generate, try increasing the number of slices. In many cases this will resolve any issues.

If an offset causes a resulting model to self-intersect, the resulting geometry may or may not be manifold.

There are other trivial cases where the resulting model is not valid, in which case using linear_extrude with scale may be a better solution.