외곽선 순서 오류 수정
This commit is contained in:
parent
2963b26d65
commit
3414f2ca3c
@ -742,9 +742,17 @@ export function useMode() {
|
||||
|
||||
const handleOuterlinesTest = () => {
|
||||
var offsetPoints = []
|
||||
let offset = -35.5 // == 100 - 29
|
||||
let offset = 71 // == 100 - 29
|
||||
|
||||
const points = historyLines.current.map((line) => ({
|
||||
const sortedIndex = getStartIndex(historyLines.current)
|
||||
let tmpArraySorted = rearrangeArray(historyLines.current, sortedIndex)
|
||||
|
||||
if (tmpArraySorted[0].direction === 'right') {
|
||||
//시계방향
|
||||
tmpArraySorted = tmpArraySorted.reverse() //그럼 배열을 거꾸로 만들어서 무조건 반시계방향으로 배열 보정
|
||||
}
|
||||
|
||||
const points = tmpArraySorted.map((line) => ({
|
||||
x: line.x1,
|
||||
y: line.y1,
|
||||
}))
|
||||
@ -785,9 +793,6 @@ export function useMode() {
|
||||
y: averageNormal.y / lengthNormal,
|
||||
}
|
||||
|
||||
console.log('current', current)
|
||||
console.log('unitNormal', unitNormal)
|
||||
|
||||
// 오프셋 적용
|
||||
var offsetPoint = {
|
||||
x1: current.x + unitNormal.x * offset,
|
||||
@ -796,7 +801,7 @@ export function useMode() {
|
||||
|
||||
offsetPoints.push(offsetPoint)
|
||||
}
|
||||
|
||||
|
||||
makePolygon(offsetPoints)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user