Skip to content

csg.unsafe

1 functions / 0 types

Index

FunctionDescription
block_modelCombines two stored block models with CSG and returns a new model handle.

block_model

def block_model(
    *,
    left: types.RemoteHandle,
    relative_translation: types.math.Vec3,
    relative_rotation: types.math.Quat,
    right: types.RemoteHandle,
    csg_op: types.csg.BlockModelCsgOp,
    run_on_server: bool | None = None,
    _transaction_id: str | None = None
) -> types.RemoteHandle

Combines two stored block models with CSG and returns a new model handle.

This low-level task uses model handles and the supplied relative pose. It does not create a project node, attach a representation, change input visibility, or inherit an appearance. Use the returned handle as representation data when displaying the result.

In-process execution is native-only. Browser WASM execution requires run_on_server = true. The remote CSG service is configured by activating an authenticated remote project; setting a server URL alone does not configure it. Both input handles must exist in that project’s model store, and the service must support the configured CSG geometry settings.

Returns RemoteHandle.

left : RemoteHandle

The “base” model the operation is applied relative to.

relative_translation : Vec3

Translation of right expressed in left’s frame.

relative_rotation : Quat

Rotation of right expressed in left’s frame.

right : RemoteHandle

The model combined with left.

csg_op : BlockModelCsgOp

The CSG operation to apply.

run_on_server optional : bool | None

Execute the operation on the remote CSG service instead of in-process. Defaults to None.

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.