4각형 셀 생성 추가
This commit is contained in:
parent
d389b03577
commit
68365493e2
@ -123,14 +123,10 @@ export function useMode() {
|
|||||||
}, [guideLineInfo])
|
}, [guideLineInfo])
|
||||||
|
|
||||||
const drawMouseLines = (e) => {
|
const drawMouseLines = (e) => {
|
||||||
console.log('guideLineInfo', guideLineInfo)
|
|
||||||
|
|
||||||
let isGuideLineMode = false,
|
let isGuideLineMode = false,
|
||||||
isGuideDotMode = false
|
isGuideDotMode = false
|
||||||
let guideDotLength, guideLineLengthHori, guideLineLengthVert, horizontalLineArray, verticalLineArray
|
let guideDotLength, guideLineLengthHori, guideLineLengthVert, horizontalLineArray, verticalLineArray
|
||||||
|
|
||||||
console.log()
|
|
||||||
|
|
||||||
if (isObjectNotEmpty(guideLineInfo)) {
|
if (isObjectNotEmpty(guideLineInfo)) {
|
||||||
const guideLineState = guideLineInfo.filter((item) => item.guideMode === 'guideLine')
|
const guideLineState = guideLineInfo.filter((item) => item.guideMode === 'guideLine')
|
||||||
const guideDotState = guideLineInfo.filter((item) => item.guideMode === 'guideDot')
|
const guideDotState = guideLineInfo.filter((item) => item.guideMode === 'guideDot')
|
||||||
@ -4217,38 +4213,49 @@ export function useMode() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//셀이 생성될 지붕의 흐름방향을 정함
|
console.log('templateCenterLine', templateCenterLine)
|
||||||
templateCenterLine.some((centerLine) => {
|
|
||||||
|
if (templateCenterLine.length > 0) {
|
||||||
|
//셀이 생성될 지붕의 흐름방향을 정함
|
||||||
|
templateCenterLine.some((centerLine) => {
|
||||||
|
if (templateType === 2) {
|
||||||
|
trestlePolygon.set({
|
||||||
|
referenceDirection: referenceDirection,
|
||||||
|
startIndex: parallelPoint,
|
||||||
|
}) //기준면 방향
|
||||||
|
trestlePolygon.points.forEach((trestleLine, index) => {
|
||||||
|
if (trestleLine.x === centerLine.x1 - 12) {
|
||||||
|
trestlePolygon.set({ wallDirection: 'left' })
|
||||||
|
return true
|
||||||
|
} else if (trestleLine.x === centerLine.x1 + 12) {
|
||||||
|
trestlePolygon.set({ wallDirection: 'right' })
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (templateType === 3) {
|
||||||
|
trestlePolygon.set({
|
||||||
|
referenceDirection: referenceDirection,
|
||||||
|
startIndex: parallelPoint,
|
||||||
|
}) //기준면 방향
|
||||||
|
trestlePolygon.points.forEach((trestleLine, index) => {
|
||||||
|
if (trestleLine.y === centerLine.y1 - 12) {
|
||||||
|
trestlePolygon.set({ wallDirection: 'top' })
|
||||||
|
return true
|
||||||
|
} else if (trestleLine.y === centerLine.y1 + 12) {
|
||||||
|
trestlePolygon.set({ wallDirection: 'bottom' })
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
if (templateType === 2) {
|
if (templateType === 2) {
|
||||||
trestlePolygon.set({
|
index === 0 ? trestlePolygon.set({ wallDirection: 'left' }) : trestlePolygon.set({ wallDirection: 'right' })
|
||||||
referenceDirection: referenceDirection,
|
|
||||||
startIndex: parallelPoint,
|
|
||||||
}) //기준면 방향
|
|
||||||
trestlePolygon.points.forEach((trestleLine, index) => {
|
|
||||||
if (trestleLine.x === centerLine.x1 - 12) {
|
|
||||||
trestlePolygon.set({ wallDirection: 'left' })
|
|
||||||
return true
|
|
||||||
} else if (trestleLine.x === centerLine.x1 + 12) {
|
|
||||||
trestlePolygon.set({ wallDirection: 'right' })
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else if (templateType === 3) {
|
} else if (templateType === 3) {
|
||||||
trestlePolygon.set({
|
index === 0 ? trestlePolygon.set({ wallDirection: 'top' }) : trestlePolygon.set({ wallDirection: 'bottom' })
|
||||||
referenceDirection: referenceDirection,
|
|
||||||
startIndex: parallelPoint,
|
|
||||||
}) //기준면 방향
|
|
||||||
trestlePolygon.points.forEach((trestleLine, index) => {
|
|
||||||
if (trestleLine.y === centerLine.y1 - 12) {
|
|
||||||
trestlePolygon.set({ wallDirection: 'top' })
|
|
||||||
return true
|
|
||||||
} else if (trestleLine.y === centerLine.y1 + 12) {
|
|
||||||
trestlePolygon.set({ wallDirection: 'bottom' })
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
trestlePolygon.set({ referenceDirection: 'none' })
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 가대 선택 이벤트
|
* 가대 선택 이벤트
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user