Itoo Software Forum

Author Topic: (Diamond) facade pattern question  (Read 658 times)

GT4505

  • Jr. Member
  • **
  • Posts: 59
    • claar.be
(Diamond) facade pattern question
« on: May 15, 2015, 11:09:02 AM »
Hi all,

I've been experimenting with the diamond pattern facade tutorial released by itoosoft.
While recreating the rc pattern I encountered a problem.
The pattern is constructed upon a rectangle (which works very nice), but if I try to alter the dim of the rectangle the script seems to be incomplete to handle all sizes.

Have a look at the attachments, the corners are working fine, but the default pattern doesn't always connects correctly to the corners. Possibly because the pattern isn't composed with the full sequenced objects?
What would be the obvious way to fix this?

Thank you
Pieter
Pieter van Stee

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1539
Re: (Diamond) facade pattern question
« Reply #1 on: May 15, 2015, 01:53:22 PM »
Hi,

This problem occurs because the pattern can terminate on a diagonal segment angled up or a segment angled down, depending on the length of the side. The corners however expect only one type of adjacent segment. We can get around this by combining a diagonal up and diagonal down using a Compose operator. In that way the segments will always terminate with the correct piece at the corners.

To do this, just replace the sequence operator marked below with a compose operator (you may need to change the order of segments).





I hope that helps, please let me know if I can assist further.

Many thanks,

Paul
« Last Edit: May 15, 2015, 01:59:36 PM by Paul Roberts »
Paul Roberts
iToo Software

GT4505

  • Jr. Member
  • **
  • Posts: 59
    • claar.be
Re: (Diamond) facade pattern question
« Reply #2 on: May 15, 2015, 03:44:51 PM »
Hi Paul,

Ah great! Thank you for the quick reply ;)
So if I understand correct the sequence operator combines objects in a certain way, but they can still individually be used, according to the available space.
Where a compose operator is seen as one object by rc, undevidable.
If I understand it correct, the compose object is always used along the spline?

Thank you!
Pieter van Stee

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1539
Re: (Diamond) facade pattern question
« Reply #3 on: May 15, 2015, 03:51:56 PM »
Hi

That's it exactly. The sequence operator is creating a repeating pattern of individual elements but the compose operator combines them so that 2 (or more) segments will be treated as though they are 1.

Many thanks,

Paul
Paul Roberts
iToo Software