Skip to main content

BSplineFitResult

Kind: Class
Domain: Other public symbols
Canonical import: from cadflow import BSplineFitResult

Signature

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

Description

Result from fitting a cubic B-spline to sampled curve points.

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.

Parameters

NameTypeRequiredDefaultSource description
degree'int'yes-Not explicitly described in the source docstring.
control_points'Tuple[PointTuple, ...]'yes-Not explicitly described in the source docstring.
knots'Tuple[float, ...]'yes-Not explicitly described in the source docstring.
sample_parameters'Tuple[float, ...]'yes-Not explicitly described in the source docstring.
max_error'float'yes-Not explicitly described in the source docstring.
rms_error'float'yes-Not explicitly described in the source docstring.
tolerance'float'yes-Not explicitly described in the source docstring.
fairing'float'yes-Not explicitly described in the source docstring.
iterations'int'yes-Not explicitly described in the source docstring.
converged'bool'yes-Not explicitly described in the source docstring.

Returns

Type: None

The source docstring does not declare additional return semantics.

Errors

The source docstring does not declare a narrower exception contract. Invalid types, values, ownership, paths, or backend state may still raise the corresponding public error.

Data fields

NameTypeDefault
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

Public members

MemberKindSignatureDescription
control_countproperty-Number of fitted B-spline control points.
dimensionproperty-Coordinate dimension of each fitted control point.
evaluatemethod(self, parameter: 'float') -> 'PointTuple'Evaluate the fitted B-spline at a normalized parameter in [0, 1].
multiplicitiesproperty-Return knot multiplicities aligned with unique_knots.
to_dictmethod(self) -> 'dict[str, Any]'Return a JSON-serializable representation of the fit result.
unique_knotsproperty-Return knot values with repeated entries collapsed.

Behavior and constraints

  • Instances are immutable dataclass values; update workflows return a replacement value.

Import check

from cadflow import BSplineFitResult

See also