Rotate the car

Rotate the car

nachoheredia5
Participant Participant
187 Views
4 Replies
Message 1 of 5

Rotate the car

nachoheredia5
Participant
Participant
0 Likes
Accepted solutions (1)
188 Views
4 Replies
Replies (4)
Message 2 of 5

moehlmann_fe
Advocate
Advocate
Accepted solution

Either you change the shape factors in the flow item bin, so that the 3d shape is rotated 'correctly' within the bounding box (forward: positive along the x-axis, up: positive along the z-axis).

capture1.png

Or you change the rotation within the model in the properties of the entry transfer and the On Entry trigger of the combiner.

capture2.png

capture3.png

In the On Entry trigger you would also need to customize the code so that only the items entering through port 2 are rotated.

0 Likes
Message 3 of 5

nachoheredia5
Participant
Participant

Hello Felix, thanks for your answer and idea. Could you send me the FlexSim file with this changes? Just to see the code.

0 Likes
Message 4 of 5

moehlmann_fe
Advocate
Advocate

Set up the "Set Rotation" option as you would normally, then simply enclose everything between "Pickoption Start" and "Pickoption End" in an if-condition that checks if the item entered through port 2.

{ // ************* PickOption Start ************* //
if(port == 2) {     /***popup:SetSizeLocRot*/     /***tag:name*//**Set Rotation*/     Object involved = /** \nObject: *//***tag:object*//**/item/**/;     double x = /** \nx: *//***tag:nx*//**/-90/**/;     double y = /** \ny: *//***tag:ny*//**/0/**/;     double z = /** \nz: *//***tag:nz*//**/180/**/;     /** \nCommand: *//***tag:command*//**/setrot/**list:setloc~setrot~setsize*/(involved, x, y, z); } } // ******* PickOption End ******* //
0 Likes
Message 5 of 5

nachoheredia5
Participant
Participant
Thanks! It is working!
0 Likes