Compare commits
No commits in common. "0a2e2bb1feb1767f75aab52e7a4a5114496add28" and "b1c35376da012c1b685f7b58a0b14b3ffddf5425" have entirely different histories.
0a2e2bb1fe
...
b1c35376da
@ -463,7 +463,6 @@ export const skeletonBuilder = (roofId, canvas, textMode) => {
|
||||
})
|
||||
|
||||
// 6. 마루이동(용마루 위치 수동 조정)이 설정된 경우 movingLineFromSkeleton 결과로 대체
|
||||
|
||||
if (moveFlowLine !== 0 || moveUpDown !== 0) {
|
||||
const movedPoints = movingLineFromSkeleton(roofId, canvas)
|
||||
console.log("movedPoints:::", movedPoints);
|
||||
@ -982,7 +981,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
isIn = true
|
||||
|
||||
if (isStartEnd.start) {
|
||||
console.log('left_in::::isStartEnd:::::', isStartEnd)
|
||||
newPEnd.y = roofLine.y2
|
||||
newPEnd.x = roofLine.x2
|
||||
|
||||
@ -1013,7 +1011,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
}
|
||||
|
||||
if (isStartEnd.end) {
|
||||
console.log('left_in::::isStartEnd:::::', isStartEnd)
|
||||
newPStart.y = roofLine.y1
|
||||
newPStart.x = roofLine.x1
|
||||
|
||||
@ -1103,7 +1100,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
}
|
||||
|
||||
if (isStartEnd.end) {
|
||||
console.log('left_in::::isStartEnd:::::', isStartEnd)
|
||||
const moveDist = Big(wallLine.x1).minus(wallBaseLine.x1).abs().toNumber()
|
||||
const aStartY = Big(roofLine.y2).plus(moveDist).toNumber()
|
||||
const bStartY = Big(wallLine.y2).plus(moveDist).toNumber()
|
||||
@ -1165,7 +1161,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
}
|
||||
} else if (condition === 'right_in') {
|
||||
if (isStartEnd.start) {
|
||||
console.log('right_in::::isStartEnd:::::', isStartEnd)
|
||||
newPEnd.y = roofLine.y2
|
||||
newPEnd.x = roofLine.x2
|
||||
|
||||
@ -1195,7 +1190,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
}
|
||||
|
||||
if (isStartEnd.end) {
|
||||
console.log('left_in::::isStartEnd:::::', isStartEnd)
|
||||
newPStart.y = roofLine.y1
|
||||
newPStart.x = roofLine.x1
|
||||
|
||||
@ -1365,7 +1359,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
|
||||
if (condition === 'top_in') {
|
||||
if (isStartEnd.start) {
|
||||
console.log('top_in start')
|
||||
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
|
||||
sPoint = { x: wallBaseLine.x1, y: wallBaseLine.y1 }
|
||||
newPStart.x = wallBaseLine.x1
|
||||
@ -1394,7 +1387,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
}
|
||||
|
||||
if (isStartEnd.end) {
|
||||
console.log('top_in end', isStartEnd)
|
||||
const moveDist = Big(wallLine.y2).minus(wallBaseLine.y2).abs().toNumber()
|
||||
sPoint = { x: wallBaseLine.x2, y: wallBaseLine.y2 }
|
||||
newPEnd.x = wallBaseLine.x2
|
||||
@ -1442,18 +1434,12 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
// console.log('Creating extensionLine (Y1 > X1):', { sPoint, roofLine, dist, roofId })
|
||||
const createdLine = getAddLine({ x: sPoint.x, y: sPoint.y }, { x: roofLine.x1, y: roofLine.y1 + dist }, 'orange','extensionLine')
|
||||
console.log('extensionLine created - length:', createdLine.length, 'coords:', { x1: createdLine.x1, y1: createdLine.y1, x2: createdLine.x2, y2: createdLine.y2 })
|
||||
createdLine.set({ name: LINE_TYPE.SUBLINE.HIP, lineName: LINE_TYPE.SUBLINE.HIP, stroke: '#1083E3', strokeWidth: 2 })
|
||||
createdLine.attributes = { ...createdLine.attributes, type: LINE_TYPE.SUBLINE.HIP }
|
||||
innerLines.push(createdLine)
|
||||
|
||||
}else{
|
||||
const dist = moveDistX1 - moveDistY1
|
||||
// console.log('Creating extensionLine (X1 > Y1):', { sPoint, roofLine, dist, roofId })
|
||||
const createdLine = getAddLine({ x: sPoint.x, y: sPoint.y }, { x: roofLine.x1 - dist, y: roofLine.y1 }, 'orange','extensionLine')
|
||||
console.log('extensionLine created - length:', createdLine.length, 'coords:', { x1: createdLine.x1, y1: createdLine.y1, x2: createdLine.x2, y2: createdLine.y2 })
|
||||
createdLine.set({ name: LINE_TYPE.SUBLINE.HIP, lineName: LINE_TYPE.SUBLINE.HIP, stroke: '#1083E3', strokeWidth: 2 })
|
||||
createdLine.attributes = { ...createdLine.attributes, type: LINE_TYPE.SUBLINE.HIP }
|
||||
innerLines.push(createdLine)
|
||||
}
|
||||
|
||||
}
|
||||
@ -1466,9 +1452,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
// console.log('Creating extensionLine (Y2 > X2):', { ePoint, roofLine, dist, roofId })
|
||||
const createdLine = getAddLine({ x: ePoint.x, y: ePoint.y }, { x: roofLine.x2, y: roofLine.y2 + dist }, 'orange', 'extensionLine')
|
||||
console.log('extensionLine created - length:', createdLine.length, 'coords:', { x1: createdLine.x1, y1: createdLine.y1, x2: createdLine.x2, y2: createdLine.y2 })
|
||||
createdLine.set({ name: LINE_TYPE.SUBLINE.HIP, lineName: LINE_TYPE.SUBLINE.HIP, stroke: '#1083E3', strokeWidth: 2 })
|
||||
createdLine.attributes = { ...createdLine.attributes, type: LINE_TYPE.SUBLINE.HIP }
|
||||
innerLines.push(createdLine)
|
||||
|
||||
}else{
|
||||
const dist = moveDistX2 - moveDistY2
|
||||
@ -1476,9 +1459,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
// console.log('Creating extensionLine (X2 > Y2):', { ePoint, roofLine, dist, roofId })
|
||||
const createdLine = getAddLine({ x: ePoint.x, y: ePoint.y }, { x: roofLine.x2 + dist, y: roofLine.y2 }, 'orange', 'extensionLine')
|
||||
console.log('extensionLine created - length:', createdLine.length, 'coords:', { x1: createdLine.x1, y1: createdLine.y1, x2: createdLine.x2, y2: createdLine.y2 })
|
||||
createdLine.set({ name: LINE_TYPE.SUBLINE.HIP, lineName: LINE_TYPE.SUBLINE.HIP, stroke: '#1083E3', strokeWidth: 2 })
|
||||
createdLine.attributes = { ...createdLine.attributes, type: LINE_TYPE.SUBLINE.HIP }
|
||||
innerLines.push(createdLine)
|
||||
|
||||
}
|
||||
}
|
||||
@ -1544,7 +1524,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
getAddLine(newPStart, newPEnd, 'red')
|
||||
}
|
||||
if (isStartEnd.end) {
|
||||
console.log('isStartEnd:::::', isStartEnd)
|
||||
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
|
||||
const aStartX = Big(roofLine.x2).minus(moveDist).toNumber()
|
||||
const bStartX = Big(wallLine.x2).minus(moveDist).toNumber()
|
||||
@ -1602,9 +1581,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
getAddLine(newPStart, newPEnd, 'red')
|
||||
}
|
||||
} else if (condition === 'bottom_in') {
|
||||
console.log('bottom_in::::isStartEnd:::::', isStartEnd)
|
||||
if (isStartEnd.start) {
|
||||
console.log('isStartEnd:::::', isStartEnd)
|
||||
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
|
||||
sPoint = { x: wallBaseLine.x1, y: wallBaseLine.y1 }
|
||||
newPStart.x = wallBaseLine.x1
|
||||
@ -1633,7 +1610,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
}
|
||||
|
||||
if (isStartEnd.end) {
|
||||
console.log('isStartEnd:::::', isStartEnd)
|
||||
const moveDist = Big(wallLine.y2).minus(wallBaseLine.y2).abs().toNumber()
|
||||
sPoint = { x: wallBaseLine.x2, y: wallBaseLine.y2 }
|
||||
newPEnd.x = wallBaseLine.x2
|
||||
@ -1683,18 +1659,12 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
// console.log('Creating extensionLine (Y1 > X1):', { sPoint, roofLine, dist, roofId })
|
||||
const createdLine = getAddLine({ x: sPoint.x, y: sPoint.y }, { x: roofLine.x1, y: roofLine.y1 - dist }, 'orange','extensionLine')
|
||||
console.log('extensionLine created - length:', createdLine.length, 'coords:', { x1: createdLine.x1, y1: createdLine.y1, x2: createdLine.x2, y2: createdLine.y2 })
|
||||
createdLine.set({ name: LINE_TYPE.SUBLINE.HIP, lineName: LINE_TYPE.SUBLINE.HIP, stroke: '#1083E3', strokeWidth: 2 })
|
||||
createdLine.attributes = { ...createdLine.attributes, type: LINE_TYPE.SUBLINE.HIP }
|
||||
innerLines.push(createdLine)
|
||||
|
||||
}else{
|
||||
const dist = moveDistX1 - moveDistY1
|
||||
// console.log('Creating extensionLine (X1 > Y1):', { sPoint, roofLine, dist, roofId })
|
||||
const createdLine = getAddLine({ x: sPoint.x, y: sPoint.y }, { x: roofLine.x1 + dist, y: roofLine.y1 }, 'orange','extensionLine')
|
||||
console.log('extensionLine created - length:', createdLine.length, 'coords:', { x1: createdLine.x1, y1: createdLine.y1, x2: createdLine.x2, y2: createdLine.y2 })
|
||||
createdLine.set({ name: LINE_TYPE.SUBLINE.HIP, lineName: LINE_TYPE.SUBLINE.HIP, stroke: '#1083E3', strokeWidth: 2 })
|
||||
createdLine.attributes = { ...createdLine.attributes, type: LINE_TYPE.SUBLINE.HIP }
|
||||
innerLines.push(createdLine)
|
||||
}
|
||||
|
||||
}
|
||||
@ -1707,9 +1677,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
// console.log('Creating extensionLine (Y2 > X2):', { ePoint, roofLine, dist, roofId })
|
||||
const createdLine = getAddLine({ x: ePoint.x, y: ePoint.y }, { x: roofLine.x2, y: roofLine.y2 - dist }, 'orange', 'extensionLine')
|
||||
console.log('extensionLine created - length:', createdLine.length, 'coords:', { x1: createdLine.x1, y1: createdLine.y1, x2: createdLine.x2, y2: createdLine.y2 })
|
||||
createdLine.set({ name: LINE_TYPE.SUBLINE.HIP, lineName: LINE_TYPE.SUBLINE.HIP, stroke: '#1083E3', strokeWidth: 2 })
|
||||
createdLine.attributes = { ...createdLine.attributes, type: LINE_TYPE.SUBLINE.HIP }
|
||||
innerLines.push(createdLine)
|
||||
|
||||
}else{
|
||||
const dist = moveDistX2 - moveDistY2
|
||||
@ -1717,9 +1684,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
// console.log('Creating extensionLine (X2 > Y2):', { ePoint, roofLine, dist, roofId })
|
||||
const createdLine = getAddLine({ x: ePoint.x, y: ePoint.y }, { x: roofLine.x2 - dist, y: roofLine.y2 }, 'orange', 'extensionLine')
|
||||
console.log('extensionLine created - length:', createdLine.length, 'coords:', { x1: createdLine.x1, y1: createdLine.y1, x2: createdLine.x2, y2: createdLine.y2 })
|
||||
createdLine.set({ name: LINE_TYPE.SUBLINE.HIP, lineName: LINE_TYPE.SUBLINE.HIP, stroke: '#1083E3', strokeWidth: 2 })
|
||||
createdLine.attributes = { ...createdLine.attributes, type: LINE_TYPE.SUBLINE.HIP }
|
||||
innerLines.push(createdLine)
|
||||
|
||||
}
|
||||
}
|
||||
@ -1727,7 +1691,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
} else if (condition === 'bottom_out') {
|
||||
console.log('bottom_out isStartEnd:::::::', isStartEnd)
|
||||
if (isStartEnd.start) {
|
||||
console.log('isStartEnd:::::::', isStartEnd)
|
||||
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
|
||||
const aStartX = Big(roofLine.x1).minus(moveDist).toNumber()
|
||||
const bStartX = Big(wallLine.x1).minus(moveDist).toNumber()
|
||||
@ -1786,7 +1749,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
}
|
||||
|
||||
if (isStartEnd.end) {
|
||||
console.log('isStartEnd:::::', isStartEnd)
|
||||
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
|
||||
const aStartX = Big(roofLine.x2).plus(moveDist).toNumber()
|
||||
const bStartX = Big(wallLine.x2).plus(moveDist).toNumber()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user