<?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: Using Point Shapes for asset placement in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/using-point-shapes-for-asset-placement/m-p/716925#M9391</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help. &lt;EM&gt;innerRect&lt;/EM&gt; bases size on a lot shape, though. I am trying to place assets with point data because I do not have footprint or lot shapes to use for procedural generation.&lt;BR /&gt;Using this script I'm no longer receiving any errors, but when I Generate, nothing is placed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 May 2015 19:58:28 GMT</pubDate>
    <dc:creator>DerekSpencer</dc:creator>
    <dc:date>2015-05-04T19:58:28Z</dc:date>
    <item>
      <title>Using Point Shapes for asset placement</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/using-point-shapes-for-asset-placement/m-p/716923#M9389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;I am still learning .cga scripting, and I've found the tutorials pretty useful for mass modeling, but I can't seem to find any references for using point data for asset placement.&lt;/P&gt;&lt;P&gt;I have an area in my map where no footprint data is available, but a .shp of points &lt;EM&gt;is&lt;/EM&gt; available. I also have a library of around 50 residential buildings (.obj).&lt;/P&gt;&lt;P&gt;I would like to use this shapefile data to randomly distribute residential buildings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally, I'd like to ensure that they are rotated to face the street, but as of right now I can't seem to bring them in in the first place.&lt;/P&gt;&lt;P&gt;Here is what I have currently:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;attr &lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;elevation= 0&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;attr Residential("assets/Buildings/Residential/Residential_*.obj")&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;@Start&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;Lot --&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i(geometry.area(rand(10,30)))=ResidentialBuilding&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;ResidentialBuilding --&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alignScopeToAxes(y)&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i(assetBestSize(RESIDENTIAL))&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;I have tried other variations on this, including removing the lot completely (I don't need it- I just thought maybe my asset import needed an area to compare Scope with)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But no matter what I do, I seem to always get the same Mismatched Token error with my i() function.&lt;/P&gt;&lt;P&gt;I am sure there is a simple way to use point features for asset placement. How do I make this work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 19:14:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/using-point-shapes-for-asset-placement/m-p/716923#M9389</guid>
      <dc:creator>DerekSpencer</dc:creator>
      <dc:date>2015-05-04T19:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using Point Shapes for asset placement</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/using-point-shapes-for-asset-placement/m-p/716924#M9390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a start:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BuildableSpace --&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; innerRect&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alignScopeToAxes(y)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i(assetBestSize("assets/Buildings/Residential/Residential_*.obj","xz"))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if that gets anywhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 19:33:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/using-point-shapes-for-asset-placement/m-p/716924#M9390</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-05-04T19:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using Point Shapes for asset placement</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/using-point-shapes-for-asset-placement/m-p/716925#M9391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help. &lt;EM&gt;innerRect&lt;/EM&gt; bases size on a lot shape, though. I am trying to place assets with point data because I do not have footprint or lot shapes to use for procedural generation.&lt;BR /&gt;Using this script I'm no longer receiving any errors, but when I Generate, nothing is placed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 19:58:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/using-point-shapes-for-asset-placement/m-p/716925#M9391</guid>
      <dc:creator>DerekSpencer</dc:creator>
      <dc:date>2015-05-04T19:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using Point Shapes for asset placement</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/using-point-shapes-for-asset-placement/m-p/716926#M9392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attr testAsset = &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;"assets/Buildings/Residential.___seeBelow____.obj"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;# So the testAsset should be set to a file name, not a wildcard.&lt;/P&gt;&lt;P&gt;# And to test this, we print to console to make sure we have a proper asset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;BuildingInsertionPoint --&amp;gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;SPAN style="line-height: 1.5;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Scale to a point, since in CE all points are tiny squares. This inserts in model's units.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;SPAN style="line-height: 1.5;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s(0,0,0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;SPAN style="line-height: 1.5;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(fileExists(testAsset))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;SPAN style="line-height: 1.5;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i(testAsset)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;# Let me know if this brings one of your assets into the scene. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 21:34:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/using-point-shapes-for-asset-placement/m-p/716926#M9392</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-05-04T21:34:46Z</dc:date>
    </item>
  </channel>
</rss>

