Generalization hardening from 27号 (rounds 5-8): 6 gap fixes, all TDD

- detect_sheet_frames: auxiliary-titled frames (非机动坡道/无障碍改造…) never
  become the alignment reference; wall-profile correlation fallback when a
  frame has no axis geometry (coverage+peak-ratio gated); bogus x-pitch from
  stray same-row titles distrusted (pitch_x < 0.7*pitch_y); plan titles inside
  cached-xref blocks scanned too
- cad_dxf_report: cached_xref_content warning (msp INSERT stubs + in-file
  block cache -> expand_blocks ≈ bind, not a re-export ask)
- derive_showcase_spec: floor_order gaps warn loudly in both directions
- assemble_campus: per-building rotation_deg overrides the global one
- SKILL.md updated; regression suite +14 checks (auxref/nogrid/mixedrow/
  blocktitle/cachedxref/floor_order/rotation scenarios)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 00:39:32 +08:00
parent 07e3c12956
commit fe3d3cbbee
6 changed files with 527 additions and 34 deletions

View File

@@ -151,7 +151,11 @@ def main() -> int:
survey = b.get("survey_anchor_m") or b.get("survey_center_m")
if not anchor or not survey:
raise SystemExit(f"{name}: manifest entry needs model_anchor_m + survey_anchor_m")
xf = make_xf(anchor, survey, origin, cos_t, sin_t)
# Buildings on one campus can face different ways (27号: 4#楼 sits ~27°
# off its siblings) — per-building rotation_deg overrides the global.
b_theta = math.radians(float(b.get("rotation_deg", manifest.get("rotation_deg", 0.0))))
b_cos, b_sin = math.cos(b_theta), math.sin(b_theta)
xf = make_xf(anchor, survey, origin, b_cos, b_sin)
floors = transform_floors(spec, xf)
prefix = str(b.get("prefix", ""))
placed.update({prefix + fk: fl for fk, fl in floors.items()})