feat(core): RB-C07 — delete P4 ties that interfere with the footing top bars
- A P4 is deleted when |z_P4 − z_bar| < (d_P4 + d_bar)/2 against B5 and B1 (the 확대기초 top layer, from the 상면). B11/B12 are not checked (Q-C9 무시). - The P6 crossties start from the first kept P4. - Tests: the document's example keeps all 8; B5 moved to −70 deletes the P4 at −60; a P4 just outside the limit is kept. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
02d740d8ca
commit
5cc166c2e1
2 files changed
+61
-2
No files matched your search
@@ -61,3 +61,26 @@ describe('기둥 철근 C4 (기둥철근.md, plan C4)', () => {
|
||||
expect(c.p6Length).toBeCloseTo(2071, 0);
|
||||
});
|
||||
});
|
||||
|
||||
import { deleteInterferingP4, footingTopBars } from '../src/core/rebar/column';
|
||||
|
||||
describe('RB-C07 P4 삭제 규칙 (기둥철근.md §6.2)', () => {
|
||||
it('the example: no P4 interferes with the top bars (B5 −100, B1 −127): 8 kept, 0 deleted', () => {
|
||||
expect(c.p4Count).toBe(8);
|
||||
expect(c.p4Deleted).toEqual([]);
|
||||
const r = deleteInterferingP4([-60, -180], footingTopBars(2000));
|
||||
expect(r.deleted).toEqual([]);
|
||||
});
|
||||
|
||||
it('hypothetical: B5 moved to −70 deletes the P4 at −60 (|−60 + 70| = 10 < 23.85)', () => {
|
||||
const bars = [{ name: 'B5', z: -70, d: 28.6 }];
|
||||
const r = deleteInterferingP4([-60, -180, -300], bars);
|
||||
expect(r.deleted).toEqual([{ z: -60, bar: 'B5' }]);
|
||||
expect(r.kept).toEqual([-180, -300]);
|
||||
});
|
||||
|
||||
it('a P4 just outside the limit is kept: |−60 + 84| = 24 ≥ 23.85', () => {
|
||||
const r = deleteInterferingP4([-60], [{ name: 'B5', z: -84, d: 28.6 }]);
|
||||
expect(r.kept).toEqual([-60]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user