forked from 1b-agent/opencadstudio-upstream
The polyline arm of the hatch wire outline guarded its NaN separator with `if count > 0 && pts.len() != start_idx`. `start_idx` was assigned to `pts.len()` two lines earlier with nothing in between to grow `pts`, so the inequality was structurally always false — the separator was never emitted. When a hatch carried more than one boundary path (multi-region hatch), the renderer drew a straight segment from the last vertex of path A to the first vertex of path B because the two polylines lived in `pts` back-to-back with no NaN break. The result was a visible stray line between hatch regions. Switch the polyline arm to the same `if !pts.is_empty()` guard the Line / CircularArc / EllipticArc arms use, and capture `start_idx` *after* the separator so the closed-loop close-back logic still points at this polyline's first real vertex. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>