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, } }