question

Madeline Z avatar image
0 Likes"
Madeline Z asked Madeline Z commented

How do I stack parts inside of each other?

wastecontainer1001.fsmI'm creating a line where these waste containers come off of a conveyor, and then stack onto a pallet. How do I have these waste container stack inside of each other? Right now it's stacking on top of each other like a box and I want them inside of each other.

stacking.jpg

FlexSim 19.0.0
stacking itemnestingstacking boxes
stacking.jpg (237.7 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Madeline Z commented

The waste container object frame is stacked on top of each other. If you increase the size of the shape of the container, you get the desired result. You can set the shape size, rotation and location under edit button of the shape field on the general tab. You can set item size in z to be equal to the bottom thickness. You can dynamically change object and shape size that the item size seems to not be changing at all.

After you have assigned different values to shape you have access to the shape by the attributes offsetx, offsety, offsetz, offsetrx, offsetry, offsetrz, offsetsx, offsetsy and offsetsz. Offset belongs to the shape. S is size, R is rotation. Without any additional character between offset and coordinate component is just a location value.

tote-stacking.fsm


stacked-totes.jpg (161.8 KiB)
tote-stacking.fsm (36.9 KiB)
· 5
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Madeline Z avatar image Madeline Z commented ·

I'm sorry, I still don't understand how you did it, I looked at your model, why did you use 20 in your model? What does the code snippet and set size do?

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Madeline Z commented ·

Any object of FlexSim consists of a visual shape and object. The object size changes the yellow framed object and the shape in same relation. The shape has got its own size in relation to the yellow frame. You can set the size, location and rotation relative to the yellow frame. I selected the objects in the picture, the are marked by the red frames. These red frames have the same size as the yellow frame of a highlighted object.

The left stacked items are flat and the shape is 20 times of the height of the object height. On the right the shape of the tote has got the same height as the object. The object size is 20 times larger compared to the left stacked items. Following you see items in the flow item bin:

The shape offsets values can you change directly py code or in the 3D shape editor on the general tab of the properties.

If a pallet stores items next to another the dimensions of the highlighted frame is evaluated. The shape size doesn't matter

The next image contains the visual nodes that define the attributes of the item as an object (spatial) and of the shape in the item (offset).

You find in the manual in the FlexScript Class Reference the properties to change location, rotation and size of the object - yellow frame in the tree image. Unfortunately there aren't properties for the shape so far. You can only change the attributes directly in the tree - blue frame

item.attrs.offsetsy.value = item.attrs.offsetsy.value*20;// size 
item.attrs.offsetz.value = 20;// location in z of shape

The OnCreation trigger flattens the size of a tote to stack them into another. And the shape is enlarged by the same factor to compensate the small height.

0 Likes 0 ·
Madeline Z avatar image Madeline Z Joerg Vogel commented ·

When doing this with my container, I made the yellow box smaller, but it's on the top of the container not on the bottom so it doesn't stack right. What do I do to fix this?

@Jörg Vogel

stacking-2.jpg

0 Likes 0 ·
stacking-2.jpg (201.3 KiB)
Show more comments