<?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 Rotating depending on split index in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/rotating-depending-on-split-index/m-p/615216#M8220</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a simple script that splits a large parcel into smaller subparcels. However, I want the middle rows be rotated, for every OTHER row. I have an inkling of how to do with this split.index being odd or even and rotateScope, but not sure how to do it. Any help would be much appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Lot --&amp;gt;
 split(x)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; SubDepth:rotateScope (0,-90,0)split(x){~SubWidth:SubparcelShowFront}*|
&amp;nbsp;&amp;nbsp; ~1:split(z)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; ~SubDepth:split(x)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~SubWidth:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubparcelShowFront
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }*
&amp;nbsp;&amp;nbsp;&amp;nbsp; }*|
&amp;nbsp;&amp;nbsp; SubDepth:rotateScope (0,90,0)split(x){~SubWidth:SubparcelShowFront}*
&amp;nbsp;&amp;nbsp; }

SubparcelShowFront--&amp;gt;
 setback(2){front:yardfront|remainder:rest}

yardfront--&amp;gt;color(1,0,0)
rest--&amp;gt;color(0,1,0)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;[ATTACH=CONFIG]22127[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 24 Feb 2013 19:02:41 GMT</pubDate>
    <dc:creator>Kevin_J_Zhang</dc:creator>
    <dc:date>2013-02-24T19:02:41Z</dc:date>
    <item>
      <title>Rotating depending on split index</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rotating-depending-on-split-index/m-p/615216#M8220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a simple script that splits a large parcel into smaller subparcels. However, I want the middle rows be rotated, for every OTHER row. I have an inkling of how to do with this split.index being odd or even and rotateScope, but not sure how to do it. Any help would be much appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Lot --&amp;gt;
 split(x)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; SubDepth:rotateScope (0,-90,0)split(x){~SubWidth:SubparcelShowFront}*|
&amp;nbsp;&amp;nbsp; ~1:split(z)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; ~SubDepth:split(x)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~SubWidth:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubparcelShowFront
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }*
&amp;nbsp;&amp;nbsp;&amp;nbsp; }*|
&amp;nbsp;&amp;nbsp; SubDepth:rotateScope (0,90,0)split(x){~SubWidth:SubparcelShowFront}*
&amp;nbsp;&amp;nbsp; }

SubparcelShowFront--&amp;gt;
 setback(2){front:yardfront|remainder:rest}

yardfront--&amp;gt;color(1,0,0)
rest--&amp;gt;color(0,1,0)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;[ATTACH=CONFIG]22127[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Feb 2013 19:02:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rotating-depending-on-split-index/m-p/615216#M8220</guid>
      <dc:creator>Kevin_J_Zhang</dc:creator>
      <dc:date>2013-02-24T19:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Rotating depending on split index</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rotating-depending-on-split-index/m-p/615217#M8221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want to change the scope rotation depending on a value, I'd suggest using a function which will give you a rotation depending on the split index:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

ScopeRotation(splitIndex) =
 case splitIndex % 2 == 0:
&amp;nbsp;&amp;nbsp; 90
 else:
&amp;nbsp;&amp;nbsp; 0

// ...

rotateScope(0, ScopeRotation(split.index), 0)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Oliver&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:18:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rotating-depending-on-split-index/m-p/615217#M8221</guid>
      <dc:creator>AndreasHeldt</dc:creator>
      <dc:date>2021-12-12T02:18:18Z</dc:date>
    </item>
  </channel>
</rss>

