Part
Kind: Class
Domain: Assembly
Canonical import: from cadflow import Part
Signature
class Part(part_id: 'str', body: 'Solid', name: 'Optional[str]' = None, material: 'Optional[Material]' = None, connectors: 'Tuple[Connector, ...]' = (), _metadata: 'Dict[str, Any]' = <factory>, _runtime: 'Dict[str, Any]' = <factory>) -> None
Description
Single-body product item wrapping exactly one Solid.
Other public imports
from cadflow.assembly import Part
Parameters
| Name | Type | Required | Default | Source description |
|---|---|---|---|---|
part_id | 'str' | yes | - | Not explicitly described in the source docstring. |
body | 'Solid' | yes | - | Not explicitly described in the source docstring. |
name | 'Optional[str]' | no | None | Not explicitly described in the source docstring. |
material | 'Optional[Material]' | no | None | Not explicitly described in the source docstring. |
connectors | 'Tuple[Connector, ...]' | 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 |
|---|---|---|
part_id | 'str' | required |
body | 'Solid' | required |
name | 'Optional[str]' | None |
material | 'Optional[Material]' | None |
connectors | 'Tuple[Connector, ...]' | () |
_metadata | 'Dict[str, Any]' | factory |
_runtime | 'Dict[str, Any]' | factory |
Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
connector_ids | method | (self) -> 'Tuple[str, ...]' | See the member signature. |
get_connector | method | (self, connector_id: 'str') -> 'Connector' | See the member signature. |
to_dict | method | (self) -> 'Dict[str, Any]' | See the member signature. |
with_connector | method | (self, connector: 'Connector') -> "'Part'" | See the member signature. |
with_material | method | (self, material: 'Material') -> "'Part'" | See the member signature. |
Behavior and constraints
- Instances are immutable dataclass values; update workflows return a replacement value.
Import check
from cadflow import Part