279 lines
11 KiB
JavaScript
279 lines
11 KiB
JavaScript
// 产线配置数据(替代后端 API)
|
||
// 轨道节点配置说明:
|
||
// trackNodes: 轨道节点数组,按顺序连接
|
||
// 每个节点包含:
|
||
// id: 节点唯一标识
|
||
// name: 节点名称(可选,用于显示)
|
||
// position: { x, y, z } 节点位置坐标
|
||
// width: 轨道宽度(可选,默认1.2)
|
||
// waypoints: 中间路径点数组(可选),用于定义从该节点到下一个节点的中间转弯点
|
||
// 每个waypoint包含:{ x, y, z } 位置坐标
|
||
// 示例:waypoints: [{ x: 10, y: 0.5, z: 5 }, { x: 15, y: 0.5, z: 5 }]
|
||
// 轨道会依次经过:节点 -> waypoint1 -> waypoint2 -> ... -> 下一个节点
|
||
export const productionLineConfig = {
|
||
name: "产线展示",
|
||
description: "基于节点的轨道系统,可手动调节每个节点的位置和高度。",
|
||
// 运动扁钢(压钢带)参数
|
||
steelFlow: {
|
||
count: 4, // 扁钢数量(同时在轨道上运动的条数)
|
||
length: 8, // 每条扁钢长度(沿轨道方向)
|
||
widthRatio: 0.85, // 扁钢宽度=轨道宽度*比例
|
||
thickness: 0.10, // 扁钢厚度
|
||
speed: 6 // 运动速度(数值越大越快)
|
||
},
|
||
// 轨道节点配置 - 按顺序连接,轨道会平滑通过这些节点
|
||
// 可以在节点之间添加 waypoints 来定义中间转弯点
|
||
trackNodes: [
|
||
{ id: "node_1", name: "起点", position: { x: 5.0, y: 5.0, z: 0.0 }, width: 1.8 },
|
||
{ id: "node_2", name: "1#开卷机后", position: { x: 23.0, y: 5.2, z: 0.0 }, width: 1.2 },
|
||
{ id: "node_3", name: "2#开卷机前", position: { x: 28.0, y: 5.2, z: 0.0 }, width: 1.2 },
|
||
{ id: "node_4", name: "2#开卷机后", position: { x: 42.0, y: 5.2, z: 0.0 }, width: 1.2 },
|
||
{
|
||
id: "node_5",
|
||
name: "夹送矫直前",
|
||
position: { x: 46, y: 6.0, z: 0.0 },
|
||
width: 1.2,
|
||
// 示例:从上一个节点到当前节点,经过多个转弯点
|
||
// waypoints: [
|
||
// { x: -13.0, y: 3.0, z: 0.0 }, // 第一个转弯点
|
||
// { x: -12.5, y: 4.5, z: 0.0 } // 第二个转弯点
|
||
// ]
|
||
},
|
||
{ id: "node_6", name: "夹送矫直后", position: { x:55.0, y: 5.5, z: 0.0 }, width: 1.2 },
|
||
{
|
||
id: "node_7",
|
||
name: "清洗段前",
|
||
position: { x: 64, y: 2, z: 1.6 },
|
||
width: 1.2,
|
||
// 从清洗段前到清洗段后的中间转弯点
|
||
// 轨道会依次经过:node_7 -> waypoint1 -> waypoint2 -> ... -> node_8
|
||
waypoints: [
|
||
// 在这里添加转弯点,例如:
|
||
{ x: 70, y: 2.0, z: 0.0 }, // 转弯点1
|
||
{ x: 72, y: 2.0, z: 13.0 }, // 转弯点2
|
||
// { x: 90, y: 0.6, z: 12.0 } // 转弯点3
|
||
]
|
||
},
|
||
{
|
||
id: "node_8",
|
||
name: "清洗段后",
|
||
position: { x: 92, y: 0.6, z: 13.6 },
|
||
width: 1.2,
|
||
// 示例:清洗段内部可能有多次转弯
|
||
waypoints: [
|
||
// { x: -2.0, y: 0.6, z: 5.0 }, // 转弯点1
|
||
// { x: 0.0, y: 0.6, z: 9.0 }, // 转弯点2
|
||
// { x: 1.0, y: 0.6, z: 11.5 } // 转弯点3
|
||
]
|
||
},
|
||
{ id: "node_9", name: "炉火段前", position: { x:92, y:3, z: 2.2 }, width: 1.2 },
|
||
{ id: "node_10", name: "炉火段后", position: { x: 92, y: 3, z: 2.2 }, width: 1.2,
|
||
waypoints: [
|
||
{ x: 92.0, y:5, z: 0.0 }, // 转弯点1
|
||
{ x: 92.0, y: 5, z: -10.0 }, // 转弯点2
|
||
// { x: 1.0, y: 0.6, z: 11.5 } // 转弯点3
|
||
]
|
||
},
|
||
{ id: "node_11", name: "锌锅前", position: { x: 109, y: 3, z: -10.0 }, width: 1.2 },
|
||
{ id: "node_12", name: "锌锅后", position: { x: 109, y:7, z: 4.0 }, width: 1.2,
|
||
waypoints: [
|
||
{ x: 109.0, y: 5, z: 13.0 }, // 转弯点1
|
||
]
|
||
|
||
},
|
||
{ id: "node_13", name: "光整机前",position: { x: 127.0, y: 5, z: 15.0 }, width: 1.2 },
|
||
{ id: "node_14", name: "光整机后", position: { x: 130.0, y: 5, z: 15.0 }, width: 1.2 },
|
||
{ id: "node_15", name: "拉矫机前", position: { x: 134.0, y: 7, z: 15.0 }, width: 1.2 },
|
||
{ id: "node_16", name: "拉矫机后", position: { x: 142.0, y: 7, z: 15.0 }, width: 1.2 },
|
||
{ id: "node_17", name: "剪切机前", position: { x:148.0, y: 5, z: 15.0 }, width: 1.2 },
|
||
{ id: "node_18", name: "剪切机后", position: { x: 158.0, y: 5, z: 15.0 }, width: 1.2 },
|
||
{ id: "node_19", name: "卷取机前", position: { x: 160.0, y: 7, z: 15.0 }, width: 1.2 },
|
||
{ id: "node_20", name: "终点", position: { x: 165.0, y: 7, z: 15.0 }, width: 1.2 },
|
||
{ id: "node_21", name: "结束", position: { x: 170.0, y: 2, z: 15.0 }, width: 1.2 },
|
||
],
|
||
// 设备配置(独立于轨道)
|
||
models: [
|
||
// 入口段(示例:开卷机可复用两次)
|
||
{
|
||
id: "unjcoiler_1",
|
||
name: "1#开卷机",
|
||
deviceCode: "POR1",
|
||
file: "/models/开卷机.glb",
|
||
position: { x: -24.0, y: 0.0, z: 0.0 },
|
||
io: {
|
||
entryDir: "-x",
|
||
exitDir: "+x",
|
||
leadOut:2,
|
||
leadIn: 0,
|
||
entryOffset: { y: 0 },
|
||
exitOffset: { y: 1.2 },
|
||
conveyor: { enabled: true, yOffset: 5.5, width: 1.2 }
|
||
}
|
||
},
|
||
{
|
||
id: "unjcoiler_2",
|
||
name: "2#开卷机",
|
||
deviceCode: "POR2",
|
||
file: "/models/开卷机.glb",
|
||
position: { x: -18.0, y: 0.0, z: 0.0 },
|
||
io: {
|
||
entryDir: "-x",
|
||
exitDir: "+x",
|
||
leadOut: 6,
|
||
leadIn: 1,
|
||
entryOffset: { y: 0.2 },
|
||
exitOffset: { y: 0.2 },
|
||
conveyor: { enabled: true, yOffset: 5.5, width: 1.2 }
|
||
}
|
||
},
|
||
|
||
// 夹送矫直
|
||
{
|
||
id: "pinch_leveler",
|
||
name: "夹送矫直机",
|
||
// 暂无对应的实时设备编码,可后续按需补充
|
||
file: "/models/夹送矫直机.glb",
|
||
position: { x: -12.0, y: 0.0, z: 0.0 },
|
||
rotation: { x: 0.0, y: 3.1415926, z: 0.0 },
|
||
io: {
|
||
entryDir: "-x",
|
||
exitDir: "+x",
|
||
leadOut: 0,
|
||
leadIn: 2.0,
|
||
entryOffset: { y: 0.25 },
|
||
exitOffset: { y: 0.25 },
|
||
rampLength: 0,
|
||
conveyor: { enabled: true, yOffset: 6, width: 1.2 }
|
||
}
|
||
},
|
||
|
||
// 清洗/炉火
|
||
{
|
||
id: "clean",
|
||
name: "清洗段",
|
||
deviceCode: "CLEAN",
|
||
file: "/models/清洗段.glb",
|
||
position: { x: -6, y: 0.0, z: 5.6 },
|
||
io: {
|
||
entryDir: "-x",
|
||
exitDir: "+x",
|
||
leadOut: 8.0,
|
||
leadIn: 0,
|
||
entryOffset: { y: 0, z:-4},
|
||
exitOffset: { y: 0, z: 8 },
|
||
rampLength: 4.0,
|
||
conveyor: { enabled: false, yOffset: 0.6, zOffset: 0, width: 1.2 }
|
||
}
|
||
},
|
||
{
|
||
id: "furnace",
|
||
name: "炉火段",
|
||
deviceCode: "FUR1",
|
||
file: "/models/炉火段.glb",
|
||
position: { x: 0.0, y: 0.0, z: 2.2 },
|
||
io: {
|
||
entryDir: "-x",
|
||
exitDir: "+x",
|
||
leadOut: 2.0,
|
||
leadIn: 2.0,
|
||
entryOffset: { y: 0.25 },
|
||
exitOffset: { y: 0.25 },
|
||
rampLength: 3.5,
|
||
conveyor: { enabled: true, yOffset: 0.25, width: 1.2 }
|
||
}
|
||
},
|
||
|
||
// 锌锅/后处理
|
||
{
|
||
id: "pot",
|
||
name: "锌锅",
|
||
deviceCode: "POT",
|
||
file: "/models/锌锅.glb",
|
||
position: { x: 6.0, y: 0.0, z: 0.0 },
|
||
io: {
|
||
entryDir: "-x",
|
||
exitDir: "+z",
|
||
leadOut: 1.8,
|
||
leadIn: 2.2,
|
||
entryOffset: { y: 0.35 },
|
||
exitOffset: { y: 0.35, x: -0.6 },
|
||
rampLength: 3.0,
|
||
conveyor: { enabled: true, yOffset: 0.35, width: 1.2 }
|
||
}
|
||
},
|
||
{
|
||
id: "skinpass",
|
||
name: "光整机",
|
||
deviceCode: "TM",
|
||
file: "/models/光整机.glb",
|
||
position: { x: 6.0, y: 0.0, z: 18.0 },
|
||
rotation: { x: 0.0, y: Math.PI / 2, z: 0.0 },
|
||
io: {
|
||
entryDir: "-z",
|
||
exitDir: "+z",
|
||
leadOut: 2.2,
|
||
leadIn: 2.2,
|
||
entryOffset: { y: 0.25 },
|
||
exitOffset: { y: 0.25 },
|
||
rampLength: 3.5,
|
||
conveyor: { enabled: true, yOffset: 0.25, width: 1.2 }
|
||
}
|
||
},
|
||
{
|
||
id: "bridle",
|
||
name: "拉矫机",
|
||
deviceCode: "TL",
|
||
file: "/models/拉轿机.glb",
|
||
rotation: { x: 0.0, y: Math.PI / 2, z: 0.0 },
|
||
position: { x: 8.0, y: 0.0, z: 15.0 },
|
||
io: {
|
||
entryDir: "-z",
|
||
exitDir: "+x",
|
||
leadOut: 2.0,
|
||
leadIn: 2.0,
|
||
entryOffset: { y: 0.25 },
|
||
exitOffset: { y: 0.25 },
|
||
rampLength: 3.0,
|
||
conveyor: { enabled: true, yOffset: 0.25, width: 1.2 }
|
||
}
|
||
},
|
||
|
||
// 剪切/卷取
|
||
{
|
||
id: "shear",
|
||
name: "剪切机",
|
||
deviceCode: "EXC",
|
||
file: "/models/剪切机.glb",
|
||
position: { x: 16.0, y: 0.0, z: 15.0 },
|
||
rotation: { x: 0.0, y: Math.PI / 2, z: 0.0 },
|
||
io: {
|
||
entryDir: "-x",
|
||
exitDir: "+x",
|
||
leadOut: 2.0,
|
||
leadIn: 2.0,
|
||
entryOffset: { y: 0.3 },
|
||
exitOffset: { y: 0.3 },
|
||
rampLength: 3.0,
|
||
conveyor: { enabled: true, yOffset: 0.3, width: 1.2 }
|
||
}
|
||
},
|
||
{
|
||
id: "coiler",
|
||
name: "卷取机",
|
||
deviceCode: "TR",
|
||
file: "/models/卷取机.glb",
|
||
position: { x: 24.0, y: 0.0, z: 22.0 },
|
||
rotation: { x: 0.0, y: Math.PI / 2, z: 0.0 },
|
||
io: {
|
||
entryDir: "-x",
|
||
exitDir: "+x",
|
||
leadOut: 2.0,
|
||
leadIn: 2.0,
|
||
entryOffset: { y: 0.3 },
|
||
exitOffset: { y: 0.3 },
|
||
conveyor: { enabled: true, yOffset: 0.3, width: 1.2 }
|
||
}
|
||
},
|
||
]
|
||
}
|