<?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: Cannot make generated cube avoid existing shape in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/cannot-make-generated-cube-avoid-existing-shape/m-p/1241089#M10800</link>
    <description>&lt;P&gt;Yes, it is possible to do this with occlusion queries.&amp;nbsp; After creating your red buildings in &lt;FONT face="courier new,courier"&gt;PortaloTuris&lt;/FONT&gt;, check to see if they &lt;FONT face="courier new,courier"&gt;overlap&lt;/FONT&gt; with anything else.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;PortaloTuris --&amp;gt;
	primitiveCube
	s(10,5,5)
	color("#ff0000")
	CheckPortaloTuris
	
CheckPortaloTuris --&amp;gt;
	case overlaps():
		NIL
	else:
		KeepBuilding&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's also possible to use labels.&amp;nbsp; For example, if you want to only check if they occlude with the white buildings (and it doesn't matter if they occlude with other red buildings), then use a label in the occlusion query, and put a rule onto the white buildings which assigns the label.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;const occluderLabel = "WhiteBuilding"

CheckPortaloTuris --&amp;gt;
	case overlaps(inter, occluderLabel):
		NIL
	else:
		KeepBuilding

// assign this rule to the white buildings
WhiteBuilding --&amp;gt;
	label(occluderLabel)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Dec 2022 15:18:18 GMT</pubDate>
    <dc:creator>CherylLau</dc:creator>
    <dc:date>2022-12-14T15:18:18Z</dc:date>
    <item>
      <title>Cannot make generated cube avoid existing shape</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cannot-make-generated-cube-avoid-existing-shape/m-p/1229288#M10722</link>
      <description>&lt;P&gt;I am a beginner using City Engine 2022.0. I am trying to write a rule that would create a mass in blocks between existing buildings. I am applying my rule for a block, created inside of the road network (no subdivision, shape creation enabled).&amp;nbsp;Existing buildings are imported from Arcgis Pro as shapes (they are extruded by attribute) and left on different layer. I uploaded a screenshot where white buildings are existing ones, extruded from shapes, and red ones are newly generated.&lt;/P&gt;&lt;P&gt;The problem is that I cannot find how to make new (red) shapes avoid existing shapes (white). Is there some kind of a rule that would allow me to do it? Or maybe it is possible to subdivide the block into smaller shapes and exclude ones that are overlapped by shapes? Thought about using occlusion queries (inside, overlaps, touches) for that, but failed to make it work. Is it even possible to do something like that?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 19:10:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cannot-make-generated-cube-avoid-existing-shape/m-p/1229288#M10722</guid>
      <dc:creator>DianaC</dc:creator>
      <dc:date>2022-11-07T19:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot make generated cube avoid existing shape</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cannot-make-generated-cube-avoid-existing-shape/m-p/1229453#M10724</link>
      <description>&lt;P&gt;Hi DianaC,&lt;/P&gt;&lt;P&gt;Try not use labels with your Occlusion query and see if it works or try&amp;nbsp;&lt;A href="https://doc.arcgis.com/en/cityengine/latest/cga/cga-minimum-distance-function.htm" target="_self"&gt;&lt;EM&gt;minimumDistance&lt;/EM&gt;&lt;/A&gt;&lt;FONT face="courier new,courier"&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;PortaloErdve --&amp;gt;
  case minimumDistance(all,"{your existing shapes label}") &amp;lt; 1 : NIL
  else: scatter(surface, 100, uniform){ PortaloTuris }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this help.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 09:48:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cannot-make-generated-cube-avoid-existing-shape/m-p/1229453#M10724</guid>
      <dc:creator>plfontes</dc:creator>
      <dc:date>2022-11-08T09:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot make generated cube avoid existing shape</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cannot-make-generated-cube-avoid-existing-shape/m-p/1230198#M10730</link>
      <description>&lt;P&gt;Hello plfontes,&lt;/P&gt;&lt;P&gt;Thank you for your advice, it was exactly what I was looking for.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 20:35:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cannot-make-generated-cube-avoid-existing-shape/m-p/1230198#M10730</guid>
      <dc:creator>DianaC</dc:creator>
      <dc:date>2022-11-09T20:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot make generated cube avoid existing shape</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cannot-make-generated-cube-avoid-existing-shape/m-p/1241089#M10800</link>
      <description>&lt;P&gt;Yes, it is possible to do this with occlusion queries.&amp;nbsp; After creating your red buildings in &lt;FONT face="courier new,courier"&gt;PortaloTuris&lt;/FONT&gt;, check to see if they &lt;FONT face="courier new,courier"&gt;overlap&lt;/FONT&gt; with anything else.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;PortaloTuris --&amp;gt;
	primitiveCube
	s(10,5,5)
	color("#ff0000")
	CheckPortaloTuris
	
CheckPortaloTuris --&amp;gt;
	case overlaps():
		NIL
	else:
		KeepBuilding&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's also possible to use labels.&amp;nbsp; For example, if you want to only check if they occlude with the white buildings (and it doesn't matter if they occlude with other red buildings), then use a label in the occlusion query, and put a rule onto the white buildings which assigns the label.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;const occluderLabel = "WhiteBuilding"

CheckPortaloTuris --&amp;gt;
	case overlaps(inter, occluderLabel):
		NIL
	else:
		KeepBuilding

// assign this rule to the white buildings
WhiteBuilding --&amp;gt;
	label(occluderLabel)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 15:18:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cannot-make-generated-cube-avoid-existing-shape/m-p/1241089#M10800</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2022-12-14T15:18:18Z</dc:date>
    </item>
  </channel>
</rss>

