[1099] : 【HANASYS DESIGN】強化施工・多雪施工で千鳥配置できるモジュールの積算がおかしい。
지지금구 설치 이상 수정
This commit is contained in:
parent
a0cca5fbca
commit
6d78a45ebf
@ -53,6 +53,7 @@ export const useTrestle = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
surfaces.forEach((surface) => {
|
surfaces.forEach((surface) => {
|
||||||
|
getSameLineModules(surface)
|
||||||
const parent = canvas.getObjects().find((obj) => obj.id === surface.parentId)
|
const parent = canvas.getObjects().find((obj) => obj.id === surface.parentId)
|
||||||
const roofMaterialIndex = parent.roofMaterial.index
|
const roofMaterialIndex = parent.roofMaterial.index
|
||||||
if (+roofSizeSet === 3) {
|
if (+roofSizeSet === 3) {
|
||||||
@ -1573,7 +1574,9 @@ export const useTrestle = () => {
|
|||||||
drawBracketWithOutRack(module, rackIntvlPct, module.leftRows + 1, 'L', surface.direction, moduleIntvlHor, moduleIntvlVer)
|
drawBracketWithOutRack(module, rackIntvlPct, module.leftRows + 1, 'L', surface.direction, moduleIntvlHor, moduleIntvlVer)
|
||||||
if (rackQty === 3 && !findSamePointInBottom(exposedBottomModules, module)) {
|
if (rackQty === 3 && !findSamePointInBottom(exposedBottomModules, module)) {
|
||||||
// 해당 모듈과 같은 위치 맨 아래에 모듈이 없는 경우 하나 더 설치 필요
|
// 해당 모듈과 같은 위치 맨 아래에 모듈이 없는 경우 하나 더 설치 필요
|
||||||
drawBracketWithOutRack(module, rackIntvlPct / 3, module.leftRows + 1, 'L', surface.direction, moduleIntvlHor, moduleIntvlVer)
|
if (module.level % 2 !== 0) {
|
||||||
|
drawBracketWithOutRack(module, rackIntvlPct / 3, module.leftRows + 1, 'L', surface.direction, moduleIntvlHor, moduleIntvlVer)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (rackQty === 4) {
|
if (rackQty === 4) {
|
||||||
drawBracketWithOutRack(module, rackIntvlPct / 3, module.leftRows + 1, 'L', surface.direction, moduleIntvlHor, moduleIntvlVer)
|
drawBracketWithOutRack(module, rackIntvlPct / 3, module.leftRows + 1, 'L', surface.direction, moduleIntvlHor, moduleIntvlVer)
|
||||||
@ -1581,10 +1584,13 @@ export const useTrestle = () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
rightExposedHalfBottomPoints.forEach((module) => {
|
rightExposedHalfBottomPoints.forEach((module) => {
|
||||||
|
console.log('rightmodule.level', module.level)
|
||||||
drawBracketWithOutRack(module, rackIntvlPct, module.rightRows + 1, 'R', surface.direction, moduleIntvlHor, moduleIntvlVer)
|
drawBracketWithOutRack(module, rackIntvlPct, module.rightRows + 1, 'R', surface.direction, moduleIntvlHor, moduleIntvlVer)
|
||||||
if (rackQty === 3 && !findSamePointInBottom(exposedBottomModules, module, direction)) {
|
if (rackQty === 3 && !findSamePointInBottom(exposedBottomModules, module, direction)) {
|
||||||
// 해당 모듈과 같은 위치 맨 아래에 모듈이 없는 경우 하나 더 설치 필요
|
// 해당 모듈과 같은 위치 맨 아래에 모듈이 없는 경우 하나 더 설치 필요
|
||||||
drawBracketWithOutRack(module, rackIntvlPct / 3, module.rightRows + 1, 'R', surface.direction, moduleIntvlHor, moduleIntvlVer)
|
if (module.level % 2 === 0) {
|
||||||
|
drawBracketWithOutRack(module, rackIntvlPct / 3, module.rightRows + 1, 'R', surface.direction, moduleIntvlHor, moduleIntvlVer)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (rackQty === 4) {
|
if (rackQty === 4) {
|
||||||
drawBracketWithOutRack(module, rackIntvlPct / 3, module.rightRows + 1, 'R', surface.direction, moduleIntvlHor, moduleIntvlVer)
|
drawBracketWithOutRack(module, rackIntvlPct / 3, module.rightRows + 1, 'R', surface.direction, moduleIntvlHor, moduleIntvlVer)
|
||||||
@ -2545,23 +2551,11 @@ export const useTrestle = () => {
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
// 가장 왼쪽에 있는 모듈을 기준으로 같은 단에 있는 모듈들 파라미터 생성
|
const getSameLineModules = (surface) => {
|
||||||
const getMostLeftModules = (surface, exposedBottomModules) => {
|
|
||||||
const { direction, modules, isChidory } = surface
|
const { direction, modules, isChidory } = surface
|
||||||
const parent = canvas.getObjects().find((obj) => obj.id === surface.parentId)
|
|
||||||
const roofMaterialIndex = parent.roofMaterial.index
|
|
||||||
const construction = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex).construction
|
|
||||||
let isEaveBar = construction.setupCover
|
|
||||||
let isSnowGuard = construction.setupSnowCover
|
|
||||||
let { rackYn, cvrPlvrYn, moduleIntvlHor, moduleIntvlVer, rackQty, lessSupFitQty } = surface.trestleDetail
|
|
||||||
|
|
||||||
if (rackYn === 'N') {
|
|
||||||
rackQty = lessSupFitQty
|
|
||||||
}
|
|
||||||
|
|
||||||
// 같은 단에 있는 모듈들의 리스트
|
// 같은 단에 있는 모듈들의 리스트
|
||||||
let sameLineModuleList = []
|
let sameLineModuleList = []
|
||||||
let result = []
|
|
||||||
|
|
||||||
if (direction === 'south') {
|
if (direction === 'south') {
|
||||||
// 모듈의 top으로 groupBy
|
// 모듈의 top으로 groupBy
|
||||||
@ -2612,6 +2606,30 @@ export const useTrestle = () => {
|
|||||||
sameLineModuleList = Object.values(groupedByLeft).sort((a, b) => a[0].left - b[0].left)
|
sameLineModuleList = Object.values(groupedByLeft).sort((a, b) => a[0].left - b[0].left)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sameLineModuleList.forEach((modules, index) => {
|
||||||
|
modules.forEach((module) => {
|
||||||
|
module.set({ level: index + 1 }) // 각 모듈에 level 속성 추가
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
return sameLineModuleList
|
||||||
|
}
|
||||||
|
|
||||||
|
// 가장 왼쪽에 있는 모듈을 기준으로 같은 단에 있는 모듈들 파라미터 생성
|
||||||
|
const getMostLeftModules = (surface, exposedBottomModules) => {
|
||||||
|
const { direction, modules, isChidory } = surface
|
||||||
|
const parent = canvas.getObjects().find((obj) => obj.id === surface.parentId)
|
||||||
|
const roofMaterialIndex = parent.roofMaterial.index
|
||||||
|
const construction = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex).construction
|
||||||
|
let isEaveBar = construction.setupCover
|
||||||
|
let isSnowGuard = construction.setupSnowCover
|
||||||
|
let { rackYn, cvrPlvrYn, moduleIntvlHor, moduleIntvlVer, rackQty, lessSupFitQty } = surface.trestleDetail
|
||||||
|
let result = []
|
||||||
|
if (rackYn === 'N') {
|
||||||
|
rackQty = lessSupFitQty
|
||||||
|
}
|
||||||
|
const sameLineModuleList = getSameLineModules(surface, exposedBottomModules)
|
||||||
|
|
||||||
sameLineModuleList.forEach((modules, index) => {
|
sameLineModuleList.forEach((modules, index) => {
|
||||||
const moduleRowResultData = {
|
const moduleRowResultData = {
|
||||||
seq: index,
|
seq: index,
|
||||||
@ -2659,6 +2677,7 @@ export const useTrestle = () => {
|
|||||||
bottomLeftModule,
|
bottomLeftModule,
|
||||||
bottomRightModule,
|
bottomRightModule,
|
||||||
} = findSideModule(module, surface)
|
} = findSideModule(module, surface)
|
||||||
|
|
||||||
if (bottomModule) {
|
if (bottomModule) {
|
||||||
moduleRowResultData.touchedSurfaceCnt++
|
moduleRowResultData.touchedSurfaceCnt++
|
||||||
if (rackYn === 'N') {
|
if (rackYn === 'N') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user