전체삭제

This commit is contained in:
ysCha 2025-12-24 14:13:30 +09:00
parent c8ad779c58
commit 456ec7643e
2 changed files with 19 additions and 12 deletions

View File

@ -355,6 +355,12 @@ export function useContextMenu() {
canvas.remove(line)
})
//동이동현이동
const eaveHelpLines = canvas.getObjects().filter((obj) => obj.name === 'eaveHelpLine' && obj.parentId === currentObject.attributes.roofId)
eaveHelpLines.forEach((line) => {
canvas.remove(line)
})
canvas.renderAll()
},
},

View File

@ -677,8 +677,9 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
// 조건에 맞는 라인들만 필터링
const validWallLines = [...wallLines].sort((a, b) => a.idx - b.idx).filter((wallLine, index) => wallLine.idx - 1 === index)
console.log('', sortRoofLines, sortWallLines, sortWallBaseLines)
sortWallLines.length > 3 &&
console.log('', sortRoofLines, sortWallLines, sortWallBaseLines);
(sortWallLines.length === sortWallBaseLines.length && sortWallBaseLines.length > 3) &&
sortWallLines.forEach((wallLine, index) => {
const roofLine = sortRoofLines[index]
@ -1056,8 +1057,8 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
if (isStartEnd.end) {
const moveDist = Big(wallLine.x1).minus(wallBaseLine.x1).abs().toNumber()
const aStartY = Big(roofLine.y2).minus(moveDist).abs().toNumber()
const bStartY = Big(wallLine.y2).minus(moveDist).abs().toNumber()
const aStartY = Big(roofLine.y2).minus(moveDist).toNumber()
const bStartY = Big(wallLine.y2).minus(moveDist).toNumber()
const inLine = findLineContainingPoint(innerLines, { y: aStartY, x: roofLine.x1 })
console.log('startLines:::::::', inLine)
const eLineY = Big(bStartY).minus(wallLine.y2).abs().toNumber()
@ -1167,7 +1168,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
const newPointY = Big(roofLine.y1).plus(moveDist).toNumber()
const pDist = Big(wallLine.y1).minus(roofLine.y1).abs().toNumber()
const pLineX = Big(roofLine.x2).minus(0).abs().toNumber()
const pLineX = Big(roofLine.x2).minus(0).toNumber()
// let idx = sortRoofLines.length < index + 1 ? 0 : index
// const pLineY = sortRoofLines[idx + 1].y2
@ -1243,11 +1244,11 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
}
if (isStartEnd.end) {
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
const aStartX = Big(roofLine.x2).minus(moveDist).abs().toNumber()
const bStartX = Big(wallLine.x2).minus(moveDist).abs().toNumber()
const aStartX = Big(roofLine.x2).minus(moveDist).toNumber()
const bStartX = Big(wallLine.x2).minus(moveDist).toNumber()
const inLine = findLineContainingPoint(innerLines, { x: aStartX, y: newPEnd.y })
console.log('startLines:::::::', inLine)
const eLineX = Big(bStartX).minus(wallLine.x2).abs().toNumber()
const eLineX = Big(bStartX).minus(wallLine.x2).toNumber()
newPStart.x = roofLine.x1 //Big(newPStart.x).minus(eLineX).abs().toNumber()
newPEnd.x = aStartX
// let idx = sortRoofLines.length < index + 1 ? 0 : index
@ -1303,7 +1304,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
const newPointY = Big(roofLine.y2).minus(moveDist).toNumber()
const pDist = Big(wallLine.y2).minus(roofLine.y2).abs().toNumber()
const pLineX = Big(roofLine.x1).minus(0).abs().toNumber()
const pLineX = Big(roofLine.x1).minus(0).toNumber()
// let idx = 0 > index - 1 ? sortRoofLines.length : index
// const pLineY = sortRoofLines[idx - 1].y1
@ -1330,7 +1331,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
const newPointY = Big(roofLine.y1).minus(moveDist).toNumber()
const pDist = Big(wallLine.y1).minus(roofLine.y1).abs().toNumber()
const pLineX = Big(roofLine.x2).minus(0).abs().toNumber()
const pLineX = Big(roofLine.x2).minus(0).toNumber()
// let idx = sortRoofLines.length < index + 1 ? 0 : index
// const pLineY = sortRoofLines[idx + 1].y2
@ -1353,8 +1354,8 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
console.log('bottom_out isStartEnd:::::::', isStartEnd)
if (isStartEnd.start) {
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
const aStartX = Big(roofLine.x1).minus(moveDist).abs().toNumber()
const bStartX = Big(wallLine.x1).minus(moveDist).abs().toNumber()
const aStartX = Big(roofLine.x1).minus(moveDist).toNumber()
const bStartX = Big(wallLine.x1).minus(moveDist).toNumber()
const inLine = findLineContainingPoint(innerLines, { x: aStartX, y: roofLine.y1 })
console.log('startLines:::::::', inLine)
const eLineX = Big(bStartX).minus(wallLine.x1).abs().toNumber()