fix(rebar): pass the ③ material to C15/C16, coping bottom and column bars
The stair bars in the 철근표 and the 3D model, and the 3D bottom and column bars, were built with the default fck, so a changed fck did not reach them. buildRebar3D now takes the material, and a material change rebuilds the scene. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b35f5ff0ed
commit
d8fd6adcf0
4 files changed
+25
-7
No files matched your search
+5
-5
@@ -5,7 +5,7 @@ import { bottomPiece, MAIN, widthLayout } from '../core/rebar/coping-main';
|
||||
import { C14_INSET, c14Bars, CAP, COPING_REBAR, shearBars, shearBarsMulti, shearUHeight, copingSideBars, SIDE_HOOK_LEG, stairBars, undersideAt } from '../core/rebar/coping';
|
||||
import { columnRebar, COLUMN_P1 } from '../core/rebar/column';
|
||||
import { barsAcross, BLOCK_REBAR } from '../core/rebar/bearing-block';
|
||||
import { hookLength, NOMINAL_DIAMETER } from '../core/rebar/common';
|
||||
import { DEFAULT_MATERIAL, hookLength, Material, NOMINAL_DIAMETER } from '../core/rebar/common';
|
||||
import { stretchMatrix } from './scene';
|
||||
|
||||
/**
|
||||
@@ -34,7 +34,7 @@ const COLOR = {
|
||||
|
||||
const mm = (v: number) => v / 1000;
|
||||
|
||||
export function buildRebar3D(m: PierModel): RebarScene {
|
||||
export function buildRebar3D(m: PierModel, mat: Material = DEFAULT_MATERIAL): RebarScene {
|
||||
const group = new THREE.Group();
|
||||
const byName = new Map<string, THREE.Mesh[]>();
|
||||
const Ms = m.stretches.map((_, k) => stretchMatrix(m, k));
|
||||
@@ -87,7 +87,7 @@ export function buildRebar3D(m: PierModel): RebarScene {
|
||||
// at each end to the C1 level. Each bar is two pieces spliced at the column centre (overlap l_s). The slope runs x_L0 from each end (T형).
|
||||
const xL0 = L / 2 - COPING_REBAR.levelWidth / 2000;
|
||||
const under = (x: number) => undersideAt(L * 1000, x * 1000, m.endBottom, m.levelBottom);
|
||||
const lap = bottomPiece().ls / 2000;
|
||||
const lap = bottomPiece(mat).ls / 2000;
|
||||
xs.forEach((n, j) => {
|
||||
const z = (x: number) => under(x) + 0.127;
|
||||
const left: [number, number, number][] = [
|
||||
@@ -166,7 +166,7 @@ export function buildRebar3D(m: PierModel): RebarScene {
|
||||
}
|
||||
}
|
||||
// C15 (거꾸로 된 U) and C16 (L형) on the stair (코핑철근.md §7): 11 bars each across the width.
|
||||
const stairs = stairBars(L * 1000, B * 1000, topEl);
|
||||
const stairs = stairBars(L * 1000, B * 1000, topEl, mat);
|
||||
for (const s of stairs.c15) {
|
||||
const n = mm(s.n);
|
||||
const ld = mm(s.leg);
|
||||
@@ -187,7 +187,7 @@ export function buildRebar3D(m: PierModel): RebarScene {
|
||||
}
|
||||
|
||||
// Columns: P1 / P2 main bars on their radii, ties P3 / P5 / P4 as rings, P6 crossties across the column.
|
||||
const col = columnRebar(COLUMN_P1);
|
||||
const col = columnRebar(COLUMN_P1, mat);
|
||||
const zBot = col.zBot; // mm
|
||||
const ring = (name: string, k: number, sc: number, y: number, r: number, d: number) => {
|
||||
const N = 36;
|
||||
|
||||
Reference in new issue
Block a user