From 38d04918a2aaea398cabea2ca331cc72565a7531 Mon Sep 17 00:00:00 2001 From: ysCha Date: Thu, 2 Jul 2026 17:52:00 +0900 Subject: [PATCH] =?UTF-8?q?[=EB=AA=A8=EB=93=88=EB=B0=B0=EC=B9=98]=20PCS=20?= =?UTF-8?q?=EC=A7=84=EC=9E=85=20=EC=8B=9C=20=EB=9E=99=20=ED=81=AC=EA=B8=B0?= =?UTF-8?q?=EC=88=9C=EC=84=9C=20=EA=B2=80=EC=A6=9D=20=EC=98=A4=ED=8C=90=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=E2=80=94=20=EB=AA=A8=EB=93=88=20=EB=A9=B4?= =?UTF-8?q?=EC=A0=81=EC=9D=84=20=EC=8A=A4=ED=8E=99=20=EC=B9=98=EC=88=98?= =?UTF-8?q?=EB=A1=9C=20=EC=82=B0=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 작업내용 : - validateModuleSizeForRack 내 centerPoints area 산출을 캔버스 측정치(Math.round(width×height))에서 모듈 스펙(longAxis×shortAxis, moduleInfo 경유)으로 변경 - 같은 모듈이라도 캔버스 반올림으로 width 가 73/74 로 갈려 area 가 161 만큼 벌어져 랙 크기순서 위반 오판 → PCS 진입 즉시 에러 유발 - 스펙 치수는 동일 제품이면 항상 동일하므로 diff=0 → 오판 제거 - gap 계산(인접 판정)용 width/height 는 캔버스 측정치 유지 (기하 정확도 보존) --- .../modal/circuitTrestle/CircuitTrestleSetting.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx index 9f1baec0..333bc0e7 100644 --- a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx +++ b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx @@ -147,12 +147,17 @@ export default function CircuitTrestleSetting({ id }) { const centerPoints = modules.map((module) => { const { x, y } = module.getCenterPoint() 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 { x, y, width: Math.round(width), height: Math.round(height), - area: Math.round(width) * Math.round(height), + area: specLong * specShort, } })