Merge remote-tracking branch 'origin/simulation-agv' into simulation
This commit is contained in:
@@ -22,6 +22,7 @@ const Agv = ({
|
||||
modelSpeed: number;
|
||||
bufferTime: number;
|
||||
points: { x: number; y: number; z: number }[];
|
||||
hitCount: number;
|
||||
}[]
|
||||
>([]);
|
||||
const { simulationPaths } = useSimulationPaths();
|
||||
@@ -33,6 +34,7 @@ const Agv = ({
|
||||
(val: any) => val.modelName === "agv"
|
||||
);
|
||||
|
||||
|
||||
let findMesh = agvModels.filter(
|
||||
(val: any) =>
|
||||
val.modeluuid === selectedActionSphere?.path?.modeluuid &&
|
||||
@@ -49,29 +51,30 @@ const Agv = ({
|
||||
"x" in findMesh[0].points.actions.end &&
|
||||
"y" in findMesh[0].points.actions.end
|
||||
? [
|
||||
{
|
||||
modelUuid: findMesh[0].modeluuid, // Ensure it's a number
|
||||
modelSpeed: findMesh[0].points.speed,
|
||||
bufferTime: findMesh[0].points.actions.buffer,
|
||||
points: [
|
||||
{
|
||||
x: findMesh[0].position[0],
|
||||
y: findMesh[0].position[1],
|
||||
z: findMesh[0].position[2],
|
||||
},
|
||||
{
|
||||
x: findMesh[0].points.actions.start.x,
|
||||
y: 0,
|
||||
z: findMesh[0].points.actions.start.y,
|
||||
},
|
||||
{
|
||||
x: findMesh[0].points.actions.end.x,
|
||||
y: 0,
|
||||
z: findMesh[0].points.actions.end.y,
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
{
|
||||
modelUuid: findMesh[0].modeluuid, // Ensure it's a number
|
||||
modelSpeed: findMesh[0].points.speed,
|
||||
bufferTime: findMesh[0].points.actions.buffer,
|
||||
hitCount: findMesh[0].points.actions.hitCount,
|
||||
points: [
|
||||
{
|
||||
x: findMesh[0].position[0],
|
||||
y: findMesh[0].position[1],
|
||||
z: findMesh[0].position[2],
|
||||
},
|
||||
{
|
||||
x: findMesh[0].points.actions.start.x,
|
||||
y: 0,
|
||||
z: findMesh[0].points.actions.start.y,
|
||||
},
|
||||
{
|
||||
x: findMesh[0].points.actions.end.x,
|
||||
y: 0,
|
||||
z: findMesh[0].points.actions.end.y,
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
: [];
|
||||
if (result.length > 0) {
|
||||
// setPathPoints((prev) => [...prev, ...result]);
|
||||
@@ -119,6 +122,7 @@ const Agv = ({
|
||||
key={i}
|
||||
speed={pair.modelSpeed}
|
||||
bufferTime={pair.bufferTime}
|
||||
hitCount={pair.hitCount}
|
||||
/>
|
||||
{/* {pair.points.length > 2 && (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user