<?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 split command for a desk in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702647#M9215</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Patrickhall111&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I just recently downloaded this software to try and create a floor plan model of our building in hope of drumming up new business utilizing CityEngine. Im new to programming so please forgive my ignorance. I have created a floor plan and assigned a few rules to interior walls,exterior,...ect. I am running into problems when trying to create desk in each cubical. Below is a screen shot of what i have and what I am trying to do.&amp;nbsp; Below I have a static shape of what I am trying to do, and since I have over 100 cubical I would like to do this by code rather than manually do each shape, however all my attempts at splitting this shape have failed. Any help would be appreciated.[ATTACH=CONFIG]26278[/ATTACH][ATTACH=CONFIG]26279[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jul 2013 13:53:09 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2013-07-29T13:53:09Z</dc:date>
    <item>
      <title>split command for a desk</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702647#M9215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Patrickhall111&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I just recently downloaded this software to try and create a floor plan model of our building in hope of drumming up new business utilizing CityEngine. Im new to programming so please forgive my ignorance. I have created a floor plan and assigned a few rules to interior walls,exterior,...ect. I am running into problems when trying to create desk in each cubical. Below is a screen shot of what i have and what I am trying to do.&amp;nbsp; Below I have a static shape of what I am trying to do, and since I have over 100 cubical I would like to do this by code rather than manually do each shape, however all my attempts at splitting this shape have failed. Any help would be appreciated.[ATTACH=CONFIG]26278[/ATTACH][ATTACH=CONFIG]26279[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 13:53:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702647#M9215</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-07-29T13:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: split command for a desk</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702648#M9216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: obrjo181&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Prehaps you could play around with splits to generate your model, this sort of thing would work for a square shape:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;attr frontLWidth = 1
 attr leftLWidth = 1
 attr deskHeight = 1
@StartRule
Lot --&amp;gt; alignScopeToAxes(y)
&amp;nbsp; shapeL(frontLWidth,leftLWidth) {shape: Desk | remainder: NIL}
Desk--&amp;gt; extrude(deskHeight)X
X--&amp;gt; split(y){~1 : A | 0.2 : C}
A--&amp;gt; split(z){~1: B | 0.2 : C}
B--&amp;gt; split(x){0.5 : C | ~1 : NIL}
C--&amp;gt; color("#ff6666")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;hope it gives you some ideas anyway&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:32:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702648#M9216</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T05:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: split command for a desk</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702649#M9217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This helps me alot, will post pictures when done.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 16:12:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702649#M9217</guid>
      <dc:creator>PatrickHall1</dc:creator>
      <dc:date>2013-07-30T16:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: split command for a desk</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702650#M9218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I actually have one more question if its not to much trouble.&amp;nbsp; I have a normal square desk that needs the center indented for leg room. Right now I have both sides of the desk split and the top&amp;nbsp; split. My problem is this is for all sides of the desk,how separate the split to just one side of the square?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 18:19:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702650#M9218</guid>
      <dc:creator>PatrickHall1</dc:creator>
      <dc:date>2013-07-30T18:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: split command for a desk</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702651#M9219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: obrjo181&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's hard to understand visually what you're meaning, but have you tried first inserting a comp function to break everything up into individual sides before your splits? That could work. Alternatively, if you want the same shaped desk every time and already have parcel footprints for them, you could always create the desk using the Polygonal Shape Creation tool and then export this shape as an obj and import the obj into your cga code. Then all you'll need to do is tell it to inset the desk shape, and it should adjust the size depending on the shape you're applying the code to and how you've inserted it in the code. Just a thought if the splits get too complex!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 22:33:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702651#M9219</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-07-30T22:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: split command for a desk</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702652#M9220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Joanna&amp;nbsp; Thank you for helping me so far. Yes I did watch the tutorial on bringing objects in however since I am creating this as ademo for management I would like to show off the ability to change the desk size..ect below is the screen shot of the square desk and a shot of what&amp;nbsp; I am trying to achieve. [ATTACH=CONFIG]26348[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My code currently&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;attr Desk_Height =.7&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@StartRule&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;lott--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; extrude(world.y,Desk_Height)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; desk&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;desk--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; comp(f) { side :facade | top : desktop&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;desktop--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; setupProjection(0,scope.xy,'1,'1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; projectUV(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; texture("table_5_v5.jpg")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;attr legwidthR = .1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;attr legwidthL = .3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;attr tableTop =.1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;facade--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; split (x) { legwidthR: LeftLeg |~1 :emptyspace |legwidthL : RightLeg}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;emptyspace--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; split (y) {~1:NIL |tableTop : bottom}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This gives me what I want as Far as Structure but I only need this on&amp;nbsp; a selected side, not all sides&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]26349[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jul 2013 15:06:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702652#M9220</guid>
      <dc:creator>PatrickHall1</dc:creator>
      <dc:date>2013-07-31T15:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: split command for a desk</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702653#M9221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: obrjo181&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps you can break up the sides a bit further with another comp command (or just add it to the first comp command) and then for the solid sections add in a builtin:cube like so:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;facade--&amp;gt;
 comp(f){object.front : Front | object.back : Back | object.left : Left | object.right : Right}
 Front--&amp;gt; split (x) { legwidthR: LeftLeg |~1 :emptyspace |legwidthL : RightLeg}
 Back--&amp;gt;Solid
 Left--&amp;gt;Solid
 Right--&amp;gt;Solid

Solid--&amp;gt;t(0,0,-0.4)
 s('1,'1,0.4)
 i("builtin:cube:notex") &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then you can add different attrs to modify the legs individually in the inspector window. Also you can of course add the gaps on the sides too by using the split command you used on the front. hope that gives you some more ideas! &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, 12 Dec 2021 05:32:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702653#M9221</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T05:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: split command for a desk</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702654#M9222</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;maybe an important point :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;using procedural tools is great to create a wide variation of different objects which obey the same rules. but furniture in an office is always the same, only the distribution changes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so I'd never try to model the furniture itself procedurally. model every item once and just code the distribution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's very important to distinguish those parts of your project which need manual modeling and those with procedural modeling.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;does that make sense ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or do you really have unique furniture in each cubicle ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2013 11:17:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702654#M9222</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-08-02T11:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: split command for a desk</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702655#M9223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Patrickhall111&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No I understand, just for this project I am trying to show off the power of this software in hopes of getting permission to purchase the full license software. I want to thank you Joanne and Matt for your help. I am almost there and I figured I would show some pictures of where I am at with this project so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]26461[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]26462[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I still have to add people and a few textures but the first floor is pretty much done. I did have one more question. I need to do two more floor and it should not be to hard since its almost the same floor plan however how do I set the second floor above the first? and how do I go about setting a rule to turn a floor on and off?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Aug 2013 14:49:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702655#M9223</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-08-05T14:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: split command for a desk</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702656#M9224</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;Cool ! Looking good ! &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;About the second floor :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Very easy:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;on each shape of each floor, create an attribute with the actual height above floor Even though that if you import the shapes they're at 0 height.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;then, in your code, initialize the attr and use it to directly translate the shape up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
attr shapeElevation = 0 # points to object attr with e.g. 2.88 m height

@StartRule
Shape --&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; alignScopeToAxes(y)
&amp;nbsp;&amp;nbsp;&amp;nbsp; t(0, shapeElevation, 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; DoYourStuff.
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:32:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/split-command-for-a-desk/m-p/702656#M9224</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2021-12-12T05:32:56Z</dc:date>
    </item>
  </channel>
</rss>

