fix(view): pick the solplate table's header by its row (L, W, T, T1, T2), not by the first "S(%)" label

The drawing has two "S(%)" labels; the first one in the file belonged to another table, so the solplate header was missing.
The header is now the S(%) label with the most solplate column names on its row. The full 운곡교 교각도(2) DXF reads all ten
solplate rows; a test adds a stray label.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-23 14:58:12 +09:00
1 parent 22fd1dc5f4
commit a6b92ae341
2 files changed
+13 -2

No files matched your search

+6
View File
@@ -47,6 +47,12 @@ import { SOLPLATE_REF } from '../src/core/bearing-ref';
describe('솔플레이트 TABLE 읽기 (승인 2026-10-23)', () => {
const sp = JSON.parse(readFileSync(new URL('./fixtures/solplate-table-texts.json', import.meta.url), 'utf-8')) as DxfText[];
it('a stray "S(%)" label elsewhere on the drawing does not replace the solplate header', () => {
const r = parseSolplateTable([{ x: 16000, y: 16200, text: 'S(%)' }, ...sp]);
expect(r.errors).toEqual([]);
expect(r.rows.length).toBe(10);
});
it('reads S, L, W, T, T1 and T2 for all ten bearings, and they equal the reference values', () => {
const r = parseSolplateTable(sp);
expect(r.errors).toEqual([]);