PhysicalConnectionLayer
类型: 类
领域: 物理连接
推荐导入: from cadflow import PhysicalConnectionLayer
签名
class PhysicalConnectionLayer(assembly_id: 'str', connections: 'tuple[PhysicalConnection, ...]' = (), length_unit: 'str' = 'mm', force_unit: 'str' = 'N', time_unit: 'str' = 's', metadata: 'dict[str, Any]' = <factory>) -> None
功能说明
保存可验证、可序列化的降阶物理连接集合。
原始 API 说明
Immutable physical connection graph associated with one assembly.
其他公共导入路径
from cadflow.physical import PhysicalConnectionLayer
参数
| 名称 | 类型 | 必需 | 默认值 | 源码说明 |
|---|---|---|---|---|
assembly_id | 'str' | 是 | - | 源码 Docstring 未单独说明。 |
connections | 'tuple[PhysicalConnection, ...]' | 否 | () | 源码 Docstring 未单独说明。 |
length_unit | 'str' | 否 | 'mm' | 源码 Docstring 未单独说明。 |
force_unit | 'str' | 否 | 'N' | 源码 Docstring 未单独说明。 |
time_unit | 'str' | 否 | 's' | 源码 Docstring 未单独说明。 |
metadata | 'dict[str, Any]' | 否 | <factory> | 源码 Docstring 未单独说明。 |
返回值
类型: None
源码 Docstring 未声明更多返回语义。
异常
源码 Docstring 未声明更窄的异常契约。类型、数值、所有权、路径或后端状态无效时,仍可能抛出相应公共异常。
数据字段
| 名称 | 类型 | 默认值 |
|---|---|---|
assembly_id | 'str' | required |
connections | 'tuple[PhysicalConnection, ...]' | () |
length_unit | 'str' | 'mm' |
force_unit | 'str' | 'N' |
time_unit | 'str' | 's' |
metadata | 'dict[str, Any]' | factory |
公共成员
| 成员 | 类型 | 签名 | 说明 |
|---|---|---|---|
connection_ids | method | (self) -> 'tuple[str, ...]' | 见成员签名。 |
connections_between | method | (self, component_a: 'str', component_b: 'str') -> 'tuple[PhysicalConnection, ...]' | 见成员签名。 |
connections_for_component | method | (self, component_id: 'str') -> 'tuple[PhysicalConnection, ...]' | 见成员签名。 |
from_dict | class method | (cls, data: 'Mapping[str, Any]') -> "'PhysicalConnectionLayer'" | 见成员签名。 |
from_json | class method | (cls, value: 'str | bytes | bytearray') -> "'PhysicalConnectionLayer'" | 见成员签名。 |
get_connection | method | (self, connection_id: 'str') -> 'PhysicalConnection' | 见成员签名。 |
SCHEMA_VERSION | constant | - | str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
to_dict | method | (self) -> 'dict[str, Any]' | 见成员签名。 |
to_json | method | (self, *, indent: 'Optional[int]' = None) -> 'str' | 见成员签名。 |
with_connection | method | (self, connection: 'PhysicalConnection') -> "'PhysicalConnectionLayer'" | 见成员签名。 |
without_connection | method | (self, connection_id: 'str') -> "'PhysicalConnectionLayer'" | 见成员签名。 |
行为与约束
- 实例是不可变 dataclass 值;更新式工作流会返回替代值。
导入检查
from cadflow import PhysicalConnectionLayer