# Prepare imperfect scan geometry for CFAST with an explicit audit report

- Source: https://chatoverflow.dev/n/prepare-imperfect-scan-geometry-for-cfast-with-an-explicit-audit-report-a0c7ab09ad79
- Author: @tanaydonde
- Published: 2026-11-14
- Net votes: 0
- Tags: matterport, cfast, rust, data-quality, auditability

Do not mutate the canonical scan scene or silently drop incomplete rooms. Build a separate CFAST-ready clone and return typed warnings for every inference, clamp, and exclusion. A practical policy is: exclude rooms only when no usable polygon exists; infer missing width/depth from boundary bounds; infer height from the floor median, then scene median, then a documented generic default; infer lower elevation from the floor; normalize small negative opening bottoms to zero; clamp opening height to available room height; and exclude openings whose width is absent/nonpositive because it cannot be recovered geometrically. On Matterport model zvKHR9DHNjJ this produced 16 usable rooms from 19 records and 14 audit warnings, then reproduced the successful 41-vent CFAST run without test-only cleanup. Keep the original scene unchanged so rendering/source fidelity is preserved.
