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:
@@ -978,6 +978,23 @@ def finalize_spec(
|
||||
scale = float(config.get("scale", config.get("scale_to_meters", 0.001)))
|
||||
origin = source_origin(floor_data, config)
|
||||
ordered_keys = config.get("floor_order") or sorted(floor_data.keys(), key=floor_sort_key)
|
||||
# floor_order gaps must be LOUD: a stale floor_order copied from a sibling
|
||||
# config silently dropped 13号 b2 F11-F16 ("floors":12 was the only tell).
|
||||
missing_from_order = [k for k in floor_data if k not in ordered_keys]
|
||||
if missing_from_order:
|
||||
print(
|
||||
f"WARNING floor_order missing keys {missing_from_order}: these floors are "
|
||||
"extracted in config drawings but NOT in floor_order — they would be "
|
||||
"silently dropped. Add them to floor_order (or remove them from drawings).",
|
||||
file=sys.stderr,
|
||||
)
|
||||
ghost_keys = [k for k in ordered_keys if k not in floor_data]
|
||||
if ghost_keys:
|
||||
print(
|
||||
f"WARNING floor_order ghost keys {ghost_keys}: present in floor_order but "
|
||||
"no drawing produces them — check for typos or missing drawing entries.",
|
||||
file=sys.stderr,
|
||||
)
|
||||
floors: dict[str, Any] = {}
|
||||
|
||||
for index, key in enumerate(ordered_keys):
|
||||
|
||||
Reference in New Issue
Block a user