<?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 world space scope split in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/world-space-scope-split/m-p/414143#M5673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a way to split using world space slicer position instead if using the local scope?&lt;/P&gt;&lt;P&gt;I want restrict the split() on X and Y along specific world space modulo ( for example: at each 3.455 on X and 3.455 on Y )&amp;nbsp;This is what I would expect as result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/498328_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however as soon as the shape isn't regular, all break loose, and the local scope kicks, and the slicing axis realigns to the local scope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/498329_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i force the local scope to be aligned with the world XYZ axis when splitting?&lt;/P&gt;&lt;P&gt;Tx&lt;/P&gt;&lt;P&gt;Dave.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;GenerateThis --&amp;gt;
&amp;nbsp; &amp;nbsp; split(x, noAdjust)
&amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Width&amp;nbsp;:
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; split(z, noAdjust)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Length:
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Test
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }*
&amp;nbsp; &amp;nbsp; }*

Test --&amp;gt;
&amp;nbsp; &amp;nbsp; s('1,0,'1)
&amp;nbsp; &amp;nbsp; center(z)
&amp;nbsp; &amp;nbsp; setColor( Color )
&amp;nbsp; &amp;nbsp; X.&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;/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>Sat, 11 Dec 2021 18:46:40 GMT</pubDate>
    <dc:creator>DaveLajoie</dc:creator>
    <dc:date>2021-12-11T18:46:40Z</dc:date>
    <item>
      <title>world space scope split</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/world-space-scope-split/m-p/414143#M5673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a way to split using world space slicer position instead if using the local scope?&lt;/P&gt;&lt;P&gt;I want restrict the split() on X and Y along specific world space modulo ( for example: at each 3.455 on X and 3.455 on Y )&amp;nbsp;This is what I would expect as result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/498328_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however as soon as the shape isn't regular, all break loose, and the local scope kicks, and the slicing axis realigns to the local scope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/498329_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i force the local scope to be aligned with the world XYZ axis when splitting?&lt;/P&gt;&lt;P&gt;Tx&lt;/P&gt;&lt;P&gt;Dave.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;GenerateThis --&amp;gt;
&amp;nbsp; &amp;nbsp; split(x, noAdjust)
&amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Width&amp;nbsp;:
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; split(z, noAdjust)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Length:
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Test
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }*
&amp;nbsp; &amp;nbsp; }*

Test --&amp;gt;
&amp;nbsp; &amp;nbsp; s('1,0,'1)
&amp;nbsp; &amp;nbsp; center(z)
&amp;nbsp; &amp;nbsp; setColor( Color )
&amp;nbsp; &amp;nbsp; X.&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;/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>Sat, 11 Dec 2021 18:46:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/world-space-scope-split/m-p/414143#M5673</guid>
      <dc:creator>DaveLajoie</dc:creator>
      <dc:date>2021-12-11T18:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: world space scope split</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/world-space-scope-split/m-p/414144#M5674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note: I did try to use&amp;nbsp;&lt;EM style="color: #4c4c4c;"&gt;&lt;SPAN class=""&gt;alignAxesSelector() and&amp;nbsp;&lt;SPAN&gt;alignScopeToGeometry() without much success.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2020 16:37:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/world-space-scope-split/m-p/414144#M5674</guid>
      <dc:creator>DaveLajoie</dc:creator>
      <dc:date>2020-06-30T16:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: world space scope split</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/world-space-scope-split/m-p/414145#M5675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Always happens... I am writing a question, and find the answer as soon as the question is posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;GenerateThis() --&amp;gt;
&amp;nbsp; &amp;nbsp; alignScopeToAxes()
&amp;nbsp; &amp;nbsp; split(x, noAdjust)
&amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BlockWidthModulo :
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; split(z, noAdjust)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BlockLengthModulo:
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alignScopeToAxes()
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Test
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }*
&amp;nbsp; &amp;nbsp; }*&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/498330_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;Now my problem is the scope is not fully aligned with world space modulo value. I am close... but still not quite there yet... &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:46:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/world-space-scope-split/m-p/414145#M5675</guid>
      <dc:creator>DaveLajoie</dc:creator>
      <dc:date>2021-12-11T18:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: world space scope split</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/world-space-scope-split/m-p/414146#M5676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;alignScopeToAxes()&lt;/SPAN&gt; will align the scope to the world coordinate system.&amp;nbsp; You can then &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;convert&lt;/SPAN&gt; the scope origin to world coordinates and figure out how much you need to split out the first piece so that the rest will align to your desired grid.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://doc.arcgis.com/en/cityengine/latest/cga/cga-convert-function.htm" title="https://doc.arcgis.com/en/cityengine/latest/cga/cga-convert-function.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;convert function—ArcGIS CityEngine Resources | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;const w=10

getScopeOriginInWorld =
   [convert(x, scope, world, pos, 0, 0, 0),
    convert(z, scope, world, pos, 0, 0, 0)]
	 
getOffset(x) = case x&amp;lt;0: abs(x) else: w-x

Lot --&amp;gt;
   alignScopeToAxes()
   Split(getScopeOriginInWorld)
	
Split(point) --&amp;gt;
   split(x, noAdjust) { getOffset(point[0]%w): SplitZ(point)
                      | { w: SplitZ(point) }* }
					   
SplitZ(point) --&amp;gt;
   split(z, noAdjust) { getOffset(point[1]%w): Cell.
                      | { w: Cell. }* }
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&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;/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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:46:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/world-space-scope-split/m-p/414146#M5676</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2021-12-11T18:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: world space scope split</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/world-space-scope-split/m-p/414147#M5677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tx you very much, this works much better!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2020 00:56:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/world-space-scope-split/m-p/414147#M5677</guid>
      <dc:creator>DaveLajoie</dc:creator>
      <dc:date>2020-07-04T00:56:56Z</dc:date>
    </item>
  </channel>
</rss>

