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
| Name | Type | Required | Default | Source description |
|---|---|---|---|---|
assembly_id | 'str' | yes | - | Not explicitly described in the source docstring. |
name | 'Optional[str]' | no | None | Not 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 | <factory> | Not explicitly described in the source docstring. |
_runtime | 'Dict[str, Any]' | no | <factory> | 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
| Name | Type | Default |
|---|---|---|
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
| Member | Kind | Signature | Description |
|---|---|---|---|
component_ids | method | (self) -> 'Tuple[str, ...]' | See the member signature. |
connector_ids | method | (self) -> 'Tuple[str, ...]' | See the member signature. |
constraint_ids | method | (self) -> 'Tuple[str, ...]' | See the member signature. |
get_component | method | (self, component_id: 'str') -> 'Component' | See the member signature. |
get_connector | method | (self, connector_id: 'str') -> 'Connector' | See the member signature. |
get_constraint | method | (self, constraint_id: 'str') -> 'Constraint' | See the member signature. |
to_dict | method | (self) -> 'Dict[str, Any]' | See the member signature. |
with_component | method | (self, component: 'Component') -> "'Assembly'" | See the member signature. |
with_component_placement | method | (self, component_id: 'str', placement: 'Placement') -> "'Assembly'" | See the member signature. |
with_connector | method | (self, connector: 'Connector') -> "'Assembly'" | See the member signature. |
with_constraint | method | (self, constraint: 'Constraint') -> "'Assembly'" | See the member signature. |
with_grounded_component | method | (self, component_id: 'str') -> "'Assembly'" | See the member signature. |
without_grounded_component | method | (self, component_id: 'str') -> "'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