<?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: gather coordinates for vertex at highest point on specific geometry leaf? in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/gather-coordinates-for-vertex-at-highest-point-on/m-p/722421#M9476</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks for the reply,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm actually looking for vertices in city engine building geometry rather than terrain.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Nov 2012 19:36:14 GMT</pubDate>
    <dc:creator>RobertHexter</dc:creator>
    <dc:date>2012-11-27T19:36:14Z</dc:date>
    <item>
      <title>gather coordinates for vertex at highest point on specific geometry leaf?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/gather-coordinates-for-vertex-at-highest-point-on/m-p/722419#M9474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I struggling to figure out how to locate the vertex with the highest y coord within a model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm looking for it to place air traffic type warning lights.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would assume that I would look for a vertex that is at the same height as the current scope?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 17:10:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/gather-coordinates-for-vertex-at-highest-point-on/m-p/722419#M9474</guid>
      <dc:creator>RobertHexter</dc:creator>
      <dc:date>2012-11-27T17:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: gather coordinates for vertex at highest point on specific geometry leaf?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/gather-coordinates-for-vertex-at-highest-point-on/m-p/722420#M9475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It would depend on how your current project is set up.&amp;nbsp; If you simply want to look for really high points in your DEM, I would classify the DEM based on a high elevation threshold (for example, classify the dem based on 2 classes, one below a certain elevation, one higher).&amp;nbsp; This would allow you to visualize the highest parts of the terrain.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 17:32:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/gather-coordinates-for-vertex-at-highest-point-on/m-p/722420#M9475</guid>
      <dc:creator>FranklinEbner</dc:creator>
      <dc:date>2012-11-27T17:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: gather coordinates for vertex at highest point on specific geometry leaf?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/gather-coordinates-for-vertex-at-highest-point-on/m-p/722421#M9476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks for the reply,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm actually looking for vertices in city engine building geometry rather than terrain.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 19:36:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/gather-coordinates-for-vertex-at-highest-point-on/m-p/722421#M9476</guid>
      <dc:creator>RobertHexter</dc:creator>
      <dc:date>2012-11-27T19:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: gather coordinates for vertex at highest point on specific geometry leaf?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/gather-coordinates-for-vertex-at-highest-point-on/m-p/722422#M9477</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;That is currently not yet possible 'cleanly' unless you pass down the info down to the shape. E.g. by testing if a roof floor has the highest split.index.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A hack would be to use convert() in a function named like 'heightAboveFloor' (= code example below) to get the relative distance of the current shape's pivot to the start shape's pivot. This value can then be compared to e.g. 'numberFloors'*'floorHeight' or 'buildingHeight' and then place your light asset if it's 'high enough above floor'. Let me know if this is unclear.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;E.g. used in the Medieval Town Example :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;case convert(y,scope,object,pos,0,0,0) &amp;lt; 3.5:&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ps. This works well when footprints are not sloped. If sloped, the heightAboveFloor is only approximate since the Start Shape's pivot only is taken into account.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Otherwise :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Since Shapes can not query back up in the Model Hierarchy and down other branches, that info must be fed consistently.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What you can do otherwise is use Python to (3 workflows possible):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1] get the highest vertex and draw a little new Shape there as a Start Shape for placing your lights again with a CGA rule.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2] report all high point shapes and use the Script Based Exporter to analyze the reports, then draw a little shape again as in 1] on the highest one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3] more complex:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- create a helper attr with PythonHelpValue = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- report all positions in CGA&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- use Python to find the highest shape on which a light may be created and get it's height.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- set the helper attr with that value ( use Python to set the value and the source to 'user value'.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- important : at the shape which previously reported the shapes, an other test is prepared in CGA, like :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;PossibleLightPositionShape --&amp;gt;
case PythonHelpValue == 0 :
&amp;nbsp;&amp;nbsp;&amp;nbsp; report (shapes height in world.)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print ("run Python now")
&amp;nbsp;&amp;nbsp;&amp;nbsp; NIL
case (heightInWorld &amp;lt; PythonHelpValue +delta0.01) &amp;amp;&amp;amp; (heightInWorld &amp;gt; PythonHelpValue -delta0.01):
&amp;nbsp;&amp;nbsp;&amp;nbsp; PutLight
else :
&amp;nbsp;&amp;nbsp;&amp;nbsp; NIL&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the 3] workflow in support cases where CGA had to be prepared to be able to react to 'multistep Model Generation', where first, a Model creates reports, then Python is used to create statistics over multiple shapes and write the results back to all shapes as user-set attributes for the second generation Model Generation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;---------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hopefully, my longtime wish comes true soon where leaf nodes can be combined again in a CGA operation to test exactly such things !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;---------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe read all this twice .. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:54:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/gather-coordinates-for-vertex-at-highest-point-on/m-p/722422#M9477</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2021-12-12T06:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: gather coordinates for vertex at highest point on specific geometry leaf?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/gather-coordinates-for-vertex-at-highest-point-on/m-p/722423#M9478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply, some very useful approaches to bear in mind!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I spent many cycles thinking about this one over the last couple of days.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I seem to have a result in cga this morning, another alternative.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I decided that finding the highest vertices was probably not the best approach for the application I was trying to achieve.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Finding the highest logical point for the proxy light to be placed was the goal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(read bottom up, its a maya mel'ism I struggle to shake )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

attr aabbYMax=0

ProxyPointLight --&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Insert a pointlight representation
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - using scatter to a only place one asset on the surfaces that are at the top
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scatter(surface,1,gaussian, top, 0) 
 {
&amp;nbsp; s(0,0,0)
&amp;nbsp; i("assets/proxies/pointLight.obj")
&amp;nbsp; color("#ff0000")
&amp;nbsp; PointLight. // now this just needs to be reported
 }

ProxyTopDetail --&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyTopDetail is a shape that produces a representation of a roof top detail model 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; such as a tv/radio mast geometry on the top of a building 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */
 s(0,scaleValue*assetInfo(bldTopDtl,sy),0) 
 i(bldTopDtl)
 TopDetail.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // work out the top value of the bounding box, 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // could be used later if needed for culling.. if needed
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // i have a random scale value, within a tolerance for these kind of details
 set(aabbYMax, (scope.elevation + (scaleValue*assetInfo(bldTopDtl, sy))))
 print ("aabbYMax: " + aabbYMax)
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //split out only object.top facing faces
 comp(f)
 {
&amp;nbsp; //use separated faces as one shape
&amp;nbsp; object.top=
&amp;nbsp;&amp;nbsp; color("#ff0000")
&amp;nbsp;&amp;nbsp; alignScopeToAxes(y) 
&amp;nbsp;&amp;nbsp; ProxyPointLight
 }



&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:54:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/gather-coordinates-for-vertex-at-highest-point-on/m-p/722423#M9478</guid>
      <dc:creator>RobertHexter</dc:creator>
      <dc:date>2021-12-12T06:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: gather coordinates for vertex at highest point on specific geometry leaf?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/gather-coordinates-for-vertex-at-highest-point-on/m-p/722424#M9479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;haha, MEL'ism .. &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;I used to code a lot of MEL too. Love it. Love Maya ! It's our favourite 3d app in the office, used a lot to test things and of course also get inspirations..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's always great to share some insight !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Keep the good work up !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 07:08:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/gather-coordinates-for-vertex-at-highest-point-on/m-p/722424#M9479</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2012-11-29T07:08:26Z</dc:date>
    </item>
  </channel>
</rss>

