<?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: Rules in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705760#M9249</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;Are you using and altering an existing rule set ? E.g. the Modern Street rules ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If so, maybe you simply have set the wrong Start Rule, where it is already clear that only 1 land is created.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It not and you're creating your own rules, make sure you have a repetitive split in the right direction (u or v texture coordinate direction) which creates the lanes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;split(v, unitSpace) {~laneWidth : Lane. }*&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Jan 2013 19:05:00 GMT</pubDate>
    <dc:creator>MatthiasBuehler1</dc:creator>
    <dc:date>2013-01-21T19:05:00Z</dc:date>
    <item>
      <title>Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705759#M9248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think there's a step in my rule somewhere that doesn't take into account the number of lanes I have.&amp;nbsp; On one stretch of road, it's one lane going in one direction.&amp;nbsp; But I have two lanes of cars after applying the rule.&amp;nbsp; Any idea where I can find out how to get this fixed?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2013 18:06:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705759#M9248</guid>
      <dc:creator>NicoleHanson</dc:creator>
      <dc:date>2013-01-18T18:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705760#M9249</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;Are you using and altering an existing rule set ? E.g. the Modern Street rules ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If so, maybe you simply have set the wrong Start Rule, where it is already clear that only 1 land is created.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It not and you're creating your own rules, make sure you have a repetitive split in the right direction (u or v texture coordinate direction) which creates the lanes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;split(v, unitSpace) {~laneWidth : Lane. }*&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2013 19:05:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705760#M9249</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-01-21T19:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705761#M9250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Matt!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using an existing rule: Street Construction - that came with the 3D City Creation data download.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not familar with programming, so I'm not even sure where to start with creating my own.&amp;nbsp; Is there a tutorial?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 13:04:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705761#M9250</guid>
      <dc:creator>NicoleHanson</dc:creator>
      <dc:date>2013-01-22T13:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705762#M9251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# create left and right side of the street (per default same nbr of lanes in both directions, but user can influence it via attributes)
Streetsides --&amp;gt;
 case calcNbrOfLanes &amp;lt; 1.1 : Asphalt
 case Nbr_of_left_lanes == 0 &amp;amp;&amp;amp; Nbr_of_right_lanes == 0:
