<?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: Different setbacks in the same building in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/different-setbacks-in-the-same-building/m-p/116987#M1623</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, here's 20 minutes of CGA coding .. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#####################################################################################
# ATTRS
#####################################################################################


@Group("BUILDING",0)&amp;nbsp; @Order(0)
attr nFloors&amp;nbsp;&amp;nbsp;&amp;nbsp; = 15
@Group("BUILDING")&amp;nbsp;&amp;nbsp; @Order(1)
attr groundFloorHeight&amp;nbsp; = 5.5
@Group("BUILDING")&amp;nbsp;&amp;nbsp; @Order(2)
attr upperFloorHeight&amp;nbsp; = 3.5
@Group("BUILDING")&amp;nbsp;&amp;nbsp; @Order(3)
attr volumeChange_1_floor = 2
@Group("BUILDING")&amp;nbsp;&amp;nbsp; @Order(4)
attr volumeChange_2_floor = 5


@Group("1",1)&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(0)&amp;nbsp;&amp;nbsp; @Range(0,5)&amp;nbsp; 
attr frontSetback_1&amp;nbsp;&amp;nbsp; = 0
@Group("1")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(1)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr backSetback_1&amp;nbsp;&amp;nbsp; = 5.9
@Group("1")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(2)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr sideSetback_1&amp;nbsp;&amp;nbsp; = 0

@Group("2",2)&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(0)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr frontSetback_2&amp;nbsp;&amp;nbsp; = 0
@Group("2")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(1)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr backSetback_2&amp;nbsp;&amp;nbsp; = 0
@Group("2")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(2)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr sideSetback_2&amp;nbsp;&amp;nbsp; = 0

@Group("3",3)&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(0)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr frontSetback_3&amp;nbsp;&amp;nbsp; = 5
@Group("3")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(1)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr backSetback_3&amp;nbsp;&amp;nbsp; = 0
@Group("3")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(2)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr sideSetback_3&amp;nbsp;&amp;nbsp; = 2


#####################################################################################
# FUNCTIONS
#####################################################################################


floorHeightFunction(floorID) =
 case floorID == 1:
&amp;nbsp; groundFloorHeight
 else :
&amp;nbsp; upperFloorHeight

setbackID (n) =
 case n &amp;gt;= rint(volumeChange_2_floor) :
&amp;nbsp; 3
 case n &amp;gt;= rint(volumeChange_1_floor) :
&amp;nbsp; 2
 else :
&amp;nbsp; 1
&amp;nbsp; 
setbackDimension (n, side) =
 case setbackID(n) == 3:
&amp;nbsp; case side == "front"&amp;nbsp; : frontSetback_3
&amp;nbsp; case side == "back"&amp;nbsp; : backSetback_3
&amp;nbsp; else&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : sideSetback_3
 case setbackID(n) == 2:
&amp;nbsp; case side == "front"&amp;nbsp; : frontSetback_2
&amp;nbsp; case side == "back"&amp;nbsp; : backSetback_2
&amp;nbsp; else&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : sideSetback_2
 else :
&amp;nbsp; case side == "front"&amp;nbsp; : frontSetback_1
&amp;nbsp; case side == "back"&amp;nbsp; : backSetback_1
&amp;nbsp; else&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : sideSetback_1


#####################################################################################
# START
#####################################################################################


@StartRule
Shape --&amp;gt;
 BuildingRecursion(1) # start with floor '1' = ground floor


BuildingRecursion(n) --&amp;gt;
 case n &amp;gt; rint(nFloors) :
&amp;nbsp; NIL
 else :
&amp;nbsp; extrude(world.y, floorHeightFunction(n))
&amp;nbsp; FloorVolume(n)

&amp;nbsp; # back to recursion
&amp;nbsp; comp(f) {top : BuildingRecursion(n + 1)}


