Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: March on May 16, 2014, 07:16:10 PM

Title: Offset Patterns with Edge Conditions
Post by: March on May 16, 2014, 07:16:10 PM
I'm trying to create an offset pattern based on a set of 4 units where each additional row of units is shifted by 1 in the sequence

For Example:
Row 1 would be A A B B C C B B A A
Row 2 would be A B B C C B B A A A
Row 3 would be B B C C B B A A A A
an so on

so far I have achieved this by physically shifting the Y Spline with a transform value of (1 unit)x its Y Count

However this requires that the extents of the geometry be pushed far beyond its clipping spline which pushes edge conditions
beyond the clipping area as well.

I am trying to figure out if there is a way to knock a list item out of the sequence that is fed in however, I can't link a sequence to the
input of an arithmetic node to set up a custom expression.

If anyone has any ideas about how to achieve this effect in a controlled way I'd really appreciate any ideas.
Title: Re: Offset Patterns with Edge Conditions
Post by: Paul Roberts on May 16, 2014, 08:42:58 PM
Hi,

Thanks for the interesting question. One way to achieve this effect is to use a Selector operator instead of a sequence. That way you can control segments using expressions.

(http://lonelymonk.com/forum_images/7be71288db234046ae97b3c471680397.jpg)

In the attached example I've used two expressions. The first is a Modulo operation: mod(SegmentXCounter-1+SegmentYCounter,8). This uses SegmentXCounter to generate an output that cycles between 0 - 7.  The SegmentYCounter is also added to this number to create the offset for each row.

This is then used in a second arithmetic operator that uses the input in a couple of nested conditional statements to select the appropriate segment:

if(Input1=1 | Input1=2,1,
if(Input1=3 | Input1=4 | Input1=7 | Input1=0, 2,3)
)


Hope that helps, many thanks,

Paul

Title: Re: Offset Patterns with Edge Conditions
Post by: March on May 16, 2014, 10:02:51 PM
Thank you! That's working perfectly.

Taylor