Skip to main content

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

NameTypeRequiredDefaultSource 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]'noNoneNot explicitly described in the source docstring.
material'Optional[Material]'noNoneNot explicitly described in the source docstring.
connectors'Tuple[Connector, ...]'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
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

MemberKindSignatureDescription
connector_idsmethod(self) -&gt; 'Tuple[str, ...]'See the member signature.
get_connectormethod(self, connector_id: 'str') -&gt; 'Connector'See the member signature.
to_dictmethod(self) -&gt; 'Dict[str, Any]'See the member signature.
with_connectormethod(self, connector: 'Connector') -&gt; "'Part'"See the member signature.
with_materialmethod(self, material: 'Material') -&gt; "'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

See also