&amp;nbsp; split(v,unitSpace,0){ ~calcLanesLeft&amp;nbsp;&amp;nbsp;&amp;nbsp; : Lanes(calcNbrOfLanes,connectionEnd,0) Vehicles(0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Median_width&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Median
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | ~calcLanesRight&amp;nbsp;&amp;nbsp; : scaleUV(0,-1,-1) Lanes(calcNbrOfLanes,connectionStart,2) Vehicles(2) }
 else:
&amp;nbsp; split(v,unitSpace,0){ ~Nbr_of_left_lanes : Lanes(Nbr_of_left_lanes,connectionEnd,0) Vehicles(0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Median_width&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Median
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | ~Nbr_of_right_lanes : scaleUV(0,-1,-1) Lanes(Nbr_of_right_lanes,connectionStart,2) Vehicles(2) }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's what I have for the lanes.&amp;nbsp; Would I change the Vehicles to 1 instead of 2?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:39:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705762#M9251</guid>
      <dc:creator>NicoleHanson</dc:creator>
      <dc:date>2021-12-12T05:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705763#M9252</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;Hmm. Can you also post a screenshot (please also of the navigator, so I can see the Start Rule and the attributes you have set) ? I'm not perfectly sure if I understood correctly what you meant in your first post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You have only 1 textured lane but 2 lanes of cars, it that right ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 21:25:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705763#M9252</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-01-23T21:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705764#M9253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi !&lt;BR /&gt;&lt;BR /&gt;You have only 1 textured lane but 2 lanes of cars, it that right ?&lt;BR /&gt;&lt;BR /&gt;Let me know..&lt;BR /&gt;&lt;BR /&gt;Matt&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, that's correct.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]21161[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And now I have some cars perpendicular to the road.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 13:59:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705764#M9253</guid>
      <dc:creator>NicoleHanson</dc:creator>
      <dc:date>2013-01-29T13:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705765#M9254</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;If you have edited Vehicle() in your code, cars will be rotated because that drives their orientation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know editing somebody else's code, especially if it's that complex..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems the code was not created to support all possible scenarios. For this example, I guess I cannot just quickly fix it either.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe you'd be interested in starting a new rule which does what you want ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I could help you a little with it and you'd learn a lot about CGA ! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[I usually start fresh if other people's code is too complex for me to understand.]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know ..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 15:22:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705765#M9254</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-01-31T15:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705766#M9255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you'll help me, sure!&amp;nbsp; Let's start fresh.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What do I need to do first?!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 15:37:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705766#M9255</guid>
      <dc:creator>NicoleHanson</dc:creator>
      <dc:date>2013-01-31T15:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705767#M9256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First ..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What controls do you need ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What elements you want to have on your streets ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Number of Left Lanes / Right Lanes ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Median on/off ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 12:05:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705767#M9256</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-02-01T12:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705768#M9257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;First ..&lt;BR /&gt;&lt;BR /&gt;What controls do you need ?&lt;BR /&gt;What elements you want to have on your streets ?&lt;BR /&gt;&lt;BR /&gt;Number of Left Lanes / Right Lanes ?&lt;BR /&gt;Median on/off ?&lt;BR /&gt;..&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to have both cement and asphalt.&amp;nbsp; Yellow lines and dashed white lines.&amp;nbsp; I need 3 Right Lanes, 3 Left Lanes.&amp;nbsp; But also, need it to be able to vary, as I need 2 for both, and 1.&amp;nbsp; As I have a split highway with on/off ramps, and local roads.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Median on for part of it, but also off for some of it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, to be able to populate cars, with changing frequency.&amp;nbsp; And I need to be able to animate it (so that I can show the public what will happen at a specific interchange).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I figure I can wait a little bit before adding buildings.&amp;nbsp; Right now I want to be sure that I can get a working model of the roads.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Matt!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 12:18:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705768#M9257</guid>
      <dc:creator>NicoleHanson</dc:creator>
      <dc:date>2013-02-01T12:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705769#M9258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you post a few representative images too ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll have to think about this then .. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 13:05:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705769#M9258</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-02-01T13:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705770#M9259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So here are some examples of what I'm looking to model.&amp;nbsp; [ATTACH=CONFIG]21314[/ATTACH][ATTACH=CONFIG]21315[/ATTACH][ATTACH=CONFIG]21316[/ATTACH][ATTACH=CONFIG]21317[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 13:31:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705770#M9259</guid>
      <dc:creator>NicoleHanson</dc:creator>
      <dc:date>2013-02-01T13:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705771#M9260</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;Here's a start.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Read it carefully and try to understand every little step.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if there's questions so far .. &lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 16:30:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705771#M9260</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-02-01T16:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705772#M9261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, I have a lot of questions, and I barely got to the functions line... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First off - how do I know what language (like knowing what to use: attr, case, else, etc)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I know what values to use for default, are they real world, or a scaled down?&amp;nbsp; For example the lanes on the roads are 12ft, but for the attr laneWidth it's 3.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does it matter what the attributes are called?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a book or something that would have the programming language, like the functions, or knowing how to set it up?&amp;nbsp; It looks so different than python (well the little bit I know about python).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Oh, and what does the --&amp;gt; mean?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And how do you know what values to do for the color scheme?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I do know that there's a list of attributes, which I think is the parts that can vary for the imput.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry!!&amp;nbsp; And Thanks for your help!!&amp;nbsp; I'm going to look it over again, but those are the questions I have so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nicole&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 18:02:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705772#M9261</guid>
      <dc:creator>NicoleHanson</dc:creator>
      <dc:date>2013-02-01T18:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705773#M9262</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;No problem .. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The units are in meters .. always in CGA ( CGA is CityEngine's scripting language which creates the geometries ).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The '--&amp;gt;' is the definition of a CGA 'rule'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The best intro into CGA you get with my tutorial video 6...&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://video.arcgis.com/watch/1772/tutorial-6-basic-shape-grammar"&gt;http://video.arcgis.com/watch/1772/tutorial-6-basic-shape-grammar&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It may explain most questions you have right now at the beginning, then we can cover more questions until all is clear ..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ok ? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Feb 2013 13:09:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705773#M9262</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-02-03T13:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705774#M9263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, so I think I've watched that tutorial a couple of times now...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But it still didn't really answer how to know what CGA programming codes/words to use: ie attr, case...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It also didn't talk about knowing the color codes.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, I'm not sure what the @ in front of some words means.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And on the functions, how do you even know what it is?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2013 14:20:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705774#M9263</guid>
      <dc:creator>NicoleHanson</dc:creator>
      <dc:date>2013-02-04T14:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705775#M9264</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;BR /&gt;&lt;SPAN&gt;It all just looks more complex than it actually is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let's go through it step by step in the CGA code :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;1]&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;We want to create a Street model from Street shapes. So we use a CGA rule to split that shape and colorize it until it represents a street how you need it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;2]&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;For now, we only work on Street Shapes, so we NIL Crossing and Sidewalk Shapes in the CGA code. This means no Model is generated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;3]&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;We define a series of attributes we can use :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- laneOffset : With the offset, we can shift the lanes sideways e.g. 2 left and 3 right can become 1 left and 4 right.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- laneWidth : Width of a street lane in meters (3 meters.. code in meters !! )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- medianWidth : 0.1 meter&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- oneWay : @Range ("no", "left", "right") . the attr oneWay gets specified better with that 'annitation'. This makes that you have the 3 options as a dropdown in the Inspector for this attribute.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- doMedian: true or false. This is a 'boolean' value which is either true or false. Depending on it's state, a median will be made or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;4]&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;functions : functions are there to calculate some values and return a value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;f = 5&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if f is called, the value of 5 is returned. In print ( f ), 5 will be printed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;5]&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;- rint() means round integer. this rounds up or down to the next full integer number. 5.1 will be rounded to 5.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- geometry.dv(0,unitSpace) is the width of a curved street, in meters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;6]&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;attrs with the @Hidden annotations are not displayed in the Inspector. We use them hidden as 'generic attributes' to pass values down our rules, thus they are set at the very beginning, after Street --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;7]&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;case : .. else : is the same as an 'if statement' in other programming languages. this tests if something is true or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to TEST if something is true or not, the '==' (double equal sign) is used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;E.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5 == 5 is 'true' in real world, so we try to create similar statements in CGA to split our geometries.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;8]&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;In the rule called 'DoStreet', we then distinguish the different cases and split the street geometries among the U and V dimension. Those are actually texture coordinates. This is a good trick, because Street Shapes already have proper UV coordinates. The V direction is along the WIDTH of the street.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;9]&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;So in general, with the functions, what we basically do is find out the proper number of possible lanes in each direction, with or without a median and then split the geometries accordingly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if this short input helps you a little further...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know it's complicated at the beginning. But once you know what's happening, the magic becomes easy ! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;m.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2013 14:37:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705775#M9264</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-02-11T14:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705776#M9265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes!&amp;nbsp; That helps a lot!&amp;nbsp; Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2013 14:45:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705776#M9265</guid>
      <dc:creator>NicoleHanson</dc:creator>
      <dc:date>2013-02-11T14:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705777#M9266</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;Ok, cool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So go through the code and play around with it, together with curved Street Shapes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have more questions so far, let me know ..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;m.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2013 08:59:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705777#M9266</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-02-12T08:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Rules</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705778#M9267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, got another question, but I wasn't sure if I should start another thread or not...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once I have my streets how I like them, how do I add points/polygons to show where the street furniture are?&amp;nbsp; Mainly, traffic lights and lamps?&amp;nbsp; Would I just create another shapefile in ArcMap, and then import it into CE, then apply the rules for them?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2013 13:07:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rules/m-p/705778#M9267</guid>
      <dc:creator>NicoleHanson</dc:creator>
      <dc:date>2013-02-12T13:07:39Z</dc:date>
    </item>
  </channel>
</rss>

