跳到主要内容

Assembly

类型:
领域: 装配
推荐导入: from cadflow import Assembly

签名

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

功能说明

Assembly 是 CadFlow 装配领域的公共类。

原始 API 说明

Product structure containing placed Part or subassembly components.

其他公共导入路径

  • from cadflow.assembly import Assembly

参数

名称类型必需默认值源码说明
assembly_id'str'-源码 Docstring 未单独说明。
name'Optional[str]'None源码 Docstring 未单独说明。
components'Tuple[Component, ...]'()源码 Docstring 未单独说明。
connectors'Tuple[Connector, ...]'()源码 Docstring 未单独说明。
constraints'Tuple[Constraint, ...]'()源码 Docstring 未单独说明。
grounded_component_ids'Tuple[str, ...]'()源码 Docstring 未单独说明。
_metadata'Dict[str, Any]'&lt;factory&gt;源码 Docstring 未单独说明。
_runtime'Dict[str, Any]'&lt;factory&gt;源码 Docstring 未单独说明。

返回值

类型: None

源码 Docstring 未声明更多返回语义。

异常

源码 Docstring 未声明更窄的异常契约。类型、数值、所有权、路径或后端状态无效时,仍可能抛出相应公共异常。

数据字段

名称类型默认值
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

公共成员

成员类型签名说明
component_idsmethod(self) -&gt; 'Tuple[str, ...]'见成员签名。
connector_idsmethod(self) -&gt; 'Tuple[str, ...]'见成员签名。
constraint_idsmethod(self) -&gt; 'Tuple[str, ...]'见成员签名。
get_componentmethod(self, component_id: 'str') -&gt; 'Component'见成员签名。
get_connectormethod(self, connector_id: 'str') -&gt; 'Connector'见成员签名。
get_constraintmethod(self, constraint_id: 'str') -&gt; 'Constraint'见成员签名。
to_dictmethod(self) -&gt; 'Dict[str, Any]'见成员签名。
with_componentmethod(self, component: 'Component') -&gt; "'Assembly'"见成员签名。
with_component_placementmethod(self, component_id: 'str', placement: 'Placement') -&gt; "'Assembly'"见成员签名。
with_connectormethod(self, connector: 'Connector') -&gt; "'Assembly'"见成员签名。
with_constraintmethod(self, constraint: 'Constraint') -&gt; "'Assembly'"见成员签名。
with_grounded_componentmethod(self, component_id: 'str') -&gt; "'Assembly'"见成员签名。
without_grounded_componentmethod(self, component_id: 'str') -&gt; "'Assembly'"见成员签名。

行为与约束

  • 实例是不可变 dataclass 值;更新式工作流会返回替代值。

导入检查

from cadflow import Assembly

相关内容