<?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: CGA rule for slope plane/slab. ESRI house example in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rule-for-slope-plane-slab-esri-house-example/m-p/1296700#M11042</link>
    <description>&lt;P&gt;Worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;/**
 * File:    slanted_slab.cga
 * Created: 7 Jun 2023 13:05:10 GMT
 * Author:  PFontes
 */

version "2022.1"

attr slabHeight = 0.3
attr higherSlabElevation = 1
attr slantedSlabWidth = 3

slantedSlabLenght = sqrt(pow( higherSlabElevation , 2) + pow( slantedSlabWidth , 2))
slantedSlabAngle = asin( higherSlabElevation / slantedSlabLenght )


@StartRule
Slab --&amp;gt;
	t(0, slabHeight, 0)
	split(z){~1: HigherSlab | slantedSlabWidth : SlantedSlab | ~1: LowerSlab}
	
HigherSlab --&amp;gt;
	t(0, higherSlabElevation , 0)
	extrude(-slabHeight)
	
SlantedSlab --&amp;gt;
	t(0, higherSlabElevation , 0)
	r(slantedSlabAngle, 0, 0)
	s(scope.sx,1, slantedSlabLenght )
	extrude(world.up, -slabHeight)

LowerSlab --&amp;gt;
	extrude(-slabHeight)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/145747"&gt;@CherylLau&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jun 2023 14:55:25 GMT</pubDate>
    <dc:creator>plfontes</dc:creator>
    <dc:date>2023-06-07T14:55:25Z</dc:date>
    <item>
      <title>CGA rule for slope plane/slab. ESRI house example</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rule-for-slope-plane-slab-esri-house-example/m-p/1295742#M11029</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;Does anyone has the CGA code for this model (picture attached)? This screenshoot is from a old ESRI video (&lt;A href="https://www.youtube.com/watch?v=9tYr95R6-bU&amp;amp;t=25s" target="_blank"&gt;https://www.youtube.com/watch?v=9tYr95R6-bU&amp;amp;t=25s&lt;/A&gt;).&lt;BR /&gt;I am really interested to learn how to code this sloped slab that this house has. I have no idea how it was done.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2023 11:59:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rule-for-slope-plane-slab-esri-house-example/m-p/1295742#M11029</guid>
      <dc:creator>plfontes</dc:creator>
      <dc:date>2023-06-05T11:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: CGA rule for slope plane/slab. ESRI house example</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rule-for-slope-plane-slab-esri-house-example/m-p/1296621#M11034</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/488390"&gt;@plfontes&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I hoped that I can write you back with good news but unfortunately we don't have permission to share this rule.&lt;/P&gt;&lt;P&gt;cheers&lt;BR /&gt;Jonas&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 12:16:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rule-for-slope-plane-slab-esri-house-example/m-p/1296621#M11034</guid>
      <dc:creator>JonasObertuefer</dc:creator>
      <dc:date>2023-06-07T12:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: CGA rule for slope plane/slab. ESRI house example</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rule-for-slope-plane-slab-esri-house-example/m-p/1296625#M11035</link>
      <description>&lt;P&gt;One way to get the floorplates with the slanted part in the middle would be to split the footprint into three pieces, translate the horizontal pieces as desired, then rotate and resize the middle piece recalculating the length using trigonometry according to the desired angle.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 12:26:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rule-for-slope-plane-slab-esri-house-example/m-p/1296625#M11035</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2023-06-07T12:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: CGA rule for slope plane/slab. ESRI house example</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rule-for-slope-plane-slab-esri-house-example/m-p/1296641#M11036</link>
      <description>&lt;P&gt;No worries, and I appreciate the consideration.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 13:01:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rule-for-slope-plane-slab-esri-house-example/m-p/1296641#M11036</guid>
      <dc:creator>plfontes</dc:creator>
      <dc:date>2023-06-07T13:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: CGA rule for slope plane/slab. ESRI house example</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rule-for-slope-plane-slab-esri-house-example/m-p/1296642#M11037</link>
      <description>&lt;P&gt;Challenge accepted! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;Thanks for the suggestion.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 13:02:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rule-for-slope-plane-slab-esri-house-example/m-p/1296642#M11037</guid>
      <dc:creator>plfontes</dc:creator>
      <dc:date>2023-06-07T13:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: CGA rule for slope plane/slab. ESRI house example</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rule-for-slope-plane-slab-esri-house-example/m-p/1296700#M11042</link>
      <description>&lt;P&gt;Worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;/**
 * File:    slanted_slab.cga
 * Created: 7 Jun 2023 13:05:10 GMT
 * Author:  PFontes
 */

version "2022.1"

attr slabHeight = 0.3
attr higherSlabElevation = 1
attr slantedSlabWidth = 3

slantedSlabLenght = sqrt(pow( higherSlabElevation , 2) + pow( slantedSlabWidth , 2))
slantedSlabAngle = asin( higherSlabElevation / slantedSlabLenght )


@StartRule
Slab --&amp;gt;
	t(0, slabHeight, 0)
	split(z){~1: HigherSlab | slantedSlabWidth : SlantedSlab | ~1: LowerSlab}
	
HigherSlab --&amp;gt;
	t(0, higherSlabElevation , 0)
	extrude(-slabHeight)
	
SlantedSlab --&amp;gt;
	t(0, higherSlabElevation , 0)
	r(slantedSlabAngle, 0, 0)
	s(scope.sx,1, slantedSlabLenght )
	extrude(world.up, -slabHeight)

LowerSlab --&amp;gt;
	extrude(-slabHeight)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/145747"&gt;@CherylLau&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 14:55:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rule-for-slope-plane-slab-esri-house-example/m-p/1296700#M11042</guid>
      <dc:creator>plfontes</dc:creator>
      <dc:date>2023-06-07T14:55:25Z</dc:date>
    </item>
  </channel>
</rss>

