SequentialAligner

Sequential alignment for open ↔ open shapes with reversal detection

When both shapes are open, vertices have natural sequential correspondence (start to start, end to end). However, if the paths are oriented in opposite directions, reversing one path may produce a better morph. This aligner: 1. Validates vertex counts match 2. Compares total distance for normal vs reversed alignment 3. Returns the orientation that minimizes total euclidean distance

Constructor

SequentialAligner(args, kwargs)

Methods

align

align(
    verts1: Points2D,
    verts2: Points2D,
    context: AlignmentContext,
    rotation_target: float | None = None
) -> Tuple[Points2D, Points2D]