Itoo Software Forum

Author Topic: array for placing products  (Read 4457 times)

CranewoodStudios

  • Newbie
  • *
  • Posts: 3
array for placing products
« 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 Maybe this helps to understand what I want.

Thanks for any help in advance.


Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: array for placing products
« Reply #1 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/

If You have questions after that, please ask again
Rokas

CranewoodStudios

  • Newbie
  • *
  • Posts: 3
Re: array for placing products
« Reply #2 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.
« Last Edit: November 14, 2017, 08:59:46 PM by CranewoodStudios »

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: array for placing products
« Reply #3 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 guide (under chapter 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,

CranewoodStudios

  • Newbie
  • *
  • Posts: 3
Re: array for placing products
« Reply #4 on: December 14, 2017, 01:39:39 PM »
Hi Michal

Thank you very much for your solution. This was exactly what I was looking for and will make my work-flow hopefully quite a bit faster.

Kind regards