Dimension
类型: 类
领域: 表达式、单位与公差
推荐导入: from cadflow import Dimension
签名
class Dimension(length: 'int' = 0, angle: 'int' = 0) -> None
功能说明
Dimension 是 CadFlow 表达式、单位与公差领域的公共类。
原始 API 说明
Physical dimension represented by integer length and angle exponents.
参数
| 名称 | 类型 | 必需 | 默认值 | 源码说明 |
|---|---|---|---|---|
length | 'int' | 否 | 0 | 源码 Docstring 未单独说明。 |
angle | 'int' | 否 | 0 | 源码 Docstring 未单独说明。 |
返回值
类型: None
源码 Docstring 未声明更多返回语义。
异常
源码 Docstring 未声明更窄的异常契约。类型、数值、所有权、路径或后端状态无效时,仍可能抛出相应公共异常。
数据字段
| 名称 | 类型 | 默认值 |
|---|---|---|
length | 'int' | 0 |
angle | 'int' | 0 |
公共成员
| 成员 | 类型 | 签名 | 说明 |
|---|---|---|---|
divide | method | (self, other: "'Dimension'") -> "'Dimension'" | 见成员签名。 |
from_dict | class method | (cls, data: 'Mapping[str, Any]') -> "'Dimension'" | 见成员签名。 |
is_design_dimension | property | - | 见成员签名。 |
is_dimensionless | property | - | 见成员签名。 |
multiply | method | (self, other: "'Dimension'") -> "'Dimension'" | 见成员签名。 |
name | property | - | 见成员签名。 |
power | method | (self, exponent: 'int') -> "'Dimension'" | 见成员签名。 |
square_root | method | (self) -> "'Dimension'" | 见成员签名。 |
symbol | property | - | 见成员签名。 |
to_dict | method | (self) -> 'Dict[str, int]' | 见成员签名。 |
行为与约束
- 实例是不可变 dataclass 值;更新式工作流会返回替代值。
导入检查
from cadflow import Dimension