Skip to main content

Assembly

Kind: Class
Domain: Assembly
Canonical import: from cadflow import Assembly

Signature

class Assembly(assembly_id: 'str', name: 'Optional[str]' = None, components: 'Tuple[Component, ...]' = (), connectors: 'Tuple[Connector, ...]' = (), constraints: 'Tuple[Constraint, ...]' = (), grounded_component_ids: 'Tuple[str, ...]' = (), _metadata: 'Dict[str, Any]' = <factory>, _runtime: 'Dict[str, Any]' = <factory>) -> None

Description

Product structure containing placed Part or subassembly components.

Other public imports

  • from cadflow.assembly import Assembly

Parameters

NameTypeRequiredDefaultSource description
assembly_id'str'yes-Not explicitly described in the source docstring.
name'Optional[str]'noNoneNot explicitly described in the source docstring.
components'Tuple[Component, ...]'no()Not explicitly described in the source docstring.
connectors'Tuple[Connector, ...]'no()Not explicitly described in the source docstring.
constraints'Tuple[Constraint, ...]'no()Not explicitly described in the source docstring.
grounded_component_ids'Tuple[str, ...]'no()Not explicitly described in the source docstring.
_metadata'Dict[str, Any]'no&lt;factory&gt;Not explicitly described in the source docstring.
_runtime'Dict[str, Any]'no&lt;factory&gt;Not explicitly described in the source docstring.

Returns

Type: None

The source docstring does not declare additional return semantics.

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.

Data fields

NameTypeDefault
assembly_id'str'required
name'Optional[str]'None
components'Tuple[Component, ...]'()
connectors'Tuple[Connector, ...]'()
constraints'Tuple[Constraint, ...]'()
grounded_component_ids'Tuple[str, ...]'()
_metadata'Dict[str, Any]'factory
_runtime'Dict[str, Any]'factory

Public members

MemberKindSignatureDescription
component_idsmethod(self) -&gt; 'Tuple[str, ...]'See the member signature.
connector_idsmethod(self) -&gt; 'Tuple[str, ...]'See the member signature.
constraint_idsmethod(self) -&gt; 'Tuple[str, ...]'See the member signature.
get_componentmethod(self, component_id: 'str') -&gt; 'Component'See the member signature.
get_connectormethod(self, connector_id: 'str') -&gt; 'Connector'See the member signature.
get_constraintmethod(self, constraint_id: 'str') -&gt; 'Constraint'See the member signature.
to_dictmethod(self) -&gt; 'Dict[str, Any]'See the member signature.
with_componentmethod(self, component: 'Component') -&gt; "'Assembly'"See the member signature.
with_component_placementmethod(self, component_id: 'str', placement: 'Placement') -&gt; "'Assembly'"See the member signature.
with_connectormethod(self, connector: 'Connector') -&gt; "'Assembly'"See the member signature.
with_constraintmethod(self, constraint: 'Constraint') -&gt; "'Assembly'"See the member signature.
with_grounded_componentmethod(self, component_id: 'str') -&gt; "'Assembly'"See the member signature.
without_grounded_componentmethod(self, component_id: 'str') -&gt; "'Assembly'"See the member signature.

Behavior and constraints

  • Instances are immutable dataclass values; update workflows return a replacement value.

Import check

from cadflow import Assembly

See also