[모듈배치] PCS 진입 시 랙 크기순서 검증 오판 수정 — 모듈 면적을 스펙 치수로 산출
작업내용 : - validateModuleSizeForRack 내 centerPoints area 산출을 캔버스 측정치(Math.round(width×height))에서 모듈 스펙(longAxis×shortAxis, moduleInfo 경유)으로 변경 - 같은 모듈이라도 캔버스 반올림으로 width 가 73/74 로 갈려 area 가 161 만큼 벌어져 랙 크기순서 위반 오판 → PCS 진입 즉시 에러 유발 - 스펙 치수는 동일 제품이면 항상 동일하므로 diff=0 → 오판 제거 - gap 계산(인접 판정)용 width/height 는 캔버스 측정치 유지 (기하 정확도 보존)
This commit is contained in:
parent
5f316195e0
commit
38d04918a2
@ -147,12 +147,17 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
const centerPoints = modules.map((module) => {
|
const centerPoints = modules.map((module) => {
|
||||||
const { x, y } = module.getCenterPoint()
|
const { x, y } = module.getCenterPoint()
|
||||||
const { width, height } = module
|
const { width, height } = module
|
||||||
|
// [RACK-AREA-SPEC 2026-07-02] 면적은 캔버스 측정치(Math.round(width/height)) 대신 모듈 스펙(longAxis×shortAxis)으로 산출.
|
||||||
|
// 측정치는 좌표 반올림으로 같은 모듈도 width 가 73/74 로 갈려 area 가 161 만큼 벌어져(=가짜 크기차) 랙 순서 위반 오판을 유발한다.
|
||||||
|
// 스펙 치수는 배치·회전과 무관해 동일 제품이면 항상 area 동일 → 반올림 잔차 제거. (gap 계산용 width/height 는 그대로 유지)
|
||||||
|
const specLong = Number(module.longAxis ?? module.moduleInfo?.longAxis ?? 0) / 10
|
||||||
|
const specShort = Number(module.shortAxis ?? module.moduleInfo?.shortAxis ?? 0) / 10
|
||||||
return {
|
return {
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
width: Math.round(width),
|
width: Math.round(width),
|
||||||
height: Math.round(height),
|
height: Math.round(height),
|
||||||
area: Math.round(width) * Math.round(height),
|
area: specLong * specShort,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user