From c869d6c44df430841bec38f0c927c390552ada7c Mon Sep 17 00:00:00 2001 From: Jaeyoung Lee Date: Tue, 17 Jun 2025 10:39:22 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=EC=A7=80=EB=B6=95=EB=8D=AE=EA=B0=9C=20?= =?UTF-8?q?=EA=B3=84=EC=82=B0=EC=8B=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/util/qpolygon-utils.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/util/qpolygon-utils.js b/src/util/qpolygon-utils.js index 4e9351a8..d4417f9c 100644 --- a/src/util/qpolygon-utils.js +++ b/src/util/qpolygon-utils.js @@ -7250,11 +7250,12 @@ 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 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) + 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) if (Math.abs(degreeX - degreeY) < 1) { currentDegree = degreeX prevDegree = degreeY From be399a1b52d5cfae24d9a4723c897f151750c717 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 17 Jun 2025 15:16:51 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[1099]=20=E3=80=90HANASYS=20DESIGN=E3=80=91?= =?UTF-8?q?=E5=BC=B7=E5=8C=96=E6=96=BD=E5=B7=A5=E3=83=BB=E5=A4=9A=E9=9B=AA?= =?UTF-8?q?=E6=96=BD=E5=B7=A5=E3=81=A7=E5=8D=83=E9=B3=A5=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E3=81=A7=E3=81=8D=E3=82=8B=E3=83=A2=E3=82=B8=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E3=81=AE=E7=A9=8D=E7=AE=97=E3=81=8C=E3=81=8A=E3=81=8B?= =?UTF-8?q?=E3=81=97=E3=81=84=E3=80=82=20=EA=B2=AC=EC=A0=81=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=9D=B4=EC=83=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/module/useTrestle.js | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index b0ec3a31..915da562 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -2726,16 +2726,26 @@ export const useTrestle = () => { moduleRowResultData.touchedHalfSurfaceBracketCnt += 1 } else if (!halfBottomLeftModule && !findSamePointInBottom(exposedBottomModules, module, direction)) { // 왼쪽 아래가 없고, 하단에 같은 점이 없는 경우는 touched는 1개, exposed는 2개 - moduleRowResultData.exposedHalfBottomBracketCnt += 1 - moduleRowResultData.touchedHalfSurfaceBracketCnt += 2 + if (level % 2 === 0) { + moduleRowResultData.exposedHalfBottomBracketCnt += 1 + moduleRowResultData.touchedHalfSurfaceBracketCnt += 2 + } else { + moduleRowResultData.exposedHalfBottomBracketCnt += 2 + moduleRowResultData.touchedHalfSurfaceBracketCnt += 1 + } } 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개 - moduleRowResultData.exposedHalfBottomBracketCnt += 2 - moduleRowResultData.touchedHalfSurfaceBracketCnt += 1 + if (level % 2 === 0) { + moduleRowResultData.exposedHalfBottomBracketCnt += 1 + moduleRowResultData.touchedHalfSurfaceBracketCnt += 2 + } else { + moduleRowResultData.exposedHalfBottomBracketCnt += 2 + moduleRowResultData.touchedHalfSurfaceBracketCnt += 1 + } } } } @@ -2774,6 +2784,20 @@ 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) { From e4d6d3ab0d3010f18d8ab7ee069d034bec3b9315 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 17 Jun 2025 15:28:37 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=EC=98=A4=EB=A5=B8=EC=AA=BD=20=EC=95=84?= =?UTF-8?q?=EB=9E=98=20=EC=97=86=EB=8A=94=20=EA=B2=BD=EC=9A=B0=20=EA=B3=84?= =?UTF-8?q?=EC=82=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/module/useTrestle.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index 915da562..4e907c91 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -2740,11 +2740,11 @@ export const useTrestle = () => { } else if (!halfBottomRightModule && !findSamePointInBottom(exposedBottomModules, module, direction)) { // 오른쪽 아래가 없고, 하단에 같은 점이 없는 경우는 exposed는 1개, touched는 2개 if (level % 2 === 0) { - moduleRowResultData.exposedHalfBottomBracketCnt += 1 - moduleRowResultData.touchedHalfSurfaceBracketCnt += 2 - } else { moduleRowResultData.exposedHalfBottomBracketCnt += 2 moduleRowResultData.touchedHalfSurfaceBracketCnt += 1 + } else { + moduleRowResultData.exposedHalfBottomBracketCnt += 1 + moduleRowResultData.touchedHalfSurfaceBracketCnt += 2 } } }