I've (again) been breaking my limited mathskills on this one.
I am trying to accomplish this attached image.

I have 3 brick sizes, let's call them
A,
B and
C ... actual sizes being 20cm, 15cm and 10cm.
on Y row 1 I start and end with
A, alternating to
C/A inbetween, ending again in
A (with the second last being C) so
ACACACA for instance
On row 2, I start with
B, then alternating
A/C ending in
B again (with the second to last being
A) so
BACACABthen on 3 I do the first sequence again and so on and so forth.
I just can't seem to figure out how to make sure that between the fixed start and end brick, I always have
A or
ACA (or
C/CAC) so always an uneven number of bricks.
This is the current AArithmetic Expression I'm using to add adaptive width to a preset grout size (trying to use variable groutwidth to force fixed bricksizes)
return
if (
SegmentYCounter==1,
if(
mod(XSectionLength-(2*input1),(input1+input3)) == 0,
mod(XSectionLength-(2*input1),(input1+input3)) / floor((XSectionLength-2*input1)/(input1+input3)),
mod(XSectionLength-(3*input1),(input1+input3)) / floor((XSectionLength-(2*input1))/(input1+input3))
),
if(
mod(XSectionLength-(2*input2),(input1+input3)) == 0,
mod(XSectionLength-(2*input2),(input1+input3)) / floor((XSectionLength-(2*input2))/(input1+input3)),
mod(XSectionLength-(2*input2),(input1+input3)) / floor((XSectionLength-(2*input2))/(input1+input3))
)
);
Any help wouild really be appreciated. I've attached the maxfile I'm using for this setup.
*ps, is it possible to be able to use variables in expression to get better readable code eg
remainder = mod(XSectionLength-(2*input1),(input1+input3))
amount = floor((XSectionLength-2*input1)/(input1+input3))
return remainder/amount;