Skip to main content

offset()

Offsets sketch geometry by the given distance. With no targets, offsets the whole sketch (or the last select(...) result if one precedes it).

Returns: Offset

tip

See the guide for detailed usage examples.

Signatures

offset(distance?: NumberParam, removeOriginal?: BooleanParam, ...targets: (ISceneObject | EdgeFilterBuilder)[]): Offset

Offsets sketch geometry by the given distance. With no targets, offsets the whole sketch (or the last select(...) result if one precedes it).

ParameterTypeDescription
distanceNumberParamThe offset distance (defaults to 1) (optional)
removeOriginalBooleanParamWhether to remove the original geometry (optional)
...targets(ISceneObject | EdgeFilterBuilder)[]Optional geometries, edge accessors (r.edge('top')), or edge filters (edge().arc()) to offset instead of the whole sketch (optional)

offset(distance: NumberParam, ...targets: (ISceneObject | EdgeFilterBuilder)[]): Offset

Offsets the given targets by the given distance.

Outside a sketch, targets may be one or more coplanar faces (a select(face()...) result or a solid op's face accessor like body.endFaces()); with no targets the preceding select(...) is used. The offset outlines are created on the face plane — a positive distance offsets outward and shrinks holes — and the result is extrudable like any sketch.

ParameterTypeDescription
distanceNumberParamThe offset distance
...targets(ISceneObject | EdgeFilterBuilder)[]Geometries, edge accessors, edge filters, or (outside a sketch) coplanar face selections to offset (optional)