跳到主要内容

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_dictmethod(self) -> 'dict[str, Any]'见成员签名。
write_jsonmethod(self, path: 'str | Path', *, indent: 'int' = 2) -> 'Path'见成员签名。

行为与约束

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

导入检查

from cadflow.inspect.brep import BRepInspection

相关内容