Commit 26c160c
committed
Address review: tighten arc winding tolerance and fix negative spans
- Replace the 1e-9 magic tolerance with 1e-12 turns, justified by the
observed error from the polar transform pipeline (machine-epsilon level,
under 1e-15 turns), via np.rint(n_turns).
- Snap on any non-zero whole number of turns (abs winding), restoring the
legacy full-circle behaviour for exact negative multiples such as
Path.arc(0, -360); the previous rework collapsed those to an empty arc.
- Add regression tests for negative full circles and a tolerance-tightness
guard (a span just past a full turn must not snap).1 parent 03ffe5c commit 26c160c
2 files changed
Lines changed: 34 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
995 | 995 | | |
996 | 996 | | |
997 | 997 | | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
1005 | 1008 | | |
1006 | 1009 | | |
1007 | 1010 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | | - | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
515 | 520 | | |
516 | | - | |
517 | | - | |
518 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
519 | 524 | | |
520 | 525 | | |
521 | 526 | | |
522 | 527 | | |
523 | 528 | | |
524 | 529 | | |
525 | 530 | | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
526 | 542 | | |
527 | 543 | | |
528 | 544 | | |
529 | 545 | | |
530 | 546 | | |
531 | 547 | | |
532 | 548 | | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
533 | 553 | | |
534 | 554 | | |
535 | 555 | | |
| |||
0 commit comments