<?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 What does brackets ([, ]) do in .cga rules? in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/what-does-brackets-do-in-cga-rules/m-p/394438#M5441</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does brackets ([, ]) do in .cga rules?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;---Sample Below---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temple --&amp;gt; &lt;BR /&gt; Podium &lt;BR /&gt; t(0,podiumH,0) &lt;BR /&gt; color(Temple_Color) &lt;BR /&gt; &lt;STRONG&gt;[ offset(- Diameter /2,inside) extrude(peristyliumHeight) Peristylium ]&lt;/STRONG&gt; &lt;BR /&gt; &lt;STRONG&gt;[ offset(-Cella_Setback,inside) Cella ]&lt;/STRONG&gt;&lt;BR /&gt; t(0,peristyliumHeight,0)&lt;BR /&gt; offset(- Diameter /2+geisonProjection+architraveD/2,inside) Roof&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Feb 2020 23:02:26 GMT</pubDate>
    <dc:creator>JYoon_GeoXC</dc:creator>
    <dc:date>2020-02-10T23:02:26Z</dc:date>
    <item>
      <title>What does brackets ([, ]) do in .cga rules?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/what-does-brackets-do-in-cga-rules/m-p/394438#M5441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does brackets ([, ]) do in .cga rules?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;---Sample Below---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temple --&amp;gt; &lt;BR /&gt; Podium &lt;BR /&gt; t(0,podiumH,0) &lt;BR /&gt; color(Temple_Color) &lt;BR /&gt; &lt;STRONG&gt;[ offset(- Diameter /2,inside) extrude(peristyliumHeight) Peristylium ]&lt;/STRONG&gt; &lt;BR /&gt; &lt;STRONG&gt;[ offset(-Cella_Setback,inside) Cella ]&lt;/STRONG&gt;&lt;BR /&gt; t(0,peristyliumHeight,0)&lt;BR /&gt; offset(- Diameter /2+geisonProjection+architraveD/2,inside) Roof&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2020 23:02:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/what-does-brackets-do-in-cga-rules/m-p/394438#M5441</guid>
      <dc:creator>JYoon_GeoXC</dc:creator>
      <dc:date>2020-02-10T23:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: What does brackets ([, ]) do in .cga rules?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/what-does-brackets-do-in-cga-rules/m-p/394439#M5442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They are the push and pop operations in the help doc:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://doc.arcgis.com/en/cityengine/latest/cga/cga-pop-push.htm" title="https://doc.arcgis.com/en/cityengine/latest/cga/cga-pop-push.htm"&gt;pop / push operation—CGA | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above code, first a translate occurs.&amp;nbsp; Then, the &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;offset&lt;/SPAN&gt; and &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;extrude&lt;/SPAN&gt; inside the first set of square brackets are performed ending in &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Peristylium&lt;/SPAN&gt; (which may end here or continue in a rule called &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Peristylium&lt;/SPAN&gt;).&amp;nbsp; For the second square brackets, the &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;offset&lt;/SPAN&gt; and &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;extrude&lt;/SPAN&gt; are not done because they are popped off the stack, and the state of the geometry starts with the result of the translate.&amp;nbsp; An &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;offset&lt;/SPAN&gt; occurs, and &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Cella&lt;/SPAN&gt; is created (which may end here or continue in a rule called &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Cella&lt;/SPAN&gt;).&amp;nbsp;&amp;nbsp;The square brackets again pop the &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;offset&lt;/SPAN&gt; off the shape stack.&amp;nbsp; This means, the translate in &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;peristyliumHeight&lt;/SPAN&gt; is done after the translate in &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;podiumHeight&lt;/SPAN&gt;.&amp;nbsp; All the operations inside the square brackets have been undone.&amp;nbsp; Then, an &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;offset&lt;/SPAN&gt; is performed, and the &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Roof&lt;/SPAN&gt; is created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2020 09:58:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/what-does-brackets-do-in-cga-rules/m-p/394439#M5442</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2020-02-11T09:58:16Z</dc:date>
    </item>
  </channel>
</rss>

