Module offset

Module offset 

Source
Expand description

Computation of offset curves of cubic Bรฉziers.

The main algorithm in this module is a new technique designed for robustness and speed. The details are involved; hopefully there will be a paper.

Structsยง

CubicOffset ๐Ÿ”’
State used for computing an offset curve of a single cubic.
ErrEval ๐Ÿ”’
Result of error evaluation
OffsetRec ๐Ÿ”’
State local to a subdivision
SubdivisionPoint ๐Ÿ”’
Result of subdivision

Constantsยง

A_WEIGHTS ๐Ÿ”’
BLEND ๐Ÿ”’
The proportion of transverse error that is blended in the least-squares logic.
B_WEIGHTS ๐Ÿ”’
CUSP_EPSILON ๐Ÿ”’
MAX_DEPTH ๐Ÿ”’
Maximum recursion depth.
N_LSE ๐Ÿ”’
Number of points for least-squares fit and error evaluation.

Functionsยง

mk_a_weights ๐Ÿ”’
Compute Bรฉzier weights for evenly subdivided t values.
offset_cubic
Compute an approximate offset curve.