SECTION 24 opens with sheet_frame and titleblock_apply. engineering/sheet/frames.py transcribes ISO 216's trimmed sizes, ISO 5457's 20 mm filing margin and 10 mm edges, the grid reference system (an even number of divisions per side, that side of the frame over 50 mm; letters from the top, numbers from the left), the centring marks (trimmed edge to 5 mm inside the frame) and the 10 x 5 mm corner trimming marks. Every one of those numbers is pinned by a test against the clause it comes from, because a wrong margin is visible on every drawing this server makes. engineering/sheet/titleblock.py draws the ISO 7200 block -- 180 mm wide, which is exactly the drawing-space width of a portrait A4, which is why one block fits every size -- and carries the ISO 128-30 projection-angle symbol. Which symbol is which is derived rather than remembered: first-angle projection puts the view seen from the left on the right, and the view of the cone from its small end is the small circle inside the large one, so first angle draws the cone left and the circles right. The old A3 module folds in. apply_iso_a3_titleblock now forwards to apply_titleblock(size="A3", projection=None, zones=False, marks=False), which is the geometry it always drew, and tests/test_engineering_titleblock.py passes unchanged -- that is the regression gate for the fold. No new ActiveX member is called: both tools reach the drawing only through contract members the A3 title block has used on both engines since v1.0 (entity_create_polyline / _line / _circle / _text, layout_list, layout_set_current), so there was nothing to probe live. Declared, not glossed: the zone divisions drawn here are equal, so ISO 5457's allowance for shorter corner fields is not implemented; the division counts, which are what a zone reference quotes, are the standard's. ISO 7200's full optional-field list is not transcribed, only the fields this block has a cell for. Coverage is A4-A0; an unknown size is refused by name with the five it has. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
103 lines
2.5 KiB
Python
103 lines
2.5 KiB
Python
"""Deterministic engineering CAD layer for AutoCAD MCP Pro."""
|
|
|
|
from .annotation import TableLayout, prepare_table_layout, validate_mleader
|
|
from .delivery import (
|
|
DeliveryResult,
|
|
compare_drawing_snapshots,
|
|
deliver_drawing,
|
|
drawing_snapshot,
|
|
)
|
|
from .gear import (
|
|
draw_gear_section_aa,
|
|
draw_helical_gear_front_view,
|
|
draw_spur_gear_front_view,
|
|
generate_full_gear_outline,
|
|
generate_involute_flank,
|
|
involute_xy,
|
|
)
|
|
from .keyway import (
|
|
DIN6885_TABLE,
|
|
draw_keyed_bore,
|
|
draw_keyway_section,
|
|
keyway_dimensions,
|
|
)
|
|
from .layers import (
|
|
ENGINEERING_LAYERS,
|
|
STANDARD_LINETYPES,
|
|
ensure_engineering_layers,
|
|
ensure_standard_linetypes,
|
|
)
|
|
from .plan_spec import (
|
|
ALL_CRITIQUE_FOCUSES,
|
|
ISO_128_LINEWEIGHTS_MM,
|
|
CritiqueFocus,
|
|
DimStyle,
|
|
Issue,
|
|
LayerSetId,
|
|
PlanSpec,
|
|
SheetSize,
|
|
SnapType,
|
|
)
|
|
from .preflight import (
|
|
PreflightConflict,
|
|
PreflightQuestion,
|
|
PreflightResult,
|
|
preflight_drawing,
|
|
)
|
|
from .refiner import RefineResult, RefineRound, RepairAction, refine_drawing
|
|
from .sheet.frames import draw_sheet_frame, frame_metrics, frame_prims
|
|
from .sheet.titleblock import apply_titleblock, titleblock_prims
|
|
from .titleblock import TitleBlockMetadata, apply_iso_a3_titleblock
|
|
from .validator import DrawingValidator, ValidationFinding, ValidationResult
|
|
|
|
__all__ = [
|
|
"draw_helical_gear_front_view",
|
|
"DeliveryResult",
|
|
"compare_drawing_snapshots",
|
|
"deliver_drawing",
|
|
"drawing_snapshot",
|
|
"TableLayout",
|
|
"prepare_table_layout",
|
|
"validate_mleader",
|
|
"draw_spur_gear_front_view",
|
|
"draw_gear_section_aa",
|
|
"generate_full_gear_outline",
|
|
"generate_involute_flank",
|
|
"involute_xy",
|
|
"draw_keyed_bore",
|
|
"draw_keyway_section",
|
|
"keyway_dimensions",
|
|
"DIN6885_TABLE",
|
|
"ENGINEERING_LAYERS",
|
|
"STANDARD_LINETYPES",
|
|
"ensure_engineering_layers",
|
|
"ensure_standard_linetypes",
|
|
"apply_iso_a3_titleblock",
|
|
"TitleBlockMetadata",
|
|
"DrawingValidator",
|
|
"ValidationResult",
|
|
"ValidationFinding",
|
|
"PlanSpec",
|
|
"Issue",
|
|
"CritiqueFocus",
|
|
"SheetSize",
|
|
"LayerSetId",
|
|
"DimStyle",
|
|
"SnapType",
|
|
"ALL_CRITIQUE_FOCUSES",
|
|
"ISO_128_LINEWEIGHTS_MM",
|
|
"PreflightConflict",
|
|
"PreflightQuestion",
|
|
"PreflightResult",
|
|
"preflight_drawing",
|
|
"RefineResult",
|
|
"RefineRound",
|
|
"RepairAction",
|
|
"refine_drawing",
|
|
"apply_titleblock",
|
|
"draw_sheet_frame",
|
|
"frame_metrics",
|
|
"frame_prims",
|
|
"titleblock_prims",
|
|
]
|