BSplineFitResult
类型: 类
领域: 其他公共符号
推荐导入: from cadflow import BSplineFitResult
签名
class BSplineFitResult(degree: 'int', control_points: 'Tuple[PointTuple, ...]', knots: 'Tuple[float, ...]', sample_parameters: 'Tuple[float, ...]', max_error: 'float', rms_error: 'float', tolerance: 'float', fairing: 'float', iterations: 'int', converged: 'bool') -> None
功能说明
BSplineFitResult 是 CadFlow 其他公共符号领域的公共类。
原始 API 说明
Result from fitting a cubic B-spline to sampled curve points.
The result stores a complete, normalized B-spline definition suitable for passing into the exact B-spline edge/wire APIs: cubic degree, control points, and a full clamped knot vector.
参数
| 名称 | 类型 | 必需 | 默认值 | 源码说明 |
|---|---|---|---|---|
degree | 'int' | 是 | - | 源码 Docstring 未单独说明。 |
control_points | 'Tuple[PointTuple, ...]' | 是 | - | 源码 Docstring 未单独说明。 |
knots | 'Tuple[float, ...]' | 是 | - | 源码 Docstring 未单独说明。 |
sample_parameters | 'Tuple[float, ...]' | 是 | - | 源码 Docstring 未单独说明。 |
max_error | 'float' | 是 | - | 源码 Docstring 未单独说明。 |
rms_error | 'float' | 是 | - | 源码 Docstring 未单独说明。 |
tolerance | 'float' | 是 | - | 源码 Docstring 未单独说明。 |
fairing | 'float' | 是 | - | 源码 Docstring 未单独说明。 |
iterations | 'int' | 是 | - | 源码 Docstring 未单独说明。 |
converged | 'bool' | 是 | - | 源码 Docstring 未单独说明。 |
返回值
类型: None
源码 Docstring 未声明更多返回语义。
异常
源码 Docstring 未声明更窄的异常契约。类型、数值、所有权、路径或后端状态无效时,仍可能抛出相应公共异常。
数据字段
| 名称 | 类型 | 默认值 |
|---|---|---|
degree | 'int' | required |
control_points | 'Tuple[PointTuple, ...]' | required |
knots | 'Tuple[float, ...]' | required |
sample_parameters | 'Tuple[float, ...]' | required |
max_error | 'float' | required |
rms_error | 'float' | required |
tolerance | 'float' | required |
fairing | 'float' | required |
iterations | 'int' | required |
converged | 'bool' | required |
公共成员
| 成员 | 类型 | 签名 | 说明 |
|---|---|---|---|
control_count | property | - | Number of fitted B-spline control points. |
dimension | property | - | Coordinate dimension of each fitted control point. |
evaluate | method | (self, parameter: 'float') -> 'PointTuple' | Evaluate the fitted B-spline at a normalized parameter in [0, 1]. |
multiplicities | property | - | Return knot multiplicities aligned with unique_knots. |
to_dict | method | (self) -> 'dict[str, Any]' | Return a JSON-serializable representation of the fit result. |
unique_knots | property | - | Return knot values with repeated entries collapsed. |
行为与约束
- 实例是不可变 dataclass 值;更新式工作流会返回替代值。
导入检查
from cadflow import BSplineFitResult