feat(view): solplate in the 3D model (2단계): wedges from the drawing's A, B, S; read the solplate table from DXF
Each bearing gets a solplate wedge: tapered along the 교축 with T1 on the 시점 side, underside at the bearing top (block top + h3). A, B come from the drawing's ELEVATION table, S and T1/T2 from the SOLPLATE table (NO, S(%), L, W, T, T1, T2), read by position. The 공통 규칙 (T 30, margin 100, h3 181) feed the plan; changing them regenerates the piers. A new "솔플레이트" part can be shown or hidden. A solplate table is read only when its S values are found; a missing S is reported. Also commits the option-1 test change (drawing EL.X minus Excel z). Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1d8746d533
commit
a50f4f5ee5
10 files changed
+579
-13
No files matched your search
+16
-4
@@ -16,7 +16,7 @@ import { buildRebar3D, type RebarColorMode, type RebarScene } from './view/rebar
|
||||
import { DEFAULT_MATERIAL, FCK_MEMBERS, fyOf, GRADE_CHOICES, isAssumedMaterial, materialFrom, type BendFactors, type FckByMember, type FckMember, type GradeKey, type Material } from './core/rebar/common';
|
||||
import { buildQuantity, quantityRows, type Quantity, type QuantityLine } from './core/rebar/quantity';
|
||||
import { parseDrawingRows } from './core/drawing-import';
|
||||
import { parseBearingElevationTable, readDxfTexts } from './core/dxf-table';
|
||||
import { parseBearingElevationTable, parseSolplateTable, readDxfTexts } from './core/dxf-table';
|
||||
import { P1_COPING_GEOM } from './core/coping-geom';
|
||||
import { applyBearingRules, BEARING_ELEVATION_REF, BEARING_RULES_DEFAULT, type BearingBasis, type BearingRules, type DrawingBearing, DRAWING_TOL_MM, drawingCopingCheck, SOLPLATE_REF, SOLPLATE_T_RULE, solplateTs, withDrawingBasis } from './core/bearing-ref';
|
||||
|
||||
@@ -46,6 +46,7 @@ type Stage = 'shape' | 'plan' | 'rebar' | 'quantity';
|
||||
|
||||
const PART_GROUPS: { label: string; parts: PartName[] }[] = [
|
||||
{ label: '받침·받침블럭', parts: ['blocks', 'pads'] },
|
||||
{ label: '솔플레이트', parts: ['solplates'] },
|
||||
{ label: '코핑', parts: ['coping'] },
|
||||
{ label: '기둥', parts: ['columns'] },
|
||||
{ label: '확대기초', parts: ['footings'] },
|
||||
@@ -207,7 +208,12 @@ function buildEntry(rawInput: PierInput, checked: boolean): Pier {
|
||||
let model: PierModel | null = null;
|
||||
// The model uses the drawing EL.X when the project basis is 'drawing' and this pier has drawing values (Q16).
|
||||
const drawing = bearingBasis === 'drawing' ? bearingDrawing[input.name] : undefined;
|
||||
const modelInput = drawing?.length ? withDrawingBasis(input, drawing) : input;
|
||||
const baseInput = drawing?.length ? withDrawingBasis(input, drawing) : input;
|
||||
// Solplate plans come from the drawing rows that have A, B and S, whatever the 받침 기준 (승인 2026-10-23).
|
||||
const plans = (bearingDrawing[input.name] ?? [])
|
||||
.filter((d) => d.A !== undefined && d.B !== undefined && d.S !== undefined)
|
||||
.map((d) => ({ no: d.no, A: d.A as number, B: d.B as number, S: d.S as number }));
|
||||
const modelInput: PierInput = { ...baseInput, bearingPlans: plans, solplate: { T: bearingRules.T, margin: bearingRules.margin, h3: bearingRules.h3 } };
|
||||
if (validateInput(input, issues)) {
|
||||
try {
|
||||
model = buildPier(modelInput);
|
||||
@@ -1351,12 +1357,17 @@ function renderBearingBasis(wrap: HTMLDivElement, pier: Pier): void {
|
||||
// A DXF drawing: the 교량받침 ELEVATION TABLE is read by position. Otherwise a sheet with No, EL.X, h1, h2.
|
||||
let drawingRows: DrawingBearing[];
|
||||
if (file.name.toLowerCase().endsWith('.dxf')) {
|
||||
const r = parseBearingElevationTable(readDxfTexts(await file.text()));
|
||||
const texts = readDxfTexts(await file.text());
|
||||
const r = parseBearingElevationTable(texts);
|
||||
if (r.errors.length) {
|
||||
setError(`도면 불러오기 실패: ${r.errors.slice(0, 3).join(' ')}`);
|
||||
return;
|
||||
}
|
||||
drawingRows = r.drawing;
|
||||
// The solplate table gives S per bearing (승인 2026-10-23); a missing S is reported, not guessed.
|
||||
const sp = parseSolplateTable(texts);
|
||||
const sByNo = new Map(sp.rows.map((x) => [x.no, x.S]));
|
||||
drawingRows = r.drawing.map((d) => ({ ...d, S: sByNo.get(d.no) }));
|
||||
if (sp.errors.length) setStatus(`솔플레이트 값 확인: ${sp.errors.slice(0, 2).join(' ')}`);
|
||||
} else {
|
||||
const wb = XLSX.read(await file.arrayBuffer(), { type: 'array' });
|
||||
const sheet = wb.Sheets[wb.SheetNames[0]];
|
||||
@@ -1421,6 +1432,7 @@ function renderBearingRef(box: HTMLDivElement, pier: Pier): void {
|
||||
return;
|
||||
}
|
||||
bearingRules = { ...bearingRules, [key]: v };
|
||||
regenerateAllPiers();
|
||||
renderAll();
|
||||
});
|
||||
grid.append(lab, input, el('span', `기본 ${BEARING_RULES_DEFAULT[key]}`, 'muted small'));
|
||||
|
||||
Reference in new issue
Block a user