BRepInspection
类型: 类
领域: 检查
推荐导入: from cadflow.inspect.brep import BRepInspection
签名
class BRepInspection(source: 'str | None', valid: 'bool', counts: 'dict[str, int]', bounding_box: 'list[float]', volume: 'float', surface_area: 'float', center_of_mass: 'list[float]', surface_type_counts: 'dict[str, int]', edge_type_counts: 'dict[str, int]', faces: 'list[dict[str, Any]]', edges: 'list[dict[str, Any]]') -> None
功能说明
BRepInspection 是 CadFlow 检查领域的公共类。
原始 API 说明
JSON-serializable geometry and topology facts for one BREP.
参数
| 名称 | 类型 | 必需 | 默认值 | 源码说明 |
|---|---|---|---|---|
source | 'str | None' | 是 | - | 源码 Docstring 未单独说明。 |
valid | 'bool' | 是 | - | 源码 Docstring 未单独说明。 |
counts | 'dict[str, int]' | 是 | - | 源码 Docstring 未单独说明。 |
bounding_box | 'list[float]' | 是 | - | 源码 Docstring 未单独说明。 |
volume | 'float' | 是 | - | 源码 Docstring 未单独说明。 |
surface_area | 'float' | 是 | - | 源码 Docstring 未单独说明。 |
center_of_mass | 'list[float]' | 是 | - | 源码 Docstring 未单独说明。 |
surface_type_counts | 'dict[str, int]' | 是 | - | 源码 Docstring 未单独说明。 |
edge_type_counts | 'dict[str, int]' | 是 | - | 源码 Docstring 未单独说明。 |
faces | 'list[dict[str, Any]]' | 是 | - | 源码 Docstring 未单独说明。 |
edges | 'list[dict[str, Any]]' | 是 | - | 源码 Docstring 未单独说明。 |
返回值
类型: None
源码 Docstring 未声明更多返回语义。
异常
源码 Docstring 未声明更窄的异常契约。类型、数值、所有权、路径或后端状态无效时,仍可能抛出相应公共异常。
数据字段
| 名称 | 类型 | 默认值 |
|---|---|---|
source | 'str | None' | required |
valid | 'bool' | required |
counts | 'dict[str, int]' | required |
bounding_box | 'list[float]' | required |
volume | 'float' | required |
surface_area | 'float' | required |
center_of_mass | 'list[float]' | required |
surface_type_counts | 'dict[str, int]' | required |
edge_type_counts | 'dict[str, int]' | required |
faces | 'list[dict[str, Any]]' | required |
edges | 'list[dict[str, Any]]' | required |
公共成员
| 成员 | 类型 | 签名 | 说明 |
|---|---|---|---|
to_dict | method | (self) -> 'dict[str, Any]' | 见成员签名。 |
write_json | method | (self, path: 'str | Path', *, indent: 'int' = 2) -> 'Path' | 见成员签名。 |
行为与约束
- 实例是不可变 dataclass 值;更新式工作流会返回替代值。
导入检查
from cadflow.inspect.brep import BRepInspection