Commit fad6d6a
committed
Fix OCS→WCS coordinate transformation for ARC and CIRCLE entities
DXF stores ARC/CIRCLE center points in Object Coordinate System (OCS)
when the entity Normal differs from (0,0,1). Without applying the
AutoCAD Arbitrary Axis Algorithm to convert OCS→WCS, circles and arcs
with reversed or tilted normals appeared at incorrect positions (e.g.
mirrored along the X axis for Normal=(0,0,-1)).
Apply OcsToWcs() in CreateArc (including the degenerate arc→circle
fallback) and CreateCircle. Add regression test verifying that an ARC
with Normal=(0,0,-1) at OCS (-1000,-500) lands at WCS (1000,-500).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ka4ocDhmumPuQDD2fDs7ad1 parent d79466b commit fad6d6a
2 files changed
Lines changed: 45 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
232 | 248 | | |
233 | 249 | | |
234 | 250 | | |
| |||
448 | 464 | | |
449 | 465 | | |
450 | 466 | | |
| 467 | + | |
451 | 468 | | |
452 | 469 | | |
453 | 470 | | |
454 | 471 | | |
455 | 472 | | |
456 | 473 | | |
457 | | - | |
| 474 | + | |
458 | 475 | | |
459 | 476 | | |
460 | 477 | | |
461 | | - | |
| 478 | + | |
462 | 479 | | |
463 | 480 | | |
464 | 481 | | |
| |||
471 | 488 | | |
472 | 489 | | |
473 | 490 | | |
474 | | - | |
| 491 | + | |
| 492 | + | |
475 | 493 | | |
476 | 494 | | |
477 | 495 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
980 | 980 | | |
981 | 981 | | |
982 | 982 | | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
983 | 1007 | | |
984 | 1008 | | |
985 | 1009 | | |
| |||
0 commit comments