지붕면 할당 시 문제 수정

This commit is contained in:
hyojun.choi 2025-07-21 11:38:17 +09:00
parent 553a9340f4
commit 0bea975130

View File

@ -833,12 +833,17 @@ export const usePolygon = () => {
return !(range1.max < range2.min || range2.max < range1.min) return !(range1.max < range2.min || range2.max < range1.min)
} }
polygonLines.forEach((line) => {
line.need = true
})
// innerLines와 polygonLines의 겹침을 확인하고 type 변경 // innerLines와 polygonLines의 겹침을 확인하고 type 변경
innerLines.forEach((innerLine) => { innerLines.forEach((innerLine) => {
polygonLines.forEach((polygonLine) => { polygonLines.forEach((polygonLine) => {
if (checkLineOverlap(innerLine, polygonLine)) { if (checkLineOverlap(innerLine, polygonLine)) {
// innerLine의 type을 polygonLine의 type으로 변경 // innerLine의 type을 polygonLine의 type으로 변경
if (polygonLine.attributes?.type && innerLine.attributes) { if (polygonLine.attributes?.type && innerLine.attributes) {
polygonLine.need = false
innerLine.attributes.type = polygonLine.attributes.type innerLine.attributes.type = polygonLine.attributes.type
} }
} }
@ -846,6 +851,7 @@ export const usePolygon = () => {
}) })
const roofs = [] const roofs = []
polygonLines = polygonLines.filter((line) => line.need)
//polygonLines를 순회하며 innerLines와 교차하는 점을 line의 속성에 배열로 저장한다. //polygonLines를 순회하며 innerLines와 교차하는 점을 line의 속성에 배열로 저장한다.
polygonLines.forEach((line) => { polygonLines.forEach((line) => {