FloorVolume(n) --&amp;gt;
 comp(f) {bottom:
&amp;nbsp; reverseNormals
&amp;nbsp; alignScopeToAxes(y)
&amp;nbsp; shapeO(setbackDimension (n, "front"),setbackDimension (n, "side"),setbackDimension (n, "back"),setbackDimension (n, "side")) { shape : NIL | remainder :
&amp;nbsp;&amp;nbsp; extrude(world.y, floorHeightFunction(n))
&amp;nbsp;&amp;nbsp; Floor.
&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 06:52:32 GMT</pubDate>
    <dc:creator>MatthiasBuehler1</dc:creator>
    <dc:date>2021-12-11T06:52:32Z</dc:date>
    <item>
      <title>Different setbacks in the same building</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/different-setbacks-in-the-same-building/m-p/116985#M1621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Sheyla_Santana&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello, Everyone.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm here again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to construct a build like the one in the picture. They need to start within a front setback of 5.9 meters and extrude three meters. Then i need to extrude the next two floors (10 meters) without any setbacks. The remaining floors need back setback of 5 meters, a front setback of 2 meters and side setback of 1.5 meters. This information of how many floors that those buildings are going to have is defined using the my basic rule that considers setbacks, occupancy rate and coefficient of utilization. I have to put some discont areas (about 27-31% of the total area of the building). At this moment, i don't know how to do it...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Represent the building diagram as a rectangular footprint shape.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Extrude the shape upwards to max height.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Split in Y direction (vertically, as CE uses Y-up, not Z-up) into:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) bottom level with 5.9m setback.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2) middle levels that use entire footpring&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3) top level with 5m stepback.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Split bottom level in either X or Z direction, with absolute split amount of 5.9 sent to NIL, and remainder of split is the ground floor mass/volume.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But it's still not working... Any ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sheyla&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 11:46:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/different-setbacks-in-the-same-building/m-p/116985#M1621</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-09-30T11:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: Different setbacks in the same building</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/different-setbacks-in-the-same-building/m-p/116986#M1622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: matthiasbuehler&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sorry, I've been too busy to post something yet. I'm working on something for you right now. &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, 30 Sep 2013 15:12:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/different-setbacks-in-the-same-building/m-p/116986#M1622</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-09-30T15:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: Different setbacks in the same building</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/different-setbacks-in-the-same-building/m-p/116987#M1623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, here's 20 minutes of CGA coding .. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#####################################################################################
# ATTRS
#####################################################################################


@Group("BUILDING",0)&amp;nbsp; @Order(0)
attr nFloors&amp;nbsp;&amp;nbsp;&amp;nbsp; = 15
@Group("BUILDING")&amp;nbsp;&amp;nbsp; @Order(1)
attr groundFloorHeight&amp;nbsp; = 5.5
@Group("BUILDING")&amp;nbsp;&amp;nbsp; @Order(2)
attr upperFloorHeight&amp;nbsp; = 3.5
@Group("BUILDING")&amp;nbsp;&amp;nbsp; @Order(3)
attr volumeChange_1_floor = 2
@Group("BUILDING")&amp;nbsp;&amp;nbsp; @Order(4)
attr volumeChange_2_floor = 5


@Group("1",1)&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(0)&amp;nbsp;&amp;nbsp; @Range(0,5)&amp;nbsp; 
attr frontSetback_1&amp;nbsp;&amp;nbsp; = 0
@Group("1")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(1)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr backSetback_1&amp;nbsp;&amp;nbsp; = 5.9
@Group("1")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(2)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr sideSetback_1&amp;nbsp;&amp;nbsp; = 0

@Group("2",2)&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(0)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr frontSetback_2&amp;nbsp;&amp;nbsp; = 0
@Group("2")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(1)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr backSetback_2&amp;nbsp;&amp;nbsp; = 0
@Group("2")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(2)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr sideSetback_2&amp;nbsp;&amp;nbsp; = 0

@Group("3",3)&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(0)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr frontSetback_3&amp;nbsp;&amp;nbsp; = 5
@Group("3")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(1)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr backSetback_3&amp;nbsp;&amp;nbsp; = 0
@Group("3")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Order(2)&amp;nbsp;&amp;nbsp; @Range(0,5) 
attr sideSetback_3&amp;nbsp;&amp;nbsp; = 2


#####################################################################################
# FUNCTIONS
#####################################################################################


floorHeightFunction(floorID) =
 case floorID == 1:
&amp;nbsp; groundFloorHeight
 else :
&amp;nbsp; upperFloorHeight

setbackID (n) =
 case n &amp;gt;= rint(volumeChange_2_floor) :
&amp;nbsp; 3
 case n &amp;gt;= rint(volumeChange_1_floor) :
&amp;nbsp; 2
 else :
&amp;nbsp; 1
&amp;nbsp; 
setbackDimension (n, side) =
 case setbackID(n) == 3:
&amp;nbsp; case side == "front"&amp;nbsp; : frontSetback_3
&amp;nbsp; case side == "back"&amp;nbsp; : backSetback_3
&amp;nbsp; else&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : sideSetback_3
 case setbackID(n) == 2:
&amp;nbsp; case side == "front"&amp;nbsp; : frontSetback_2
&amp;nbsp; case side == "back"&amp;nbsp; : backSetback_2
&amp;nbsp; else&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : sideSetback_2
 else :
&amp;nbsp; case side == "front"&amp;nbsp; : frontSetback_1
&amp;nbsp; case side == "back"&amp;nbsp; : backSetback_1
&amp;nbsp; else&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : sideSetback_1


#####################################################################################
# START
#####################################################################################


@StartRule
Shape --&amp;gt;
 BuildingRecursion(1) # start with floor '1' = ground floor


BuildingRecursion(n) --&amp;gt;
 case n &amp;gt; rint(nFloors) :
&amp;nbsp; NIL
 else :
&amp;nbsp; extrude(world.y, floorHeightFunction(n))
&amp;nbsp; FloorVolume(n)

&amp;nbsp; # back to recursion
&amp;nbsp; comp(f) {top : BuildingRecursion(n + 1)}


FloorVolume(n) --&amp;gt;
 comp(f) {bottom:
&amp;nbsp; reverseNormals
&amp;nbsp; alignScopeToAxes(y)
&amp;nbsp; shapeO(setbackDimension (n, "front"),setbackDimension (n, "side"),setbackDimension (n, "back"),setbackDimension (n, "side")) { shape : NIL | remainder :
&amp;nbsp;&amp;nbsp; extrude(world.y, floorHeightFunction(n))
&amp;nbsp;&amp;nbsp; Floor.
&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:52:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/different-setbacks-in-the-same-building/m-p/116987#M1623</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2021-12-11T06:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Different setbacks in the same building</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/different-setbacks-in-the-same-building/m-p/116988#M1624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's the CGA file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The forum usually fucks up the code layouting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers !&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, 30 Sep 2013 15:36:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/different-setbacks-in-the-same-building/m-p/116988#M1624</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-09-30T15:36:11Z</dc:date>
    </item>
  </channel>
</rss>

