Compare commits

..

No commits in common. "043f9a6befadd60fe85fe84f8f6ca15f97f3c206" and "af369e4c0d8b52650b540e47801d9335ac33d2bd" have entirely different histories.

2 changed files with 2 additions and 46 deletions

View File

@ -17,7 +17,6 @@ import {
currentCanvasPlanState, currentCanvasPlanState,
isManualModuleLayoutSetupState, isManualModuleLayoutSetupState,
isManualModuleSetupState, isManualModuleSetupState,
moduleSetupOptionState,
toggleManualSetupModeState, toggleManualSetupModeState,
} from '@/store/canvasAtom' } from '@/store/canvasAtom'
import { loginUserStore } from '@/store/commonAtom' import { loginUserStore } from '@/store/commonAtom'
@ -48,7 +47,6 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
const [checkedModules, setCheckedModules] = useRecoilState(checkedModuleState) const [checkedModules, setCheckedModules] = useRecoilState(checkedModuleState)
const [roofs, setRoofs] = useState(addedRoofs) const [roofs, setRoofs] = useState(addedRoofs)
const [manualSetupMode, setManualSetupMode] = useRecoilState(toggleManualSetupModeState) const [manualSetupMode, setManualSetupMode] = useRecoilState(toggleManualSetupModeState)
const [moduleSetupOption, setModuleSetupOption] = useRecoilState(moduleSetupOptionState)
const [layoutSetup, setLayoutSetup] = useState([{}]) const [layoutSetup, setLayoutSetup] = useState([{}])
const { const {
selectedModules, selectedModules,
@ -213,12 +211,8 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
} }
const handleManualModuleSetup = () => { const handleManualModuleSetup = () => {
const nextManual = !isManualModuleSetup setManualSetupMode(`manualSetup_${!isManualModuleSetup}`)
setManualSetupMode(`manualSetup_${nextManual}`) setIsManualModuleSetup(!isManualModuleSetup)
setIsManualModuleSetup(nextManual)
if (nextManual) {
setModuleSetupOption((prev) => ({ ...prev, isChidori: true }))
}
} }
const handleManualModuleLayoutSetup = () => { const handleManualModuleLayoutSetup = () => {

View File

@ -463,7 +463,6 @@ export const skeletonBuilder = (roofId, canvas, textMode) => {
}) })
// 6. 마루이동(용마루 위치 수동 조정)이 설정된 경우 movingLineFromSkeleton 결과로 대체 // 6. 마루이동(용마루 위치 수동 조정)이 설정된 경우 movingLineFromSkeleton 결과로 대체
if (moveFlowLine !== 0 || moveUpDown !== 0) { if (moveFlowLine !== 0 || moveUpDown !== 0) {
const movedPoints = movingLineFromSkeleton(roofId, canvas) const movedPoints = movingLineFromSkeleton(roofId, canvas)
console.log("movedPoints:::", movedPoints); console.log("movedPoints:::", movedPoints);
@ -982,7 +981,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
isIn = true isIn = true
if (isStartEnd.start) { if (isStartEnd.start) {
console.log('left_in::::isStartEnd:::::', isStartEnd)
newPEnd.y = roofLine.y2 newPEnd.y = roofLine.y2
newPEnd.x = roofLine.x2 newPEnd.x = roofLine.x2
@ -1013,7 +1011,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
} }
if (isStartEnd.end) { if (isStartEnd.end) {
console.log('left_in::::isStartEnd:::::', isStartEnd)
newPStart.y = roofLine.y1 newPStart.y = roofLine.y1
newPStart.x = roofLine.x1 newPStart.x = roofLine.x1
@ -1103,7 +1100,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
} }
if (isStartEnd.end) { if (isStartEnd.end) {
console.log('left_in::::isStartEnd:::::', isStartEnd)
const moveDist = Big(wallLine.x1).minus(wallBaseLine.x1).abs().toNumber() const moveDist = Big(wallLine.x1).minus(wallBaseLine.x1).abs().toNumber()
const aStartY = Big(roofLine.y2).plus(moveDist).toNumber() const aStartY = Big(roofLine.y2).plus(moveDist).toNumber()
const bStartY = Big(wallLine.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') { } else if (condition === 'right_in') {
if (isStartEnd.start) { if (isStartEnd.start) {
console.log('right_in::::isStartEnd:::::', isStartEnd)
newPEnd.y = roofLine.y2 newPEnd.y = roofLine.y2
newPEnd.x = roofLine.x2 newPEnd.x = roofLine.x2
@ -1195,7 +1190,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
} }
if (isStartEnd.end) { if (isStartEnd.end) {
console.log('left_in::::isStartEnd:::::', isStartEnd)
newPStart.y = roofLine.y1 newPStart.y = roofLine.y1
newPStart.x = roofLine.x1 newPStart.x = roofLine.x1
@ -1365,7 +1359,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
if (condition === 'top_in') { if (condition === 'top_in') {
if (isStartEnd.start) { if (isStartEnd.start) {
console.log('top_in start')
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber() const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
sPoint = { x: wallBaseLine.x1, y: wallBaseLine.y1 } sPoint = { x: wallBaseLine.x1, y: wallBaseLine.y1 }
newPStart.x = wallBaseLine.x1 newPStart.x = wallBaseLine.x1
@ -1394,7 +1387,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
} }
if (isStartEnd.end) { if (isStartEnd.end) {
console.log('top_in end', isStartEnd)
const moveDist = Big(wallLine.y2).minus(wallBaseLine.y2).abs().toNumber() const moveDist = Big(wallLine.y2).minus(wallBaseLine.y2).abs().toNumber()
sPoint = { x: wallBaseLine.x2, y: wallBaseLine.y2 } sPoint = { x: wallBaseLine.x2, y: wallBaseLine.y2 }
newPEnd.x = wallBaseLine.x2 newPEnd.x = wallBaseLine.x2
@ -1442,18 +1434,12 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
// console.log('Creating extensionLine (Y1 > X1):', { sPoint, roofLine, dist, roofId }) // 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') 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 }) 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{ }else{
const dist = moveDistX1 - moveDistY1 const dist = moveDistX1 - moveDistY1
// console.log('Creating extensionLine (X1 > Y1):', { sPoint, roofLine, dist, roofId }) // 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') 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 }) 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 }) // 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') 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 }) 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{ }else{
const dist = moveDistX2 - moveDistY2 const dist = moveDistX2 - moveDistY2
@ -1476,9 +1459,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
// console.log('Creating extensionLine (X2 > Y2):', { ePoint, roofLine, dist, roofId }) // 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') 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 }) 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') getAddLine(newPStart, newPEnd, 'red')
} }
if (isStartEnd.end) { if (isStartEnd.end) {
console.log('isStartEnd:::::', isStartEnd)
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber() const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
const aStartX = Big(roofLine.x2).minus(moveDist).toNumber() const aStartX = Big(roofLine.x2).minus(moveDist).toNumber()
const bStartX = Big(wallLine.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') getAddLine(newPStart, newPEnd, 'red')
} }
} else if (condition === 'bottom_in') { } else if (condition === 'bottom_in') {
console.log('bottom_in::::isStartEnd:::::', isStartEnd)
if (isStartEnd.start) { if (isStartEnd.start) {
console.log('isStartEnd:::::', isStartEnd)
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber() const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
sPoint = { x: wallBaseLine.x1, y: wallBaseLine.y1 } sPoint = { x: wallBaseLine.x1, y: wallBaseLine.y1 }
newPStart.x = wallBaseLine.x1 newPStart.x = wallBaseLine.x1
@ -1633,7 +1610,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
} }
if (isStartEnd.end) { if (isStartEnd.end) {
console.log('isStartEnd:::::', isStartEnd)
const moveDist = Big(wallLine.y2).minus(wallBaseLine.y2).abs().toNumber() const moveDist = Big(wallLine.y2).minus(wallBaseLine.y2).abs().toNumber()
sPoint = { x: wallBaseLine.x2, y: wallBaseLine.y2 } sPoint = { x: wallBaseLine.x2, y: wallBaseLine.y2 }
newPEnd.x = wallBaseLine.x2 newPEnd.x = wallBaseLine.x2
@ -1683,18 +1659,12 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
// console.log('Creating extensionLine (Y1 > X1):', { sPoint, roofLine, dist, roofId }) // 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') 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 }) 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{ }else{
const dist = moveDistX1 - moveDistY1 const dist = moveDistX1 - moveDistY1
// console.log('Creating extensionLine (X1 > Y1):', { sPoint, roofLine, dist, roofId }) // 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') 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 }) 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 }) // 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') 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 }) 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{ }else{
const dist = moveDistX2 - moveDistY2 const dist = moveDistX2 - moveDistY2
@ -1717,9 +1684,6 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
// console.log('Creating extensionLine (X2 > Y2):', { ePoint, roofLine, dist, roofId }) // 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') 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 }) 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') { } else if (condition === 'bottom_out') {
console.log('bottom_out isStartEnd:::::::', isStartEnd) console.log('bottom_out isStartEnd:::::::', isStartEnd)
if (isStartEnd.start) { if (isStartEnd.start) {
console.log('isStartEnd:::::::', isStartEnd)
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber() const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
const aStartX = Big(roofLine.x1).minus(moveDist).toNumber() const aStartX = Big(roofLine.x1).minus(moveDist).toNumber()
const bStartX = Big(wallLine.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) { if (isStartEnd.end) {
console.log('isStartEnd:::::', isStartEnd)
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber() const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
const aStartX = Big(roofLine.x2).plus(moveDist).toNumber() const aStartX = Big(roofLine.x2).plus(moveDist).toNumber()
const bStartX = Big(wallLine.x2).plus(moveDist).toNumber() const bStartX = Big(wallLine.x2).plus(moveDist).toNumber()