Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: CranewoodStudios on November 14, 2017, 12:10:53 PM

Title: array for placing products
Post by: CranewoodStudios on November 14, 2017, 12:10:53 PM
Hi

I am new to Railclone and my question is most probably really easy to solve, but I haven't found the solution yet.

I tried to build an RailClone object, which allows me to place products on a shelf. As a spline I use a rectangle which marks the area, where the products can be placed. Now the products should be placed evenly along the X and Y axis. The amount of products should be depending on the area which is available. So if I make the rectangle wider there should be more products. The Products can't be stretched or sliced, so the spacing in between each product should adapt. These are more or less my requirements.

So far I managed to have it working more or less on the X axis, when I only plug the segment into X evenly. But on the Y axis it doesn't have adaptive spacing between the segments. Also the the segments aren't starting right at the side of the rectangle. I uploaded a video of the problem to vimeo https://vimeo.com/242726396 (https://vimeo.com/242726396) Maybe this helps to understand what I want.

Thanks for any help in advance.

Title: Re: array for placing products
Post by: Rokas on November 14, 2017, 12:33:20 PM
I would suggest checking this thread with lots of info
https://forum.itoosoft.com/railclone-pro-(*)/products-on-a-shelf/ (https://forum.itoosoft.com/railclone-pro-(*)/products-on-a-shelf/)

If You have questions after that, please ask again
Title: Re: array for placing products
Post by: CranewoodStudios on November 14, 2017, 03:31:19 PM
Thank you for your fast answer.

I already know the thread you linked, since I bought the software after I read that thread. But my question here is not just "how can I place products on a shelf". (and no doubt there are nice solutions in that thread)
 
My question is how I can distribute my products, with a rectangle shape as a spline and adaptive spacing. I tried multiple different setups, but there are product overlapping each other or they go only out to the border of the spline if they can be sliced or instead of the padding between them the product itself adapts to the available space.

So my question is still the same as written above. How can this be done. As an experienced member as you are, I am sure you can point me in the right direction.
Title: Re: array for placing products
Post by: Michal Karmazín on November 22, 2017, 05:54:37 PM
Hi,

Well, in case of having a single product - or several with the same dimensions, it's possible to calculate the correct spacing based on the spline size and used Segment size, but let me mention that having different sized products would suppose a problem - in our Getting Started with RailClone (http://docs.itoosoft.com/display/RAILCLONE/Getting+Started+with+RailClone) guide (under chapter 9 - Create your first 2d array (http://docs.itoosoft.com/display/RAILCLONE/9+-+Create+your+first+2d+array)) you can find following rule for building 2D arrays: "Rule 2: To avoid gaps, Segments should be the same Y length: Because the A2S array is a stack of L1S generators, if you use Segments with unequal sizes on the Y axis in a row, the overall height of that row is determined by the tallest segment. The row directly above will be positioned after the tallest segment and gaps will appear."

The X Size can be calculated by the follwing expression, where the Input1 is the exported X Size of used Segmtent:

return (mod(XSectionLength, Input1)/(floor(XSectionLength/Input1)-1));

in a similar way in case of the Y Size:

​​​​​return (mod(YSectionLength, Input1)/(floor(YSectionLength/Input1)-1));

Attaching a sample scene with the possible approach. Hope you'll find it useful.

Best regards,