Itoo Software Forum

Author Topic: RailClone Remove First and Last Items From Array  (Read 35803 times)

Lucia

  • Newbie
  • *
  • Posts: 5
RailClone Remove First and Last Items From Array
« on: October 28, 2023, 12:56:15 AM »
Hi all, after 3 hours of google and gpt I have not yet resolved my issue.

I created a brick wall using RC (Y Evenly), and now from each line of bricks I want to remove the first and the last items.

Tried to do so using the Start/End connectors, no way.
Was trying to use the Arith Expression and return a value something like
Code: [Select]
return if(SegmentXRole==2, true, flase);
#Apparently the number 2 identifies the Start segment...not sure this logic makes sense btw
and then taking action on the true/false outcome perhaps, but now way.

I am sure there is a simple way to achieve it...can somebody be so kind to support please? :'( :'( :'( :'( :'( :'(

Thanks!
Lucia

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 3056
Re: RailClone Remove First and Last Items From Array
« Reply #1 on: October 30, 2023, 10:35:51 AM »
Hello Lucia.

If you remove a brick from the start and end the default will just move in to close up the gaps, and if you add a zero size brick to the Default input, the array will just stop to prevent the creation of an infinite loop.

One solution is to add Transform nodes to the Start/End. Turn On Fixed Size and set the size of your bricks but don't add any actual geometry. That should create brick sized gaps at both ends of the array.

I hope that helps.

Paul
Paul Roberts
iToo Software