한쪽 흐름의 경우 추가

This commit is contained in:
hyojun.choi 2026-06-16 14:06:19 +09:00
parent a13c4c4ac6
commit ee390de934

View File

@ -1510,14 +1510,16 @@ export const usePolygon = () => {
// 면분할 입력에 남아 있으면 바깥 면을 [띠 + 사다리꼴]로 갈라, 사다리꼴을 닫는 시작선이 사라져 면이 통째로 // 면분할 입력에 남아 있으면 바깥 면을 [띠 + 사다리꼴]로 갈라, 사다리꼴을 닫는 시작선이 사라져 면이 통째로
// 누락된다(GETSPLIT-IO 진단). 원래 외곽선은 이미 면 내부의 가상선이므로 면분할 입력에서 제외 → 띠+사다리꼴이 // 누락된다(GETSPLIT-IO 진단). 원래 외곽선은 이미 면 내부의 가상선이므로 면분할 입력에서 제외 → 띠+사다리꼴이
// 하나의 면(예: 6각형)으로 병합된다. 띠 패턴(양끝 연결선 + 평행 닫힘선)이 없으면 아무 영향 없음. // 하나의 면(예: 6각형)으로 병합된다. 띠 패턴(양끝 연결선 + 평행 닫힘선)이 없으면 아무 영향 없음.
// [2026-06-16] eaves 뿐 아니라 gable 외곽선도 동일 처리 — 아래변(gable)을 옮긴 L자형 사례 대응. // [2026-06-16] eaves 외에 gable(아래변 이동 L자형)·shed(한쪽흐름 왼쪽변 이동→8각형) 외곽선도 동일 처리.
// 연결선이 대각(챔퍼)이어도 끝점만 공유하면 매칭됨.
const auxBandLines = allLines.filter((l) => l.name === 'auxiliaryLine') const auxBandLines = allLines.filter((l) => l.name === 'auxiliaryLine')
if (auxBandLines.length > 0) { if (auxBandLines.length > 0) {
const sharesPt = (l, p) => isSamePoint(l.startPoint, p) || isSamePoint(l.endPoint, p) 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 otherEnd = (l, p) => (isSamePoint(l.startPoint, p) ? l.endPoint : l.startPoint)
const supersededEaves = allLines.filter((E) => { const supersededEaves = allLines.filter((E) => {
// 외곽 경계선(처마 eaves / 케라바 gable / 한쪽흐름 shed)만 후보 — 보조선·내부선(용마루/추녀)은 제외.
const type = E.attributes?.type 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 A = E.startPoint
const B = E.endPoint const B = E.endPoint
// A·B 각각에서 바깥으로 뻗는 연결 보조선(한쪽 끝점만 공유) // A·B 각각에서 바깥으로 뻗는 연결 보조선(한쪽 끝점만 공유)