From a13c4c4ac6306167bc3b89876b4c2fad13d84aec Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 16 Jun 2026 10:05:01 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EB=B3=B5=EC=9E=A1=ED=95=9C=20=EC=A7=80?= =?UTF-8?q?=EB=B6=95=EB=A9=B4=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/usePolygon.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/hooks/usePolygon.js b/src/hooks/usePolygon.js index 5bab7229..e3827dc9 100644 --- a/src/hooks/usePolygon.js +++ b/src/hooks/usePolygon.js @@ -1505,17 +1505,19 @@ export const usePolygon = () => { return Math.abs(line.startPoint.x - line.endPoint.x) > 2 || Math.abs(line.startPoint.y - line.endPoint.y) > 2 }) - // [SUPERSEDED-EAVES 2026-06-15] 처마선을 바깥으로 옮겨 처마(연·軒)를 만들면, 옮긴 처마와 양끝 연결선 - // (모두 auxiliaryLine)·원래 처마선(eaves)이 닫힌 "띠 사각형"을 이룬다. 이때 원래 처마선이 면분할 - // 입력에 남아 있으면 바깥 면을 [띠 + 사다리꼴]로 갈라, 사다리꼴을 닫는 시작선이 사라져 면이 통째로 - // 누락된다(GETSPLIT-IO 진단: 위 사다리꼴 미생성). 원래 처마선은 이미 면 내부의 가상선이므로 면분할 - // 입력에서 제외 → 띠+사다리꼴이 하나의 면(예: 6각형)으로 병합된다. 띠 패턴이 없으면 아무 영향 없음. + // [SUPERSEDED-EAVES 2026-06-15] 외곽선(처마/케라바)을 바깥으로 옮겨 처마(연·軒)를 만들면, 옮긴 선과 양끝 + // 연결선(모두 auxiliaryLine)·원래 외곽선(eaves/gable)이 닫힌 "띠 사각형"을 이룬다. 이때 원래 외곽선이 + // 면분할 입력에 남아 있으면 바깥 면을 [띠 + 사다리꼴]로 갈라, 사다리꼴을 닫는 시작선이 사라져 면이 통째로 + // 누락된다(GETSPLIT-IO 진단). 원래 외곽선은 이미 면 내부의 가상선이므로 면분할 입력에서 제외 → 띠+사다리꼴이 + // 하나의 면(예: 6각형)으로 병합된다. 띠 패턴(양끝 연결선 + 평행 닫힘선)이 없으면 아무 영향 없음. + // [2026-06-16] eaves 뿐 아니라 gable 외곽선도 동일 처리 — 아래변(gable)을 옮긴 L자형 사례 대응. const auxBandLines = allLines.filter((l) => l.name === 'auxiliaryLine') if (auxBandLines.length > 0) { const sharesPt = (l, p) => isSamePoint(l.startPoint, p) || isSamePoint(l.endPoint, p) const otherEnd = (l, p) => (isSamePoint(l.startPoint, p) ? l.endPoint : l.startPoint) const supersededEaves = allLines.filter((E) => { - if (E.attributes?.type !== 'eaves') return false + const type = E.attributes?.type + if (type !== 'eaves' && type !== 'gable') return false const A = E.startPoint const B = E.endPoint // A·B 각각에서 바깥으로 뻗는 연결 보조선(한쪽 끝점만 공유) @@ -1528,7 +1530,7 @@ export const usePolygon = () => { return auxBandLines.some((c) => c !== CA && c !== CB && sharesPt(c, Ao) && sharesPt(c, Bo)) }) if (supersededEaves.length > 0) { - logger.log(`[SUPERSEDED-EAVES] 띠로 대체된 원래 처마선 ${supersededEaves.length}개 면분할 입력에서 제외`) + logger.log(`[SUPERSEDED-EAVES] 띠로 대체된 원래 외곽선(처마/케라바) ${supersededEaves.length}개 면분할 입력에서 제외`) allLines = allLines.filter((l) => !supersededEaves.includes(l)) } } From ee390de934c5c06e7e4b164e66d6dac66c571387 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 16 Jun 2026 14:06:19 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=ED=95=9C=EC=AA=BD=20=ED=9D=90=EB=A6=84?= =?UTF-8?q?=EC=9D=98=20=EA=B2=BD=EC=9A=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/usePolygon.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hooks/usePolygon.js b/src/hooks/usePolygon.js index e3827dc9..75895e22 100644 --- a/src/hooks/usePolygon.js +++ b/src/hooks/usePolygon.js @@ -1510,14 +1510,16 @@ export const usePolygon = () => { // 면분할 입력에 남아 있으면 바깥 면을 [띠 + 사다리꼴]로 갈라, 사다리꼴을 닫는 시작선이 사라져 면이 통째로 // 누락된다(GETSPLIT-IO 진단). 원래 외곽선은 이미 면 내부의 가상선이므로 면분할 입력에서 제외 → 띠+사다리꼴이 // 하나의 면(예: 6각형)으로 병합된다. 띠 패턴(양끝 연결선 + 평행 닫힘선)이 없으면 아무 영향 없음. - // [2026-06-16] eaves 뿐 아니라 gable 외곽선도 동일 처리 — 아래변(gable)을 옮긴 L자형 사례 대응. + // [2026-06-16] eaves 외에 gable(아래변 이동 L자형)·shed(한쪽흐름 왼쪽변 이동→8각형) 외곽선도 동일 처리. + // 연결선이 대각(챔퍼)이어도 끝점만 공유하면 매칭됨. const auxBandLines = allLines.filter((l) => l.name === 'auxiliaryLine') if (auxBandLines.length > 0) { const sharesPt = (l, p) => isSamePoint(l.startPoint, p) || isSamePoint(l.endPoint, p) const otherEnd = (l, p) => (isSamePoint(l.startPoint, p) ? l.endPoint : l.startPoint) const supersededEaves = allLines.filter((E) => { + // 외곽 경계선(처마 eaves / 케라바 gable / 한쪽흐름 shed)만 후보 — 보조선·내부선(용마루/추녀)은 제외. const type = E.attributes?.type - if (type !== 'eaves' && type !== 'gable') return false + if (type !== 'eaves' && type !== 'gable' && type !== 'shed') return false const A = E.startPoint const B = E.endPoint // A·B 각각에서 바깥으로 뻗는 연결 보조선(한쪽 끝점만 공유)