fix: 공동구 벽체 높이(배리어) 파싱 로직 개선 및 전수 검증 통과 (우측 1000mm, 좌측 700mm 정밀 반영)
This commit is contained in:
1 parent
24acbe288f
commit
88221ec8d7
2 files changed
+95
-8
No files matched your search
@@ -957,13 +957,14 @@ function extractParamsFromDXF(dxf, sourceName = '도면') {
|
||||
bcw: 550, bch: 500, dw: 100, dh: 150,
|
||||
lw: 400, lh: 60, gap: 50,
|
||||
vw1: 300, vw2: 300, vh: 300,
|
||||
ww1: 144, ww2: 36, ww3: 120,
|
||||
wh1: 360, wh2: 175, wh3: 125,
|
||||
ww1: 150, ww2: direction === 'right' ? 80 : 30, ww3: 120,
|
||||
wh1: direction === 'right' ? 750 : 450, wh2: 175, wh3: 75,
|
||||
bw1: 125, bw2: 300, bw3: 300,
|
||||
bd1: 50, bd2: 300, bd3: 50,
|
||||
pipeD: 300
|
||||
};
|
||||
const startPt = { x: pavementX, y: yMain };
|
||||
let ditchTopOuterPt = null;
|
||||
|
||||
// ★ 1. 프리캐스트 뚜껑(Lid Box) 직접 탐색 (포장단부 바깥쪽 수평선 쌍 및 두께 매칭)
|
||||
let foundLid = null;
|
||||
@@ -1059,6 +1060,11 @@ function extractParamsFromDXF(dxf, sourceName = '도면') {
|
||||
res.dh = Math.max(dh1, dh2);
|
||||
const innerDitchX = direction === 'left' ? bx2 : bx1;
|
||||
res.bcw = Math.round(Math.abs(pavementX - innerDitchX));
|
||||
const outerV = direction === 'left' ? v1[0] : v2[0];
|
||||
ditchTopOuterPt = {
|
||||
x: (outerV.vertices[0].x + outerV.vertices[1].x) / 2,
|
||||
y: Math.max(outerV.vertices[0].y, outerV.vertices[1].y)
|
||||
};
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1154,12 +1160,13 @@ function extractParamsFromDXF(dxf, sourceName = '도면') {
|
||||
ditchBotOuterPt = { x: ditchBotInnerPt.x + (direction === 'left' ? -res.dw : res.dw), y: ditchBotInnerPt.y };
|
||||
}
|
||||
|
||||
const dhOuterLines = findConnectedLines(ditchBotOuterPt, secLines, 'up');
|
||||
let ditchTopOuterPt = null;
|
||||
if (dhOuterLines.length > 0) {
|
||||
ditchTopOuterPt = getOtherPt(dhOuterLines[0].l, ditchBotOuterPt);
|
||||
} else {
|
||||
ditchTopOuterPt = { x: ditchBotOuterPt.x, y: ditchBotOuterPt.y + res.dh };
|
||||
if (!ditchTopOuterPt) {
|
||||
const dhOuterLines = findConnectedLines(ditchBotOuterPt, secLines, 'up');
|
||||
if (dhOuterLines.length > 0) {
|
||||
ditchTopOuterPt = getOtherPt(dhOuterLines[0].l, ditchBotOuterPt);
|
||||
} else {
|
||||
ditchTopOuterPt = { x: ditchBotOuterPt.x, y: ditchBotOuterPt.y + res.dh };
|
||||
}
|
||||
}
|
||||
|
||||
let currentPt = ditchTopOuterPt;
|
||||
@@ -1200,6 +1207,17 @@ function extractParamsFromDXF(dxf, sourceName = '도면') {
|
||||
res.wh1 = Math.round(p3.y - currentPt.y);
|
||||
res.ww2 = Math.round(Math.abs(p3.x - currentPt.x));
|
||||
currentPt = p3;
|
||||
|
||||
const lineTop = getConnectedLinesAt(currentPt).find(l => {
|
||||
const p = getOtherPt(l, currentPt);
|
||||
const dx = Math.abs(p.x - currentPt.x);
|
||||
const dy = Math.abs(p.y - currentPt.y);
|
||||
return dy <= 3.0 && dx >= 50 && dx <= 300 && (direction === 'left' ? p.x < currentPt.x : p.x > currentPt.x);
|
||||
});
|
||||
if (lineTop) {
|
||||
const p4 = getOtherPt(lineTop, currentPt);
|
||||
res.ww1 = Math.round(Math.abs(p4.x - currentPt.x));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user