dev #959
@ -180,7 +180,6 @@ export default function PassivityCircuitAllocation(props) {
|
|||||||
.filter((obj) => obj.name === POLYGON_TYPE.MODULE && obj.pcs && obj.pcs.id === selectedPcs.id)
|
.filter((obj) => obj.name === POLYGON_TYPE.MODULE && obj.pcs && obj.pcs.id === selectedPcs.id)
|
||||||
// 1. 북면모듈, 북면외모듈 혼합 여부 체크
|
// 1. 북면모듈, 북면외모듈 혼합 여부 체크
|
||||||
const targetModuleInfos = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE && targetModules.includes(obj.id))
|
const targetModuleInfos = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE && targetModules.includes(obj.id))
|
||||||
debugger
|
|
||||||
const newTargetModuleGroup = [...new Set(targetModuleInfos.concat(originHaveThisPcsModules).map((obj) => obj.moduleInfo.northModuleYn))]
|
const newTargetModuleGroup = [...new Set(targetModuleInfos.concat(originHaveThisPcsModules).map((obj) => obj.moduleInfo.northModuleYn))]
|
||||||
|
|
||||||
if (newTargetModuleGroup.length > 1) {
|
if (newTargetModuleGroup.length > 1) {
|
||||||
|
|||||||
@ -2499,8 +2499,11 @@ export const useTrestle = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function isPointInRect(rect, point) {
|
// [DBL-CABLE-EPS 2026-07-10] 좌표가 소수점 2자리 반올림이라 千鳥 이웃 위치에 ±0.02 오차 누적 →
|
||||||
return point.x >= rect.x && point.x <= rect.x + rect.width && point.y >= rect.y && point.y <= rect.y + rect.height
|
// 경계에 아슬아슬 걸친 이웃이 밖으로 판정되어 회로가 분리되고 유령 케이블(dblCblTotCnt) 1 발생.
|
||||||
|
// ε=0.5 로 반올림 오차 흡수(매칭 tolerance 0.5 기준). 남/북 fallback 에도 이 헬퍼 공유 사용.
|
||||||
|
function isPointInRect(rect, point, eps = 0.5) {
|
||||||
|
return point.x >= rect.x - eps && point.x <= rect.x + rect.width + eps && point.y >= rect.y - eps && point.y <= rect.y + rect.height + eps
|
||||||
}
|
}
|
||||||
|
|
||||||
// 25-04-02 추가
|
// 25-04-02 추가
|
||||||
@ -3388,8 +3391,8 @@ export const useTrestle = () => {
|
|||||||
const modules = surface.modules
|
const modules = surface.modules
|
||||||
// 1. 현재 surface의 모듈들을 그룹화
|
// 1. 현재 surface의 모듈들을 그룹화
|
||||||
const groupInSurface = groupPoints(modules, surface)
|
const groupInSurface = groupPoints(modules, surface)
|
||||||
|
const surfaceCnt = countMatchingCircuitNumbers(groupInSurface)
|
||||||
cnt += countMatchingCircuitNumbers(groupInSurface)
|
cnt += surfaceCnt
|
||||||
})
|
})
|
||||||
|
|
||||||
const groupByCircuitAndSurfaceCnt = groupByCircuitAndSurface(modules)
|
const groupByCircuitAndSurfaceCnt = groupByCircuitAndSurface(modules)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user