Skip to main content

union

Kind: Function
Domain: Modeling and geometry
Canonical import: from cadflow import union

Signature

def union(*solids: 'Union[Solid, Sequence[Solid]]', clean: 'bool' = True, glue: 'bool' = False, tol: 'Optional[float]' = None, tracking_policy: 'TrackingPolicy | str' = <TrackingPolicy.FULL: 'full'>) -> 'Solid'

Description

Compute the boolean union and return one manifold solid.

Compute the boolean union and return one manifold solid.

Face-area contact and positive-volume overlap can produce one solid without artificial embedding. Edge-only, vertex-only, and point/curve tangencies are non-manifold connections and cannot satisfy the one-Solid contract.

glue is an OCC optimization for compatible touching or coincident topology, not a geometry repair switch. If the optimized pass does not return one solid, CadFlow automatically retries the normal fuse algorithm.

Other public imports

  • from cadflow import union_rsolid

Parameters

NameTypeRequiredDefaultSource description
solids'Union[Solid, Sequence[Solid]]'no-One or more Solid objects or sequences of Solid. Nested sequences are flattened before processing.
clean'bool'noTrueUnify same-domain faces and remove splitter edges when possible.
glue'bool'noFalseTry OCC glue optimization first, then fall back to normal fuse if necessary. Defaults to False.
tol'Optional[float]'noNoneOptional finite non-negative fuzzy-boolean tolerance used by OCC. It may intentionally bridge a small gap but cannot make a non-manifold point or edge contact into a valid solid.
tracking_policy'TrackingPolicy | str'no&lt;TrackingPolicy.FULL: 'full'&gt;FULL computes topology history and lineage. GRAPH keeps the replayable operation node without computing a TopoDelta.

Returns

Type: 'Solid'

Solid: The merged union result.

Usage: Accepts standalone Solid objects, lists of Solid, and nested sequences, but always returns exactly one Solid. If the kernel cannot produce exactly one solid result, the API raises a clear error instead of returning multiple pieces.

Errors

The source docstring does not declare a narrower exception contract. Invalid types, values, ownership, paths, or backend state may still raise the corresponding public error.

Behavior and constraints

  • The contract below is generated from the current public runtime signature. Check domain notes for ownership and workflow constraints.

Import check

from cadflow import union

See also