Skip to main content

analyze_tolerance

Kind: Function
Domain: Expressions, units, and tolerances
Canonical import: from cadflow import analyze_tolerance

Signature

def analyze_tolerance(value: 'ScalarLike', *, method: 'ToleranceMethod' = 'worst_case') -> 'ToleranceAnalysis'

Description

Propagate source manufacturing tolerances through a scalar expression.

Propagate source manufacturing tolerances through a scalar expression.

worst_case returns guaranteed interval bounds. Affine chains are dependency-aware, so repeated variables such as x - x cancel exactly; nonlinear chains use conservative interval arithmetic. rss performs a first-order root-sum-square calculation using analytic sensitivities.

Unit-aware variables are converted to canonical CAD units before propagation. The returned analysis reports the inferred physical dimension and canonical result unit. Every variable in the expression must declare a source tolerance.

Parameters

NameTypeRequiredDefaultSource description
value'ScalarLike'yes-Not explicitly described in the source docstring.
method'ToleranceMethod'no'worst_case'Not explicitly described in the source docstring.

Returns

Type: 'ToleranceAnalysis'

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.

Behavior and constraints

  • The contract below is generated from the current public runtime signature. Check domain notes for ownership and workflow constraints.

Import check

from cadflow import analyze_tolerance

See also