moduleSetupSurfaces 별 계산 작업중

This commit is contained in:
hyojun.choi 2024-12-04 13:59:58 +09:00
parent fecae44c9a
commit dd92a47b0b

View File

@ -955,8 +955,13 @@ export function useModuleBasicSetting() {
const calculateForApi = () => { const calculateForApi = () => {
// TODO : 현재는 남쪽기준. 동,서,북 분기처리 필요 // TODO : 현재는 남쪽기준. 동,서,북 분기처리 필요
const moduleSufaces = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE)
const results = []
moduleSufaces.forEach((moduleSurface) => {
const centerPoints = [] const centerPoints = []
const modules = canvas.getObjects().filter((obj) => obj.name === 'module') const modules = moduleSurface.modules
modules.forEach((module, index) => { modules.forEach((module, index) => {
module.tempIndex = index module.tempIndex = index
@ -1061,14 +1066,17 @@ export function useModuleBasicSetting() {
exposedBottom += maxYCenterPoint.length exposedBottom += maxYCenterPoint.length
}) })
return { results.push({
exposedBottom, exposedBottom,
exposedHalfBottom, exposedHalfBottom,
exposedTop, exposedTop,
exposedHalfTop, exposedHalfTop,
touchDimension, touchDimension,
halfTouchDimension, halfTouchDimension,
} })
})
return results
} }
// polygon 내부 cell들의 centerPoint 배열을 그룹화 해서 반환 // polygon 내부 cell들의 centerPoint 배열을 그룹화 해서 반환