Compare commits

..

No commits in common. "fd962219dd2d4f7c6635ab88afb540d89fdb64b8" and "d867a8dda7de283313c9c44debcec65081d73dfa" have entirely different histories.

2 changed files with 9 additions and 34 deletions

View File

@ -2726,26 +2726,16 @@ export const useTrestle = () => {
moduleRowResultData.touchedHalfSurfaceBracketCnt += 1
} else if (!halfBottomLeftModule && !findSamePointInBottom(exposedBottomModules, module, direction)) {
// 왼쪽 아래가 없고, 하단에 같은 점이 없는 경우는 touched는 1개, exposed는 2개
if (level % 2 === 0) {
moduleRowResultData.exposedHalfBottomBracketCnt += 1
moduleRowResultData.touchedHalfSurfaceBracketCnt += 2
} else {
moduleRowResultData.exposedHalfBottomBracketCnt += 2
moduleRowResultData.touchedHalfSurfaceBracketCnt += 1
}
moduleRowResultData.exposedHalfBottomBracketCnt += 1
moduleRowResultData.touchedHalfSurfaceBracketCnt += 2
} else if (!halfBottomRightModule && findSamePointInBottom(exposedBottomModules, module, direction)) {
// 오른쪽 아래가 없고, 하단에 같은 점이 있는 경우는 exposed는 2개, touched는 1개
moduleRowResultData.exposedHalfBottomBracketCnt += 1
moduleRowResultData.touchedHalfSurfaceBracketCnt += 2
} else if (!halfBottomRightModule && !findSamePointInBottom(exposedBottomModules, module, direction)) {
// 오른쪽 아래가 없고, 하단에 같은 점이 없는 경우는 exposed는 1개, touched는 2개
if (level % 2 === 0) {
moduleRowResultData.exposedHalfBottomBracketCnt += 2
moduleRowResultData.touchedHalfSurfaceBracketCnt += 1
} else {
moduleRowResultData.exposedHalfBottomBracketCnt += 1
moduleRowResultData.touchedHalfSurfaceBracketCnt += 2
}
moduleRowResultData.exposedHalfBottomBracketCnt += 2
moduleRowResultData.touchedHalfSurfaceBracketCnt += 1
}
}
}
@ -2784,20 +2774,6 @@ export const useTrestle = () => {
if (rackYn === 'N') {
if (rackQty !== 3) {
moduleRowResultData.exposedHalfTopBracketCnt += rackQty / 2
} else {
if (halfTopLeftModule) {
if (level % 2 === 0) {
moduleRowResultData.exposedHalfTopBracketCnt += 2
} else {
moduleRowResultData.exposedHalfTopBracketCnt += 1
}
} else if (halfTopRightModule) {
if (level % 2 === 0) {
moduleRowResultData.exposedHalfTopBracketCnt += 1
} else {
moduleRowResultData.exposedHalfTopBracketCnt += 2
}
}
}
}
} else if (!halfTopLeftModule && !halfTopRightModule) {

View File

@ -7250,12 +7250,11 @@ const drawHipLine = (points, canvas, roof, textMode, currentRoof, prevDegree, cu
const baseX = Big(points[0]).minus(Big(points[2])).abs()
const baseY = Big(points[1]).minus(Big(points[3])).abs()
if (baseX.gt(1) && baseY.gt(1)) {
const hypotenuse = calcLinePlaneSize({ x1: points[0], y1: points[1], x2: points[2], y2: points[3] })
const base = getAdjacent(hypotenuse)
const heightX = base * Math.tan((currentDegree * Math.PI) / 180)
const heightY = base * Math.tan((prevDegree * Math.PI) / 180)
const degreeX = Math.atan2(heightX, hypotenuse) * (180 / Math.PI)
const degreeY = Math.atan2(heightY, hypotenuse) * (180 / Math.PI)
const base = calcLinePlaneSize({ x1: points[0], y1: points[1], x2: points[2], y2: points[3] }) / 10
const heightX = baseX.times(Math.tan((currentDegree * Math.PI) / 180)).round()
const heightY = baseY.times(Math.tan((prevDegree * Math.PI) / 180)).round()
const degreeX = Math.atan(heightX.div(base).toNumber()) / (Math.PI / 180)
const degreeY = Math.atan(heightY.div(base).toNumber()) / (Math.PI / 180)
if (Math.abs(degreeX - degreeY) < 1) {
currentDegree = degreeX
prevDegree = degreeY