Improve drawing export and foundation quantity views
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
a0ec74b09b
commit
d22c5008f0
72 files changed
+24346
-12
No files matched your search
@@ -0,0 +1,8 @@
|
||||
import fs from 'node:fs/promises';
|
||||
import {FileBlob,SpreadsheetFile} from '@oai/artifact-tool';
|
||||
const w=await SpreadsheetFile.importXlsx(await FileBlob.load('수량산출/outputs/verification/운곡교P1_모델연동.xlsx'));
|
||||
w.recalculate();
|
||||
const checks=JSON.parse(await fs.readFile('수량산출/.cache/artifact-expected.json','utf8')),differences=[];
|
||||
for(const c of checks){const actual=Number(w.worksheets.getItem(c.sheet).getRange(c.cell).values[0][0]);if(!Number.isFinite(actual)||Math.abs(actual-c.value)>1e-8*Math.max(1,Math.abs(c.value)))differences.push({...c,actual});}
|
||||
await fs.writeFile('수량산출/docs/artifact-verification.json',JSON.stringify({checked:checks.length,differences,engine:'Artifact Tool recalculation of generated model workbook'},null,2));
|
||||
const png=await w.render({sheetName:'3.3 수량산출_P1',range:'A48:AH76',scale:1.4,format:'png'});await fs.writeFile('수량산출/.cache/model-output-preview.png',new Uint8Array(await png.arrayBuffer()));console.log({checked:checks.length,differences:differences.length});if(differences.length)process.exitCode=1;
|
||||
Reference in new issue
Block a user