Track F starts here; the three group branches are cut from this commit.
- engineering/arch/model.py: Wall, Opening, Stair and Room as frozen
dataclasses, and every refusal of spec 4 before anything is drawn, by path
(walls[2].thickness): finite positive numbers, an axis of at least two
distinct points with no zero-length segment, an arc segment refused by name
rather than approximated, an opening on an unknown wall, past its wall,
across an axis vertex or overlapping another (both ids named), an unknown
material, and a typed room area - areas are measured, never typed. The
plan travels as ACADMCP_ARCH XDATA; an opening's door/window kind and a
stair's straight/l/u kind ride beside the payload kind as opening_kind /
stair_kind, because one key cannot hold both.
- engineering/arch/layers.py: the arch set - thirteen ISO 13567-style layers
with ISO 128 lineweights only (0.05 mm on the construction scratch layer,
as every set in this repository) - and ARCH_ROLE_LAYER, the one place a
role becomes a layer. Registered in engineering/layers.py last, which is
what keeps the engineering.layers <-> engineering.arch import cycle closed.
- engineering/arch/materials.py: eight wall materials, one pattern each,
every row citing its source: ANSI31 for brick (ISO 128-50 general hatching,
acadiso.pat's own "Iron, Brick, Stone masonry"), AAC as ANSI31 at twice the
spacing (a repository convention, and it says so), AR-CONC / AR-SAND as
AutoCAD patterns, and the JIS A 0150 RC / stone / wood symbols. Reinforced
concrete cannot be ANSI31 and AR-CONC in one HATCH, so it takes the one
symbol that names it. Periods on a 1:50 sheet are recomputed from ezdxf's
own pattern definitions by the tests. normalise_material is the one reading
of a material name, shared by the model and wall_hatch, so the model never
refuses "Reinforced Concrete" that the hatch table resolves.
- engineering/arch/lang.py: EN / TR vocabulary, D/W and K/P tag prefixes, and
the decimal comma for lang="tr" (24,50 m2).
- draw_prims(role_layer=) and the XDATA codec's app_id= / kinds=: both
generalised with the mechanical defaults, and the mechanical suite passes
unchanged against them - that is the regression gate.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
ruff format was never run repo-wide; CI now enforces 'ruff format --check', so normalize every module once. No behavior changes.
Co-authored-by: Cursor <cursoragent@cursor.com>
Audit-driven fixes across the dual backend, the premium workflow, and the
engineering layer. 318 tests, ruff-clean.
Quality gate (the moat):
- drawing_finalize now runs the premium ISO-128 critique in addition to the
8-step validator; leftover construction, non-ISO lineweights, untrimmed
corners, duplicates and dim overlap block the gate (strict_critique fails on
warnings too).
- dim_overlap critique no longer a no-op (dim reference point + bbox fallback);
dim/construction layers resolve from the active layer set (iso13567 too).
Stability / correctness:
- view_screenshot & drawing_export_pdf render headless via Agg (no more
worker-thread SIGSEGV).
- gear tooth profile no longer self-overlaps at high tooth counts; section view
no longer duplicates bore lines; validator keyway heuristic fixed.
- ezdxf aligned/angular dim API, full-circle polar array duplicate already
covered by Sprint 1; this bundle adds save-format-from-extension,
entity_offset side selection, ARC length, properties parity (bounding_box /
rotation / char_height), mtext rotation.
COM robustness (mocked-COM tested):
- CoUninitialize on teardown; transaction commit/rollback try/finally + UNDO via
the CMDACTIVE guard; system_run_lisp guard + USERS1 value capture;
set_variable type coercion; HWND via Application.HWND; BlockInfo.description.
Security:
- HTTP remote-bind guard fires on every launch path (incl. `fastmcp run`);
StaticTokenVerifier wired into FastMCP; AutoLISP allowlist bypass-vector tests.
Hygiene: linetype-on-demand in _apply_attrs, honest view_zoom returns, snap-on-arc
sweep handling, point_tangent acos clamp, dynamic tool_groups / tool count,
word-boundary SPUR/HELICAL, undo-stack locking.
Deferred: R22 (undo/transaction stack isolation) lands with the I1 refiner (1.2),
which depends on it.
Introduce the autocad-mcp-premium skill with workflow docs, examples, and references (.claude/skills/autocad-mcp-premium/*). Add PlanSpec/critique plumbing and engineering helpers (engineering/plan_spec.py, engineering/critique.py) plus tests and a smoke script. Extend backend API (backends/base.py) with corner operations and premium meta-tools (trim/extend/fillet/chamfer, drawing_plan, drawing_critique, point_from_snap, construction_xline/clear, drawing_apply_iso_layers, dimension_auto, entity_select_smart) and implement COM backend corner ops (backends/com_backend.py) with placeholders for meta-tools. Update CLAUDE.md to document the premium drawing rules and standard workflow. Misc: add examples, references, and tests for premium features, and minor server/backend adjustments.
Introduces an engineering/ package that lets MCP clients produce production-
quality technical drawings without LLM-improvised geometry. Adds 7 new MCP
tools, an 8-step pre-completion validator, and an automatic linetype + layer
bootstrap on drawing_new so CENTER/HIDDEN/PHANTOM and standard mechanical
layers (GEOMETRY, DIM, HATCH, TEXT, TITLEBLOCK, ...) are always available.
- engineering/gear.py: pure-Python involute math, 40+ points/flank, helical
+ spur front views, deterministic section A-A (no helix lines in section).
- engineering/keyway.py: DIN 6885 keyway table + parametric keyed bore /
side-section drawers.
- engineering/titleblock.py: ISO 7200 A3 (420x297 mm) title block; title
text is written verbatim to the title cell.
- engineering/validator.py: DrawingValidator with 8 checks (real DIMENSION
entities, no hidden orphans, linetypes loaded, bore + keyway in both
views when expected, title consistency e.g. forbid 'HELICAL SPUR GEAR'
when helix_angle truthy, saved-to-disk + file-on-disk, screenshot
exported, dwg path returned).
- backends/ezdxf_backend.py: AutoCAD-only linetype fallback (HIDDEN,
BORDER families) so ezdxf doc gets correct patterns when linetype_load
is called for names ezdxf.tools.standards does not ship.
- backends/base.py: concrete helpers set_layer_active / ensure_linetypes.
- server.py: Section 12 with 7 engineering tools, drawing_new(bootstrap=
True), and an ENGINEERING WORKFLOW block in the MCP instructions string.
- 30 new tests covering gear math, DIN6885 lookup, ISO A3 layout, title
verbatim, and every validator check. Tool count 89 -> 96.