<?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 Selecting which edges get gables in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/selecting-which-edges-get-gables/m-p/633664#M8445</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;I'm working on a small building in CityEngine 2015.2 that (I believe) has a gabled roof. &amp;nbsp;Upon using the roofGable rule, the gables are automatically assigned. &amp;nbsp;I would like to know if there is some way I could assign which edges get gabled, as the automatic settings are assigning gables to the wrong, real-world, edges. &amp;nbsp;See images attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/348139_roofGable problem.JPG" style="width: 620px; height: 460px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my current section of code for the roofGable rule. The edge that needs to be assigned a gable is the first edge (0).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GableRoof --&amp;gt;&amp;nbsp;&lt;BR /&gt; roofGable(RoofAngle, 0, 0, true,0)&lt;BR /&gt; comp(f) {top:Texture("SlopedRoof") | side: Texture("RoofWall")}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Apr 2017 16:05:33 GMT</pubDate>
    <dc:creator>CodySlater</dc:creator>
    <dc:date>2017-04-26T16:05:33Z</dc:date>
    <item>
      <title>Selecting which edges get gables</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/selecting-which-edges-get-gables/m-p/633664#M8445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;I'm working on a small building in CityEngine 2015.2 that (I believe) has a gabled roof. &amp;nbsp;Upon using the roofGable rule, the gables are automatically assigned. &amp;nbsp;I would like to know if there is some way I could assign which edges get gabled, as the automatic settings are assigning gables to the wrong, real-world, edges. &amp;nbsp;See images attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/348139_roofGable problem.JPG" style="width: 620px; height: 460px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my current section of code for the roofGable rule. The edge that needs to be assigned a gable is the first edge (0).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GableRoof --&amp;gt;&amp;nbsp;&lt;BR /&gt; roofGable(RoofAngle, 0, 0, true,0)&lt;BR /&gt; comp(f) {top:Texture("SlopedRoof") | side: Texture("RoofWall")}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Apr 2017 16:05:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/selecting-which-edges-get-gables/m-p/633664#M8445</guid>
      <dc:creator>CodySlater</dc:creator>
      <dc:date>2017-04-26T16:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting which edges get gables</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/selecting-which-edges-get-gables/m-p/633665#M8446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Setting the index in roofGable() does not work for concave shapes. &amp;nbsp;The index parameter only works for convex shapes with a single face.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The roof ridge usually aligns with the longest side, so you could try to double the width of your&amp;nbsp;shape, create the roof, and then undo the doubling using s() commands before and after roofGable(). &amp;nbsp;This might work in some cases, but I'm not sure if it will work in all cases. &amp;nbsp;For example, if the edge 0 is in the x direction:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;s('2, '1, 0)
roofGable(roof_angle)
s('0.5, '1, '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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Note that the second s() command is not the exact reverse of the first s() because roofGable changes the scope orientation. &amp;nbsp;The parameter values might have to be switched around to account for your situation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:57:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/selecting-which-edges-get-gables/m-p/633665#M8446</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2021-12-12T02:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting which edges get gables</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/selecting-which-edges-get-gables/m-p/633666#M8447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cheryl, thanks so much! This solution worked great after a slight amount of tweaking.&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/349559_pastedImage_1.jpg" style="width: 620px; height: 393px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is how it ended up, and below is the code that I ended up using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GableRoof --&amp;gt; #Sets the angle of the roof and differentiates the slants and sides of the roof, textures with an image&lt;BR /&gt; s('1, '2, 0)&lt;BR /&gt; roofGable(RoofAngle)&lt;BR /&gt; s('1, '0.5, '0.5)&lt;BR /&gt; t(0,0,'1)&lt;BR /&gt; comp(f) {top:Texture("SlopedRoof") | side: Texture("RoofWall")}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, thanks a lot, this has had me stumped for a couple days, and now I should be able to apply it to a couple more buildings.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2017 14:24:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/selecting-which-edges-get-gables/m-p/633666#M8447</guid>
      <dc:creator>CodySlater</dc:creator>
      <dc:date>2017-05-04T14:24:30Z</dc:date>
    </item>
  </channel>
</rss>

