| 1234 |
- import {readFileSync,writeFileSync} from 'node:fs'
- const library=JSON.parse(readFileSync('tools/city-massing/house-library/library.json')),fit=JSON.parse(readFileSync('tools/city-massing/asset-fit.json')),pilot=JSON.parse(readFileSync('.scratch/cockpit-shell-panel-layout/verify/artifacts/t35/negative-estate-pilot/seated-whitelist-plan.json')),assets=new Map(library.archetypes.map(a=>[a.id,a])),rows=pilot.buildings.map(b=>{const f=b.archetype;if(f){const a=assets.get(f==='slab'?'slab':f);const nominal=a.nominal_footprint_m,sx=b.width/nominal[0],sy=b.depth/nominal[1],limits=fit.variants[f];return{id:b.id,qualityPath:'approved-asset',archetype:f,fitScale:[sx,sy],fitLimits:[limits.minScale,limits.maxScale],assetTriangles:a.validation.triangles,assetVertices:a.validation.vertices,closedShells:a.validation.closed_shells,nonmanifoldEdges:a.validation.nonmanifold_edges,sourceObjects:a.source_objects,acceptance:{footprintWithinFit:sx>=limits.minScale[0]&&sx<=limits.maxScale[0]&&sy>=limits.minScale[1]&&sy<=limits.maxScale[1],requiresWindows:true,requiresRoof:true,requiresBalconies:true,requiresClosedRoof:true,requiresEstimatedFacadeLabel:true}}}return{id:b.id,qualityPath:'surveyed-outline-massing',archetype:null,fitScale:null,assetTriangles:null,sourceObjects:['surveyed outline','bounded facade modules'],acceptance:{footprintPreserved:true,requiresWindows:true,requiresRoof:true,requiresBalconies:false,requiresClosedRoof:true,requiresEstimatedFacadeLabel:true,forbidRectangleSubstitution:true}}})
- const report={version:1,modelChanged:false,pilotNotGenerated:true,sourcePlanSha256:pilot.parentPlanSha256,qualityBaseline:{assetRequirements:['closed shells','zero nonmanifold edges','windows/frames','roof/eaves','bounded facade details','estimated facade label'],massingRequirements:['exact surveyed outline','no rectangle substitution','closed roof','bounded window/storey modules','estimated facade label'],lodRequirements:['LOD1 lower triangles/bytes than LOD0','LOD0 geometricError 0','REPLACE parent retains fallback'],textureRequirements:['local z19 TMS provenance','UV geometry unchanged','per-raster<=1MiB','decoded texture<=4MiB']},rows,caps:pilot.caps,globalRuntimeConfig:'/gis/cad-bim/city-regions-v7/manifest.json',decision:'Quality gate only; generate a separate immutable pilot after build authorization, then inspect single-building nodes/triangles/material closure before any global change.'}
- writeFileSync('.scratch/cockpit-shell-panel-layout/verify/artifacts/t35/negative-estate-pilot/quality-gate.json',JSON.stringify(report,null,2));console.log(JSON.stringify({passed:true,rows:rows.map(r=>({id:r.id,path:r.qualityPath,asset:r.archetype||null,fit:r.acceptance.footprintWithinFit??null})),modelChanged:false}))
|