Merge pull request 'simulation' (#48) from simulation into main

Reviewed-on: http://185.100.212.76:7776/Dwinzo-Beta/Dwinzo_dev/pulls/48
This commit is contained in:
Vishnu 2025-04-07 06:00:28 +00:00
commit 1eec500955
3 changed files with 4 additions and 0 deletions

View File

@ -354,6 +354,7 @@ const CopyPasteControls = ({ itemsGroupRef, copiedObjects, setCopiedObjects, pas
}
obj.userData.modeluuid = newFloorItem.modeluuid;
itemsGroupRef.current.add(obj);
}
});

View File

@ -336,6 +336,7 @@ const DuplicationControls = ({ itemsGroupRef, duplicatedObjects, setDuplicatedOb
}
obj.userData.modeluuid = newFloorItem.modeluuid;
itemsGroupRef.current.add(obj);
}
});

View File

@ -185,6 +185,7 @@ function RotateControls({ rotatedObjects, setRotatedObjects, movedObjects, setMo
});
let eventData: Types.ConveyorEventsSchema | Types.VehicleEventsSchema | Types.StaticMachineEventsSchema | undefined = simulationStates.find((events) => events.modeluuid === obj.userData.modeluuid);
console.log('eventData: ', eventData);
const email = localStorage.getItem("email");
const organization = email ? email.split("@")[1].split(".")[0] : "default";
@ -232,6 +233,7 @@ function RotateControls({ rotatedObjects, setRotatedObjects, movedObjects, setMo
newEventData.modelName = newFloorItem.modelname;
newEventData.position = newFloorItem.position;
newEventData.rotation = [obj.rotation.x, obj.rotation.y, obj.rotation.z];
console.log('newEventData: ', newEventData);
setSimulationStates((prevEvents: (Types.ConveyorEventsSchema | Types.VehicleEventsSchema | Types.StaticMachineEventsSchema)[]) => {
const updatedEvents = (prevEvents || []).map(event =>