Improve drawing export and foundation quantity views

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
CopilotandCopilot committed 2026-11-06 15:35:56 +09:00
1 parent a0ec74b09b
commit d22c5008f0
72 files changed
+24346 -12

No files matched your search

+14
View File
@@ -1,5 +1,6 @@
import './style.css';
import { createDrawingWorkspace } from '../도면작성/workspace';
import { createTakeoffWorkspace } from '../수량산출/workspace';
import * as THREE from 'three';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
import { swapXYAzimuth } from './core/coordinate-frame';
@@ -170,6 +171,16 @@ const drawingWorkspace = createDrawingWorkspace($('view-drawing'), () => ({
piers: state.piers.map(p => ({ input: p.input, model: p.model, dirty: pendingKeys(p).length > 0 })),
}), selectPier);
const quantityRebarTon = new Map<string,number|null>();
const quantityWorkspace = createTakeoffWorkspace($('view-quantity'), () => ({
project: state.project, selected: state.active,
piers: state.piers.map(p => ({input:p.input,model:p.model,dirty:pendingKeys(p).length>0,rebarTon:quantityRebarTon.get(p.input.name)})),
}), selectPier, (name,data) => {
const pier=state.piers.find(p=>p.input.name===name);if(!pier)return;
pier.input={...pier.input,quantityTakeoff:data};pier.draft={...pier.draft,quantityTakeoff:data};
renderSaveStatus();scheduleBackup();
});
function el<K extends keyof HTMLElementTagNameMap>(tag: K, text?: string, cls?: string): HTMLElementTagNameMap[K] {
const node = document.createElement(tag);
if (text !== undefined) node.textContent = text;
@@ -1922,6 +1933,9 @@ function renderQuantityScreen(): void {
const entries = targets.flatMap((pier) =>
pier.model ? [{ pier, q: buildQuantity(rebarSummary(pier.model, state.material, state.fckByMember).rows, state.material) }] : [],
);
quantityRebarTon.clear();
for(const {pier,q} of entries)quantityRebarTon.set(pier.input.name,q.missing.length?null:q.kg/1000);
quantityWorkspace.refresh();
// 전체 with more than one pier: the bridge total first (교량 전체 집계); the per-pier tables follow.
if (state.quantityAll && entries.length > 1) body.appendChild(bridgeTotalBlock(aggregateQuantities(entries.map((e) => e.q)), entries.length));
for (const { pier, q } of entries) {
+7 -3
View File
@@ -606,7 +606,9 @@ body { background: #eef1f4; font-family: 'Noto Sans KR', system-ui, sans-serif;
.top .brand strong { font-size: 18px; letter-spacing: 0.01em; }
.top .brand > span:not(.proj) { font-size: 12px; color: #b8c2ce; }
.proj { padding-left: 14px; border-left: 1px solid #33404f; color: #ffffff; font-size: 13px; font-weight: 700; }
.top { flex-wrap: nowrap; }
.top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); flex-wrap: nowrap; }
.top > .steps { justify-self: center; }
.top > .actions { justify-self: end; }
.top .brand { flex: 1 1 0; min-width: 0; align-items: center; }
.top .brand > strong, .top .brand > span:not(.proj) { flex-shrink: 0; white-space: nowrap; }
.top .proj { min-width: 0; overflow: hidden; overflow-wrap: anywhere; line-height: 1.5; max-height: 3em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
@@ -614,12 +616,14 @@ body { background: #eef1f4; font-family: 'Noto Sans KR', system-ui, sans-serif;
.top .steps .step, .top .actions button, .top .savest { white-space: nowrap; }
@media (max-width: 1600px) {
.top { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.top .actions { grid-column: 1 / -1; justify-content: flex-end; }
.top .brand { grid-column: 1; grid-row: 1; }
.top .actions { grid-column: 2; grid-row: 1; justify-content: flex-end; }
.top .steps { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 900px) {
.top { grid-template-columns: minmax(0, 1fr); }
.top .steps, .top .actions { max-width: 100%; overflow-x: auto; }
.top .actions { justify-content: flex-start; }
.top .actions { grid-column: 1; grid-row: 3; justify-content: flex-start; justify-self: start; }
}
.steps .step { color: #dce3ea; min-height: 44px; padding: 4px 14px; border-radius: 6px; background: transparent; border: 0; }
.steps .step.current { background: #ffffff; color: #18212b; }