From 9900aa6d8eb0943d4d626a6a299280fd8bb72de2 Mon Sep 17 00:00:00 2001 From: ypshim Date: Thu, 22 Oct 2026 17:50:57 +0900 Subject: [PATCH] =?UTF-8?q?feat(rebar):=20apply=204-bar=20symmetric=20vert?= =?UTF-8?q?ical=20stacking=20offset=20(=C2=B11.5=20db,=20=C2=B10.5=20db)?= =?UTF-8?q?=20to=20P6=20crossties=20to=20resolve=20centre=20intersection?= =?UTF-8?q?=20interference?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/rebar3d.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/view/rebar3d.ts b/src/view/rebar3d.ts index 7162aaa..31e3b24 100644 --- a/src/view/rebar3d.ts +++ b/src/view/rebar3d.ts @@ -214,20 +214,24 @@ export function buildRebar3D(m: PierModel): RebarScene { for (const z of col.p5) ring('P5', c.k, sc, base + mm(z), rt, NOMINAL_DIAMETER.H19); for (const z of col.p4) ring('P4', c.k, sc, base + mm(z), rt, NOMINAL_DIAMETER.H19); const hookP6 = mm(Math.round(hookLength('tie90', NOMINAL_DIAMETER.H16))); // 135 mm + const dP6 = NOMINAL_DIAMETER.H16; // 15.9 mm + const p6Angles = [0, 46.96, 90, 133.04]; for (const z of col.p6Levels) { - for (const deg of [0, 46.96, 90, 133.04]) { + p6Angles.forEach((deg, i) => { const a = (deg * Math.PI) / 180; const xA = sc - rt * Math.cos(a); const zA = -rt * Math.sin(a); const xB = sc + rt * Math.cos(a); const zB = rt * Math.sin(a); - const yBar = base + mm(z); + // Vertical stacking offset: ±1.5 db, ±0.5 db to avoid interference at the column centre (Q-C15) + const zOffset = (i - 1.5) * dP6; + const yBar = base + mm(z + zOffset); // Main crosstie across the diameter - addBar('P6', c.k, [xA, yBar, zA], [xB, yBar, zB], NOMINAL_DIAMETER.H16, COLOR.tie); + addBar('P6', c.k, [xA, yBar, zA], [xB, yBar, zB], dP6, COLOR.tie); // 90° hooks at both ends turning downward (135 mm, wrapping the tie) - addBar('P6', c.k, [xA, yBar, zA], [xA, yBar - hookP6, zA], NOMINAL_DIAMETER.H16, COLOR.tie); - addBar('P6', c.k, [xB, yBar, zB], [xB, yBar - hookP6, zB], NOMINAL_DIAMETER.H16, COLOR.tie); - } + addBar('P6', c.k, [xA, yBar, zA], [xA, yBar - hookP6, zA], dP6, COLOR.tie); + addBar('P6', c.k, [xB, yBar, zB], [xB, yBar - hookP6, zB], dP6, COLOR.tie); + }); } }