Files
autocad-mcp-pro/tests
Umut CANandClaude Opus 5 bf8b3baf74 fix(task-9): put the fastener plan in projection with its elevation, and refuse a thread size that is not d
Two wrong-drawing bugs in SECTION 22.

1. _hex_points defaulted to start_deg=0, putting vertices at 3 and 9 o'clock,
   so the plan of an M12 hex head measured 18 mm (across flats) across the
   vertical while the elevation drew that same head 20.78 mm tall (across
   corners e, silhouette edges at +/- e/4 - the projection of a hexagon with
   vertices top and bottom). Place the two blocks in projection and the two
   views of one part disagree. The default is now 30 deg, named HEX_START_DEG
   and documented on both the constant and _hex_points as the convention the
   elevation is the projection of, so a future fourth caller cannot pick the
   other one by accident. The three top builders (_hex_fastener_top,
   _hex_nut_top, _socket_head_top) inherit it.

2. _thread_feature read the pitch from params['size'] via the ISO 261 table
   while drawing the geometry from params['d'], never cross-checking the two.
   feature_spec('thread', {'d': 8.0, 'length': 20.0, 'size': 'M20'}) drew an M8
   minor diameter and returned dims['pitch'] = 2.5 with ISO 261 cited as the
   source - one thread's pitch on another thread's geometry, a silent wrong
   number carrying a standards citation. A mismatch is now refused by name,
   like every other check in the module. std_feature_draw's params description
   says so.

Guard tests: the old top-view test asserted only len(points) == 6 and never a
vertex coordinate, so the orientation was untested. Added the vertex
coordinates, the plan-vs-elevation silhouette-height invariant across ISO 4014
/ 4017 / 4032, the socket screw's dk invariant, and the refused thread pair.

No ActiveX member is added or changed by either fix; both are pure geometry and
validation, so no live measurement is cited. The live AutoCAD could not be
probed for a confirmation run - GetActiveObject blocked past 150 s under
sibling contention.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
2026-09-22 20:02:06 +03:00
..
2026-04-27 12:20:57 +03:00
2026-07-17 15:48:43 +03:00
2026-07-07 11:03:08 +03:00
2026-04-27 12:20:57 +03:00
2026-07-07 11:03:08 +03:00
2026-04-27 12:20:57 +03:00
2026-07-07 11:03:08 +03:00