<?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: Perhaps I'm using it wrong, my 'touches()' rule seems to be unpredictable in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/perhaps-i-m-using-it-wrong-my-touches-rule-seems/m-p/477638#M6474</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thank you Matthias!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I understand... 2D faces aren't picked up by the touches(), but 3D volumes work with touches().&amp;nbsp; So, looking at your rules, here is how your workaround works:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. you extrude the flat 2D face to create a very small 3D volume.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. you invoke the touches() instruction, it should work fine.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. just delete the sides and top of the 3D volume, leaving the 2D face behind.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Flipping brilliant, as I use CityEngine, I really do marvel at your brain frequently &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jun 2012 15:29:29 GMT</pubDate>
    <dc:creator>DavidOConnor</dc:creator>
    <dc:date>2012-06-14T15:29:29Z</dc:date>
    <item>
      <title>Perhaps I'm using it wrong, my 'touches()' rule seems to be unpredictable</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/perhaps-i-m-using-it-wrong-my-touches-rule-seems/m-p/477636#M6472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;howdy folks, here something that I don't quite understand.&amp;nbsp; This is a test version of my rules, which is a greatly simplified version of the 5th Element New York city &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the 'touches()' to identify faces where the model penetrates itself.&amp;nbsp; On these faces, for test purposes, I'd like to have a black texture.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My rule seems to work, but only some of the time, as you can see in the photo.&amp;nbsp;&amp;nbsp; The black faces are working fine.&amp;nbsp; I've put an arrow pointing at the faces where it should work, but doesn't (i.e. the faces should be black, but they aren't). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By the way, I'm using 2010.3.&amp;nbsp; Here is the extract from the rules:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Wall --&amp;gt;&amp;nbsp; &amp;nbsp; case touches() : &amp;nbsp; texture("facades/MyFacades/Test_facade_TOUCHES.png") &amp;nbsp;&amp;nbsp;&amp;nbsp; alignScopeToGeometry(zUp, auto) &amp;nbsp;&amp;nbsp;&amp;nbsp; setupProjection(0,scope.xy,10*getTileWidth(scope.sx),10*getFloorHeight(scope.sy),0) &amp;nbsp;&amp;nbsp;&amp;nbsp; projectUV(0)&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; else: &amp;nbsp; texture("facades/MyFacades/Test_facade_WINDOW.png") &amp;nbsp;&amp;nbsp;&amp;nbsp; alignScopeToGeometry(zUp, auto) &amp;nbsp;&amp;nbsp;&amp;nbsp; setupProjection(0,scope.xy,10*getTileWidth(scope.sx),10*getFloorHeight(scope.sy),0) &amp;nbsp;&amp;nbsp;&amp;nbsp; projectUV(0)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As usual, your thoughts would be appreciated.&amp;nbsp; Thank you! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 19:44:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/perhaps-i-m-using-it-wrong-my-touches-rule-seems/m-p/477636#M6472</guid>
      <dc:creator>DavidOConnor</dc:creator>
      <dc:date>2012-05-07T19:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Perhaps I'm using it wrong, my 'touches()' rule seems to be unpredictable</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/perhaps-i-m-using-it-wrong-my-touches-rule-seems/m-p/477637#M6473</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;occlusion checks need '3d scopes' (volumes) to work properly with a certain precision. ( as with every computer thingy, it all only works within certain precision, thus you need to give the computer a little room to work properly. occlusions on floating rotated 2d polys thus usually gives you a headache.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tackling this can sometimes be a little tricky, but I've had good success with strategies like this :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pseudo code :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;comp(f) Face Face --&amp;gt; scale down 10% # to avoid overlaps with neighbor faces extrude (0.05) TestVolume&amp;nbsp; TestVolume --&amp;gt; case overlaps : comp(f){bottom : reverseNormals ShapeOverlaps | all : NIL} else : ShapeDoesNotOverlap.&amp;nbsp; ShapeOverlaps&amp;nbsp; --&amp;gt; scale back up to full size continue.&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 12:12:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/perhaps-i-m-using-it-wrong-my-touches-rule-seems/m-p/477637#M6473</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2012-05-08T12:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Perhaps I'm using it wrong, my 'touches()' rule seems to be unpredictable</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/perhaps-i-m-using-it-wrong-my-touches-rule-seems/m-p/477638#M6474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thank you Matthias!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I understand... 2D faces aren't picked up by the touches(), but 3D volumes work with touches().&amp;nbsp; So, looking at your rules, here is how your workaround works:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. you extrude the flat 2D face to create a very small 3D volume.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. you invoke the touches() instruction, it should work fine.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. just delete the sides and top of the 3D volume, leaving the 2D face behind.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Flipping brilliant, as I use CityEngine, I really do marvel at your brain frequently &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2012 15:29:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/perhaps-i-m-using-it-wrong-my-touches-rule-seems/m-p/477638#M6474</guid>
      <dc:creator>DavidOConnor</dc:creator>
      <dc:date>2012-06-14T15:29:29Z</dc:date>
    </item>
  </channel>
</rss>

