<?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 Roof Construction and case statement in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/roof-construction-and-case-statement/m-p/158285#M2089</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;I have to rebuild a church and set conditions for it. I'm a beginner in Cityengine. I have some questions about this, in the hope that you will answer them.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;1) how can I construct the roof like on the picture "Roof1"(red circle). I first modelled a "roofGable", but I don't know how to build the rear part diagonally.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;2) At the church tower two colons have to be constructed (see "colon1"). How can I divide the polygon so that exactly the corners of these two colons are modelled?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;3) I also have to set up some conditions. for example, should you be able to ask if the church tower is facing west or east? or if the church has colons?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;If you have any other comments or help, please feel free to &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt; Thank you in advance &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Apr 2019 10:48:49 GMT</pubDate>
    <dc:creator>BurakAydin1</dc:creator>
    <dc:date>2019-04-02T10:48:49Z</dc:date>
    <item>
      <title>Roof Construction and case statement</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/roof-construction-and-case-statement/m-p/158285#M2089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;I have to rebuild a church and set conditions for it. I'm a beginner in Cityengine. I have some questions about this, in the hope that you will answer them.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;1) how can I construct the roof like on the picture "Roof1"(red circle). I first modelled a "roofGable", but I don't know how to build the rear part diagonally.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;2) At the church tower two colons have to be constructed (see "colon1"). How can I divide the polygon so that exactly the corners of these two colons are modelled?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;3) I also have to set up some conditions. for example, should you be able to ask if the church tower is facing west or east? or if the church has colons?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;If you have any other comments or help, please feel free to &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt; Thank you in advance &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2019 10:48:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/roof-construction-and-case-statement/m-p/158285#M2089</guid>
      <dc:creator>BurakAydin1</dc:creator>
      <dc:date>2019-04-02T10:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Roof Construction and case statement</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/roof-construction-and-case-statement/m-p/158286#M2090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) It seems like you want &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;roofHip()&lt;/SPAN&gt; for&amp;nbsp;the rear part&amp;nbsp;and &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;roofGable()&lt;/SPAN&gt; for the front part.&amp;nbsp; Maybe you could make both roofs, split them in half, and use&amp;nbsp;the gable roof for the first half and the hip roof for the second half.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) You could use &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;comp(v)&lt;/SPAN&gt; to get the vertices and insert primitive cubes there.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;CreateCornersFromMass --&amp;gt;
	comp(f) { bottom: comp(v) { all: Vertex } }

Vertex --&amp;gt;
	alignScopeToAxes(y)
	primitiveCube
	s(w, h, w)
	center(xz)
	r(scopeCenter, 0, 45, 0)‍‍‍‍‍‍‍‍‍&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Or, you could just insert primitiveCubes, use &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;t()&lt;/SPAN&gt; and &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;r()&lt;/SPAN&gt; to position them and rotate them.&amp;nbsp; You could use &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;scope.sx&lt;/SPAN&gt; and &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;scope.sy&lt;/SPAN&gt; to get the current scope's size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) You can handle conditions using &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;case&lt;/SPAN&gt; statements to test attribute values.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;case orientation=="East":
	... // insert code to create church facing East
case orientation=="West":
	... // insert code to create church facing West
else:
	... // insert code to create church facing default direction‍‍‍‍‍‍&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:21:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/roof-construction-and-case-statement/m-p/158286#M2090</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2021-12-11T08:21:37Z</dc:date>
    </item>
  </channel>
</rss>

