SliceComparison
类型: 类
领域: 检查
推荐导入: from cadflow.inspect.brep import SliceComparison
签名
class SliceComparison(target: 'str | None', candidate: 'str | None', total_samples: 'int', xor_samples: 'int', sampled_slices_identical: 'bool', panels: 'tuple[SlicePanelResult, ...]', image: 'str | None' = None) -> None
功能说明
SliceComparison 是 CadFlow 检查领域的公共类。
原始 API 说明
SliceComparison(target: 'str | None', candidate: 'str | None', total_samples: 'int', xor_samples: 'int', sampled_slices_identical: 'bool', panels: 'tuple[SlicePanelResult, ...]', image: 'str | None' = None)
参数
| 名称 | 类型 | 必需 | 默认值 | 源码说明 |
|---|---|---|---|---|
target | 'str | None' | 是 | - | 源码 Docstring 未单独说明。 |
candidate | 'str | None' | 是 | - | 源码 Docstring 未单独说明。 |
total_samples | 'int' | 是 | - | 源码 Docstring 未单独说明。 |
xor_samples | 'int' | 是 | - | 源码 Docstring 未单独说明。 |
sampled_slices_identical | 'bool' | 是 | - | 源码 Docstring 未单独说明。 |
panels | 'tuple[SlicePanelResult, ...]' | 是 | - | 源码 Docstring 未单独说明。 |
image | 'str | None' | 否 | None | 源码 Docstring 未单独说明。 |
返回值
类型: None
源码 Docstring 未声明更多返回语义。
异常
源码 Docstring 未声明更窄的异常契约。类型、数值、所有权、路径或后端状态无效时,仍可能抛出相应公共异常。
数据字段
| 名称 | 类型 | 默认值 |
|---|---|---|
target | 'str | None' | required |
candidate | 'str | None' | required |
total_samples | 'int' | required |
xor_samples | 'int' | required |
sampled_slices_identical | 'bool' | required |
panels | 'tuple[SlicePanelResult, ...]' | required |
image | 'str | None' | None |
公共成员
| 成员 | 类型 | 签名 | 说明 |
|---|---|---|---|
to_dict | method | (self) -> 'dict[str, Any]' | 见成员签名。 |
write_json | method | (self, path: 'str | Path', *, indent: 'int' = 2) -> 'Path' | 见成员签名。 |
行为与约束
- 实例是不可变 dataclass 值;更新式工作流会返回替代值。
导入检查
from cadflow.inspect.brep import SliceComparison