templateMode 수정

This commit is contained in:
hyojun.choi 2024-07-19 14:28:06 +09:00
parent ae096b2f00
commit 2f4560c2c9

View File

@ -211,24 +211,10 @@ export function useMode() {
changeMode(canvas, Mode.EDIT)
if (historyPoints.current.length >= 4) {
// handleOuterlinesTest() //외곽선 그리기 테스트
// drawWallPolygon()
//아래 내용 drawWallPolygon()으로 대체
const firstPoint = historyPoints.current[0]
const lastPoint = historyPoints.current[historyPoints.current.length - 1]
historyPoints.current.forEach((point) => {
canvas?.remove(point)
})
drawLineWithLength(lastPoint, firstPoint)
points.current = []
historyPoints.current = []
const roof = handleOuterlinesTest()
const wall = makePolygon()
roof.setWall(wall)
setWall(wall)
roof.drawHelpLine()
const wall = drawWallPolygon()
handleOuterlinesTest2(wall)
/*setWall(wall)
roof.drawHelpLine()*/
}
}
@ -732,6 +718,8 @@ export function useMode() {
const handleOuterlinesTest = (polygon, offset = 71) => {
var offsetPoints = []
debugger
const sortedIndex = getStartIndex(polygon.lines)
let tmpArraySorted = rearrangeArray(polygon.lines, sortedIndex)