From 476e2f7cbc34398916680f241a9621332aa88cb0 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Fri, 21 Feb 2025 16:02:29 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AA=A8=EB=93=88=20=EC=84=A4=EC=B9=98=20?= =?UTF-8?q?=EC=98=81=EC=97=AD=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/useModuleBasicSetting.js | 10 ++++++++-- src/hooks/useMode.js | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/hooks/module/useModuleBasicSetting.js b/src/hooks/module/useModuleBasicSetting.js index 0babe2df..c5ef9667 100644 --- a/src/hooks/module/useModuleBasicSetting.js +++ b/src/hooks/module/useModuleBasicSetting.js @@ -52,7 +52,7 @@ export function useModuleBasicSetting(tabNum) { const [currentObject, setCurrentObject] = useRecoilState(currentObjectState) const { setModuleStatisticsData } = useCircuitTrestle() - const { createRoofPolygon, createMarginPolygon } = useMode() + const { createRoofPolygon, createMarginPolygon, createPaddingPolygon } = useMode() useEffect(() => { // console.log('basicSetting', basicSetting) @@ -241,7 +241,13 @@ export function useModuleBasicSetting(tabNum) { } else { let offsetLength = canvasSetting.roofSizeSet === '3' ? -30 : (trestleDetail.eaveIntvl / 10) * -1 setSurfaceShapePattern(roof, roofDisplay.column, true, roof.roofMaterial) //패턴 변경 - const offsetPoints = createMarginPolygon(createRoofPolygon(roof.getCurrentPoints()), roof.lines).vertices //안쪽 offset + let offsetPoints = null + + if (['south', 'west'].includes(roof.direction)) { + offsetPoints = createPaddingPolygon(createRoofPolygon(roof.getCurrentPoints()), roof.lines).vertices //안쪽 offset + } else { + offsetPoints = createMarginPolygon(createRoofPolygon(roof.getCurrentPoints()), roof.lines).vertices //안쪽 offset + } //모듈설치영역?? 생성 const surfaceId = uuidv4() diff --git a/src/hooks/useMode.js b/src/hooks/useMode.js index 4665baf8..392711b0 100644 --- a/src/hooks/useMode.js +++ b/src/hooks/useMode.js @@ -5745,5 +5745,6 @@ export function useMode() { cutHelpLines, createRoofPolygon, createMarginPolygon, + createPaddingPolygon, } }