Skip to main content

Transformable

Extends SceneObject

Inherited from SceneObject

name()

name(value: string): this

Sets a custom display name for this object, overriding the default type-based name.

ParameterTypeDescription
valuestringThe display name to assign.

guide()

guide(): this

Marks this object as construction geometry. Guide objects are excluded from final geometry output unless explicitly included.


reusable()

reusable(): this

Marks this object as reusable. Reusable objects retain their shapes when consumed by features (e.g., extrude, revolve), allowing multiple features to reference the same source geometry. Use remove(obj) to force-remove shapes from a reusable object.

Methods

transform()

transform(matrix: Matrix4): this

Composes a 4x4 transformation matrix onto this object. Applied to the object's own shapes after build. Chained calls compose left-to-right: .translate(T).rotate(R) applies translation first, then rotation.

ParameterTypeDescription
matrixMatrix4

translate()

translate(x: number): this

Translate along X.

ParameterTypeDescription
xnumberDistance along world X.

translate()

translate(x: number, y: number): this

Translate along X and Y.

ParameterTypeDescription
xnumber
ynumber

translate()

translate(x: number, y: number, z: number): this

Translate along X, Y, and Z.

ParameterTypeDescription
xnumber
ynumber
znumber

translate()

translate(offset: PointLike): this

Translate by a point-like offset in world space.

ParameterTypeDescription
offsetPointLike

rotate()

rotate(angle: number): this

Rotate by an angle around world Z through the origin.

ParameterTypeDescription
anglenumberRotation in degrees.

rotate()

rotate(axis: AxisLike, angle: number): this

Rotate around an axis by an angle.

ParameterTypeDescription
axisAxisLikeThe axis to rotate around. Use local(...) to reference a sketch-local axis.
anglenumberRotation in degrees.

mirror()

mirror(plane: PlaneLike): this

Mirror across a plane.

ParameterTypeDescription
planePlaneLike

mirror()

mirror(axis: AxisLike): this

Mirror across an axis (primarily useful for 2D geometry).

ParameterTypeDescription
axisAxisLike