feat(rebar): 조립 철근(B11·B12)을 격자 가운데에 배치 (양끝 여유 차이 ≤ 1칸)

- assemblyGridIndices: 단마다 k칸 간격, 엇갈림 2칸 유지, 짝수 단 시작칸을 가운데 정렬
- 개수는 그대로 (B11 30, B12 24), 3D와 단면 삽도가 같은 위치를 씀
- 테스트: 양끝 여유 차이 ≤ 1칸, 엇갈림 2칸

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-26 17:47:21 +09:00
1 parent 20d8546b6f
commit de20b84c00
4 files changed
+34 -16

No files matched your search

+2 -3
View File
@@ -1,6 +1,6 @@
import type { PierModel } from '../core/geometry';
import { NOMINAL_DIAMETER } from '../core/rebar/common';
import { assemblyJs, b10Levels, b9Bars, grid, gridPositions, layers, sideDepth } from '../core/rebar/footing';
import { assemblyGridIndices, assemblyJs, b10Levels, b9Bars, grid, gridPositions, layers, sideDepth } from '../core/rebar/footing';
import { DEFAULT_FOOTING_REBAR } from '../core/rebar/footing-settings';
/**
@@ -83,9 +83,8 @@ export function footingSectionSvg(model: PierModel): string {
js.forEach((j, idx) => {
const zA = fs.cBottom + j * fs.sV;
parts.push(line('b11', 'B11', xa, xb, y(zA), COLOR.b11, 1.2));
const i0 = idx % 2 === 0 ? 0 : 2;
const xsB12 = gridPositions(W, fs, 'sAxis');
for (let i = i0; i < xsB12.length; i += fs.kB12) parts.push(dot('b12', 'B12', x(xsB12[i]), y(zA + dB10), COLOR.b12, 2.2));
for (const i of assemblyGridIndices(xsB12.length - 1, fs.kB12, idx)) parts.push(dot('b12', 'B12', x(xsB12[i]), y(zA + dB10), COLOR.b12, 2.2));
});
// Dimensions: width, grid, covers, and the B10 levels.
+3 -4
View File
@@ -1,6 +1,6 @@
import * as THREE from 'three';
import type { PierModel } from '../core/geometry';
import { assemblyEndOffset, assemblyJs, b10Levels, b9Bars, gridPositions, grid, layers, legLength, legOffsets, sideDepth } from '../core/rebar/footing';
import { assemblyEndOffset, assemblyGridIndices, assemblyJs, b10Levels, b9Bars, gridPositions, grid, layers, legLength, legOffsets, sideDepth } from '../core/rebar/footing';
import { bottomPiece, MAIN, topSplicePieces, widthLayout } from '../core/rebar/coping-main';
import { C14_INSET, c14Bars, CAP, COPING_REBAR, SHEAR_LOOP_STEP, shearBars, shearBarsMulti, shearUHeight, copingSideBars, SIDE_HOOK_LEG, stairBars, undersideAt } from '../core/rebar/coping';
import { sideRowLevels } from '../core/coping-geom';
@@ -478,12 +478,11 @@ export function buildRebar3D(m: PierModel, common: Material = DEFAULT_MATERIAL,
assemblyJs(Hf, fs).forEach((jA, k) => {
const zA = bottom + mm(fs.cBottom + jA * fs.sV);
const zB = zA + dB10;
const i0 = k % 2 === 0 ? 0 : 2;
for (let iL = i0; iL < xsL.length; iL += fs.kB11) {
for (const iL of assemblyGridIndices(xsL.length - 1, fs.kB11, k)) {
const x = f.s + mm(xsL[iL]);
polyline('B11', [[x, zA - hookAsm, -nAsm], [x, zA, -nAsm], [x, zA, nAsm], [x, zA - hookAsm, nAsm]], NOMINAL_DIAMETER.S16);
}
for (let iW = i0; iW < ysW.length; iW += fs.kB12) {
for (const iW of assemblyGridIndices(ysW.length - 1, fs.kB12, k)) {
const n = mm(ysW[iW]);
polyline('B12', [[f.s - sAsm, zB - hookAsm, n], [f.s - sAsm, zB, n], [f.s + sAsm, zB, n], [f.s + sAsm, zB - hookAsm, n]], NOMINAL_DIAMETER.S16);
}