|
|
|
@ -1,3 +1,91 @@ |
|
|
|
export function buildRackPerformanceData(rows, cols) { |
|
|
|
|
|
|
|
const spacingX = 60 // X轴间距
|
|
|
|
const spacingZ = 2.5 // Y轴间距
|
|
|
|
|
|
|
|
// 创建一个二维数组来存储点阵数据
|
|
|
|
const data = new Map() |
|
|
|
for (let row = 0; row < rows; row++) { |
|
|
|
for (let col = 0; col < cols; col++) { |
|
|
|
// 计算每个点的坐标
|
|
|
|
const node = { |
|
|
|
id: 'wp_' + row + '_' + col, |
|
|
|
t: 'rack', |
|
|
|
v: true, |
|
|
|
tf: [[4.196, 0.1, 5.882], [0, 270, 0], [1, 1, 1]], |
|
|
|
dt: { |
|
|
|
rackDepth: 1, |
|
|
|
rackWidth: 5.1, |
|
|
|
rackHeight: 4.2, |
|
|
|
levelCount: 3, |
|
|
|
bayCount: 4, |
|
|
|
hideFloor: false, |
|
|
|
extendColumns: true, |
|
|
|
columnSpacing: 1, |
|
|
|
bays: [ |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, |
|
|
|
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }], |
|
|
|
center: [], |
|
|
|
in: [], |
|
|
|
out: [] |
|
|
|
} |
|
|
|
} |
|
|
|
node.tf[0][0] = row * spacingX |
|
|
|
node.tf[0][1] = 0.01 |
|
|
|
node.tf[0][2] = col * spacingZ |
|
|
|
node.tf[1] = [0, 0, 0] |
|
|
|
node.tf[2] = [1, 0.4, 1] |
|
|
|
data.set(node.id, node) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
debugger |
|
|
|
return Array.from(data.values()) |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 构建点阵性能数据 |
|
|
|
* @param t |
|
|
|
|