<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how can i Repeating the pattern for the rest respectively in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/how-can-i-repeating-the-pattern-for-the-rest/m-p/677152#M8924</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This will fill in the colors in the order red, yellow, magenta until no tiles are left.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Lot --&amp;gt;
	split(z) { ~3: Tile(split.index) }*

Tile(ind) --&amp;gt;
	case ind%3==0:
		color(1,0,0)
	case ind%3==1:
		color(1,1,0)
	else:
		color(1,0,1)
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to make sure that the colors always appear in a group of three (i.e. you always end on magenta), you can use nested splits.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Lot2 --&amp;gt;
	split(x) { ~9: ThreeTiles }*
	
ThreeTiles --&amp;gt;
	split(x) { ~1: color(1,0,0) Red.
			 | ~1: color(1,1,0) Yellow.
			 | ~1: color(1,0,1) Magenta. }
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 04:32:15 GMT</pubDate>
    <dc:creator>CherylLau</dc:creator>
    <dc:date>2021-12-12T04:32:15Z</dc:date>
    <item>
      <title>how can i Repeating the pattern for the rest respectively</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/how-can-i-repeating-the-pattern-for-the-rest/m-p/677151#M8923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi everyone .I want to repeat the pattern of the colored part of this design respectively for the rest . how this can be done .very thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lot --&amp;gt;&lt;BR /&gt;split(z) { ~3 : Tile(split.index) }*&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Tile(n) --&amp;gt;&lt;BR /&gt;case n ==0 : &lt;BR /&gt;color(1,0,0)&lt;/P&gt;&lt;P&gt;case n ==1 : &lt;BR /&gt;color(1,1,0)&lt;/P&gt;&lt;P&gt;case n ==2 : &lt;BR /&gt;color(1,0,1)&lt;/P&gt;&lt;P&gt;else :&lt;BR /&gt;Remainder&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2019 08:04:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/how-can-i-repeating-the-pattern-for-the-rest/m-p/677151#M8923</guid>
      <dc:creator>maziyaryousefi</dc:creator>
      <dc:date>2019-10-11T08:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: how can i Repeating the pattern for the rest respectively</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/how-can-i-repeating-the-pattern-for-the-rest/m-p/677152#M8924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This will fill in the colors in the order red, yellow, magenta until no tiles are left.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Lot --&amp;gt;
	split(z) { ~3: Tile(split.index) }*

Tile(ind) --&amp;gt;
	case ind%3==0:
		color(1,0,0)
	case ind%3==1:
		color(1,1,0)
	else:
		color(1,0,1)
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to make sure that the colors always appear in a group of three (i.e. you always end on magenta), you can use nested splits.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Lot2 --&amp;gt;
	split(x) { ~9: ThreeTiles }*
	
ThreeTiles --&amp;gt;
	split(x) { ~1: color(1,0,0) Red.
			 | ~1: color(1,1,0) Yellow.
			 | ~1: color(1,0,1) Magenta. }
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:32:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/how-can-i-repeating-the-pattern-for-the-rest/m-p/677152#M8924</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2021-12-12T04:32:15Z</dc:date>
    </item>
  </channel>
</rss>

