feat(mech): six mech_* critique focuses, the mech pack, lean 60, aliases and the counts
The four track-B/G branches are merged; this is the integration that makes the 25 new tools one surface instead of four. - engineering/mech/critique.py: the six focuses of spec 13, dispatched the way the P&ID ones are. One index per critique run, shared through run_critique's context, so six focuses cost one read of the drawing; a drawing with no ACADMCP_MECH payload yields nothing at all, which is what keeps focus=None cheap for a P&ID sheet or a plain DXF. Each focus has a positive and a negative fixture. Two narrowings are in the module docstring rather than hidden: mech_view_misaligned checks the projection axis and not the quadrant, because the pinned payload carries no projection angle to check it against, and mech_duplicate_dimension catches two dimensions in the same place rather than a semantic restatement, because no engine exposes what a dimension measured. - The index reads what the tools actually write, not only the plan's fixture shape. mech_part_draw anchors its part payload on a POINT (layer MECH) and lists every drawn view under "views"; the plan's index read INSERT/CIRCLE only and one "view" per payload, so it was silent on every part the server draws. It now reads POINT too, expands "views" into one entry per drawn view (the section check looks in the section's own WCS box, the alignment check compares frame_bbox centres), and pages entity_list instead of one call. Test: a part drawn by draw_part + add_view is read and passes all six; the same part with its hatch erased is reported. - Live type names, measured on AutoCAD 2026 (2026-09-23, scratch document, closed): ObjectName AcDbBlockReference -> BLOCKREFERENCE, AcDbRotatedDimension -> ROTATEDDIMENSION, AcDbAlignedDimension -> ALIGNEDDIMENSION, AcDbPoint -> POINT with GetBoundingBox = the point. The index reads BLOCKREFERENCE as an INSERT and any *DIMENSION as a dimension; a wrapper test reports the ezdxf entities under exactly those measured names. - mech_thread_unrepresented uses the view engine's own MINOR_RATIO, and checks the thin line ISO 6410 draws: the minor diameter of an external thread, the major of an internal one. - mech_bom_balloon_mismatch: identical parts share one balloon (ISO 6433 balloons a parts-list row), so a second M12x60 is covered by the first one's balloon instead of reported. - TOOL_PACK_NAMES has "mech" (the 14 tools of SECTIONS 21-23). SECTION 24 stays core: a frame, a title block, a parts list and an xref are universal drafting, not a vertical. Lean gains five and reaches 60 (54 with TOOL_PACKS=core). - _GROUP_TAG_PRIORITY gains sheet directly after mech; the mech group label becomes "mechanical". SECTION 24's last four tools (xref_attach, xref_manage, image_attach, drawing_export_dwg) now carry the sheet tag, so group, pack and SECTION are one list: 229 tools in 25 groups, and engineering/blocks/entity_creation/drawing return to their pre-SECTION-24 sizes. - Ten golden tuning cases, two of them Turkish (with the diacritic spellings added to the alias records next to the ASCII-folded ones). The shared AutoCAD command set needed no change: the merge had already resolved TABLE, REVCLOUD, SECTIONPLANE, INSERT, ARRAY and SAVEAS, and nothing is stale. - Inventory regenerated, the frozen group-size snapshot retaken from the live registry, and the README release-snapshot / pack / lean figures taken from scripts/check_doc_numbers.py rather than typed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a6c9c0d927
commit
3b033033f9
+40
-35
@@ -6,26 +6,27 @@
|
||||
"tools": 229,
|
||||
"resources": 8,
|
||||
"prompts": 5,
|
||||
"groups": 24
|
||||
"groups": 25
|
||||
},
|
||||
"groups": {
|
||||
"analysis": 12,
|
||||
"batch": 3,
|
||||
"blocks": 11,
|
||||
"blocks": 9,
|
||||
"corner_ops": 4,
|
||||
"dimensions": 5,
|
||||
"drawing": 12,
|
||||
"engineering": 17,
|
||||
"entity_creation": 19,
|
||||
"drawing": 11,
|
||||
"engineering": 10,
|
||||
"entity_creation": 18,
|
||||
"entity_modification": 16,
|
||||
"entity_query": 9,
|
||||
"environment": 22,
|
||||
"layers": 14,
|
||||
"layouts": 12,
|
||||
"mech": 14,
|
||||
"mechanical": 14,
|
||||
"page_setup": 6,
|
||||
"pid": 9,
|
||||
"premium": 12,
|
||||
"sheet": 11,
|
||||
"solids": 5,
|
||||
"styles": 10,
|
||||
"system": 7,
|
||||
@@ -181,7 +182,7 @@
|
||||
},
|
||||
{
|
||||
"name": "balloon_add",
|
||||
"group": "engineering",
|
||||
"group": "sheet",
|
||||
"cost": "mutate",
|
||||
"summary": "Add an ISO 6433 balloon linked to its item row.",
|
||||
"tags": [
|
||||
@@ -320,7 +321,7 @@
|
||||
},
|
||||
{
|
||||
"name": "bom_extract",
|
||||
"group": "engineering",
|
||||
"group": "sheet",
|
||||
"cost": "read",
|
||||
"summary": "Read the bill of materials out of the drawing's block references.",
|
||||
"tags": [
|
||||
@@ -335,7 +336,7 @@
|
||||
},
|
||||
{
|
||||
"name": "bom_table",
|
||||
"group": "engineering",
|
||||
"group": "sheet",
|
||||
"cost": "mutate",
|
||||
"summary": "Draw the parts list as a real TABLE above the title block.",
|
||||
"tags": [
|
||||
@@ -389,7 +390,7 @@
|
||||
},
|
||||
{
|
||||
"name": "centre_marks",
|
||||
"group": "mech",
|
||||
"group": "mechanical",
|
||||
"cost": "mutate",
|
||||
"summary": "Draw ISO 128-23 centre marks or centre lines on circles, read from the drawing.",
|
||||
"tags": [
|
||||
@@ -431,7 +432,7 @@
|
||||
},
|
||||
{
|
||||
"name": "data_extract",
|
||||
"group": "engineering",
|
||||
"group": "sheet",
|
||||
"cost": "safe",
|
||||
"summary": "Write the bill of materials to a CSV file, or to XLSX when openpyxl is present.",
|
||||
"tags": [
|
||||
@@ -729,11 +730,12 @@
|
||||
},
|
||||
{
|
||||
"name": "drawing_export_dwg",
|
||||
"group": "drawing",
|
||||
"group": "sheet",
|
||||
"cost": "safe",
|
||||
"summary": "Write the drawing as a real DWG at a chosen AutoCAD version.",
|
||||
"tags": [
|
||||
"drawing"
|
||||
"drawing",
|
||||
"sheet"
|
||||
],
|
||||
"annotations": {
|
||||
"title": "Drawing: Export DWG",
|
||||
@@ -1680,7 +1682,7 @@
|
||||
},
|
||||
{
|
||||
"name": "hatch_material",
|
||||
"group": "mech",
|
||||
"group": "mechanical",
|
||||
"cost": "mutate",
|
||||
"summary": "Hatch a region with the ISO 128-50 section pattern for a named material.",
|
||||
"tags": [
|
||||
@@ -1708,12 +1710,13 @@
|
||||
},
|
||||
{
|
||||
"name": "image_attach",
|
||||
"group": "entity_creation",
|
||||
"group": "sheet",
|
||||
"cost": "mutate",
|
||||
"summary": "Attach a raster image (PNG/JPG) as an underlay.",
|
||||
"tags": [
|
||||
"create",
|
||||
"drawing"
|
||||
"drawing",
|
||||
"sheet"
|
||||
],
|
||||
"annotations": {
|
||||
"title": "Sheet: Attach Image",
|
||||
@@ -2084,7 +2087,7 @@
|
||||
},
|
||||
{
|
||||
"name": "mech_dimension_part",
|
||||
"group": "mech",
|
||||
"group": "mechanical",
|
||||
"cost": "mutate",
|
||||
"summary": "Dimension a drawn part: ISO 129 dimensions, ISO 286 fits, a hole table.",
|
||||
"tags": [
|
||||
@@ -2098,7 +2101,7 @@
|
||||
},
|
||||
{
|
||||
"name": "mech_hole_pattern",
|
||||
"group": "mech",
|
||||
"group": "mechanical",
|
||||
"cost": "mutate",
|
||||
"summary": "Draw a linear, grid or polar hole pattern with centre marks on any drawing.",
|
||||
"tags": [
|
||||
@@ -2112,7 +2115,7 @@
|
||||
},
|
||||
{
|
||||
"name": "mech_part_draw",
|
||||
"group": "mech",
|
||||
"group": "mechanical",
|
||||
"cost": "mutate",
|
||||
"summary": "Draw a machine part from a segment list or an outline plus typed features.",
|
||||
"tags": [
|
||||
@@ -2126,7 +2129,7 @@
|
||||
},
|
||||
{
|
||||
"name": "mech_part_from_spec",
|
||||
"group": "mech",
|
||||
"group": "mechanical",
|
||||
"cost": "mutate",
|
||||
"summary": "Draw a whole mechanical sheet - several parts and their views - in one transaction.",
|
||||
"tags": [
|
||||
@@ -2140,7 +2143,7 @@
|
||||
},
|
||||
{
|
||||
"name": "mech_part_inspect",
|
||||
"group": "mech",
|
||||
"group": "mechanical",
|
||||
"cost": "read",
|
||||
"summary": "Read the part model back off the drawing: segments, features, views, omissions.",
|
||||
"tags": [
|
||||
@@ -2154,7 +2157,7 @@
|
||||
},
|
||||
{
|
||||
"name": "mech_view_add",
|
||||
"group": "mech",
|
||||
"group": "mechanical",
|
||||
"cost": "mutate",
|
||||
"summary": "Add another view of a drawn part: side, top, section (full/half/offset) or detail.",
|
||||
"tags": [
|
||||
@@ -2412,7 +2415,7 @@
|
||||
},
|
||||
{
|
||||
"name": "revision_add",
|
||||
"group": "engineering",
|
||||
"group": "sheet",
|
||||
"cost": "mutate",
|
||||
"summary": "Append a revision row, with optional revision clouds and triangular tags.",
|
||||
"tags": [
|
||||
@@ -2426,7 +2429,7 @@
|
||||
},
|
||||
{
|
||||
"name": "section_line",
|
||||
"group": "mech",
|
||||
"group": "mechanical",
|
||||
"cost": "mutate",
|
||||
"summary": "Draw an ISO 128-40 cutting-plane line and return the plane the section view uses.",
|
||||
"tags": [
|
||||
@@ -2496,7 +2499,7 @@
|
||||
},
|
||||
{
|
||||
"name": "sheet_frame",
|
||||
"group": "engineering",
|
||||
"group": "sheet",
|
||||
"cost": "mutate",
|
||||
"summary": "Draw an ISO 5457 sheet frame with the zone grid and centring marks.",
|
||||
"tags": [
|
||||
@@ -2575,7 +2578,7 @@
|
||||
},
|
||||
{
|
||||
"name": "std_feature_draw",
|
||||
"group": "mech",
|
||||
"group": "mechanical",
|
||||
"cost": "mutate",
|
||||
"summary": "Draw a standard feature - thread, undercut, ring or O-ring groove, centre hole - onto existing geometry.",
|
||||
"tags": [
|
||||
@@ -2589,7 +2592,7 @@
|
||||
},
|
||||
{
|
||||
"name": "std_part_insert",
|
||||
"group": "mech",
|
||||
"group": "mechanical",
|
||||
"cost": "mutate",
|
||||
"summary": "Insert an ISO standard part - hex bolt, nut, washer, cap screw or ball bearing - as a tagged block.",
|
||||
"tags": [
|
||||
@@ -2603,7 +2606,7 @@
|
||||
},
|
||||
{
|
||||
"name": "std_part_list",
|
||||
"group": "mech",
|
||||
"group": "mechanical",
|
||||
"cost": "read",
|
||||
"summary": "Search the standard-parts catalogue: ISO bolts, nuts, washers, cap screws, bearings.",
|
||||
"tags": [
|
||||
@@ -2617,7 +2620,7 @@
|
||||
},
|
||||
{
|
||||
"name": "surface_texture",
|
||||
"group": "mech",
|
||||
"group": "mechanical",
|
||||
"cost": "mutate",
|
||||
"summary": "Draw an ISO 21920-1 surface-texture symbol: Ra/Rz, process, lay, allowance.",
|
||||
"tags": [
|
||||
@@ -2895,7 +2898,7 @@
|
||||
},
|
||||
{
|
||||
"name": "titleblock_apply",
|
||||
"group": "engineering",
|
||||
"group": "sheet",
|
||||
"cost": "mutate",
|
||||
"summary": "Stamp an ISO 7200 title block (and frame) on any sheet from A4 to A0.",
|
||||
"tags": [
|
||||
@@ -3216,7 +3219,7 @@
|
||||
},
|
||||
{
|
||||
"name": "weld_symbol",
|
||||
"group": "mech",
|
||||
"group": "mechanical",
|
||||
"cost": "mutate",
|
||||
"summary": "Draw an ISO 2553 weld symbol: reference line, identification line, size and pitch.",
|
||||
"tags": [
|
||||
@@ -3230,12 +3233,13 @@
|
||||
},
|
||||
{
|
||||
"name": "xref_attach",
|
||||
"group": "blocks",
|
||||
"group": "sheet",
|
||||
"cost": "mutate",
|
||||
"summary": "Attach a DWG/DXF as an external reference (attachment or overlay).",
|
||||
"tags": [
|
||||
"block",
|
||||
"drawing"
|
||||
"drawing",
|
||||
"sheet"
|
||||
],
|
||||
"annotations": {
|
||||
"title": "Sheet: Attach Xref",
|
||||
@@ -3244,12 +3248,13 @@
|
||||
},
|
||||
{
|
||||
"name": "xref_manage",
|
||||
"group": "blocks",
|
||||
"group": "sheet",
|
||||
"cost": "mutate",
|
||||
"summary": "List, reload, bind, detach or repath an external reference.",
|
||||
"tags": [
|
||||
"block",
|
||||
"drawing"
|
||||
"drawing",
|
||||
"sheet"
|
||||
],
|
||||
"annotations": {
|
||||
"title": "Sheet: Manage Xrefs",
|
||||
|
||||
Reference in New Issue
Block a user