<?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: Moving the columns when scale the parcel is change in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/moving-the-columns-when-scale-the-parcel-is-change/m-p/141790#M1882</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post your rule or code you are using to generate the columns?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Oct 2017 03:09:17 GMT</pubDate>
    <dc:creator>DevinLavigne</dc:creator>
    <dc:date>2017-10-17T03:09:17Z</dc:date>
    <item>
      <title>Moving the columns when scale the parcel is change</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/moving-the-columns-when-scale-the-parcel-is-change/m-p/141789#M1881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello friends - I created two columns in the attached image below, but the problem is that the placement of the columns moves when the parcel is large or small. Please Guide me&lt;BR /&gt;&lt;IMG alt="In this image, the columns are in their place" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/380154_1.jpg" style="width: 620px; height: 350px;" /&gt;&lt;IMG alt="In the second image columns move" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/380155_2.jpg" style="width: 620px; height: 350px;" /&gt;Thank you so much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2017 11:34:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/moving-the-columns-when-scale-the-parcel-is-change/m-p/141789#M1881</guid>
      <dc:creator>nazaninyosefi</dc:creator>
      <dc:date>2017-10-16T11:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the columns when scale the parcel is change</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/moving-the-columns-when-scale-the-parcel-is-change/m-p/141790#M1882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post your rule or code you are using to generate the columns?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 03:09:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/moving-the-columns-when-scale-the-parcel-is-change/m-p/141790#M1882</guid>
      <dc:creator>DevinLavigne</dc:creator>
      <dc:date>2017-10-17T03:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the columns when scale the parcel is change</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/moving-the-columns-when-scale-the-parcel-is-change/m-p/141791#M1883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;HospitalYard --&amp;gt;&lt;BR /&gt;Column1&lt;BR /&gt;Column2&lt;BR /&gt;Yardtile&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Yardtile --&amp;gt;&lt;BR /&gt;comp(f) {all : YardtileHospital }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YardtileHospital --&amp;gt;&lt;BR /&gt;texture("Hospital_Texture/tile-1.jpg")&lt;BR /&gt;setupProjection(0, scope.xy, 5, 5)&lt;BR /&gt;projectUV(0)&lt;/P&gt;&lt;P&gt;Column1 --&amp;gt;&lt;BR /&gt;primitiveCylinder()&lt;BR /&gt;s(1,7,1)&lt;BR /&gt;t(0.2,-0.1,-0.5)&lt;BR /&gt;translate(rel, scope, 2, 5, 0)&lt;BR /&gt;r(90,0,0)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Column2 --&amp;gt;&lt;BR /&gt;primitiveCylinder()&lt;BR /&gt;s(1,7,1)&lt;BR /&gt;t(0.1,16,-0.5)&lt;BR /&gt;translate(rel, scope, 2, 5, 0)&lt;BR /&gt;r(90,0,0)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 08:48:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/moving-the-columns-when-scale-the-parcel-is-change/m-p/141791#M1883</guid>
      <dc:creator>maziyaryousefi</dc:creator>
      <dc:date>2017-10-17T08:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the columns when scale the parcel is change</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/moving-the-columns-when-scale-the-parcel-is-change/m-p/141792#M1884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, I'm not exactly sure what your shape setup is, so it is hard to know exactly what the problem is, but maybe the following information will help you find the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One guess is that the shape that you start with when HospitalYard is called is a different size when the parcel is a different size.&amp;nbsp; When the columns are translated, they are both translated relative to the scope origin, which is the same as the scope origin that you have for HospitalYard.&amp;nbsp; If the hospital building size is varied or it is placed on the lot, say by centering it on the lot, then the columns will not have been placed relative to the building.&amp;nbsp; I'm actually not sure this is what's happening though.&amp;nbsp; Basically, I would suggest placing the columns relative to the building.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use relative translations by putting an apostrophe in front of a value&amp;nbsp;in the range [0,1].&amp;nbsp; Then, you can translate the columns relative to the building size.&amp;nbsp; For example, this is useful if you know that you want one column to be at 20% of the building width and the other column to be at 80% of the building width.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://cehelp.esri.com/help/topic/com.procedural.cityengine.help/html/cgareference/op_t.html" title="http://cehelp.esri.com/help/topic/com.procedural.cityengine.help/html/cgareference/op_t.html" rel="nofollow noopener noreferrer" target="_blank"&gt;t Operation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also access the scope widths to calculate relative positions, which is necessary if you want to center the columns exactly at 20% and 80% of the building width.&amp;nbsp; Here is an example which creates a building that is 5x5m with columns that are always at 20% and 80% of the building width.&amp;nbsp; This doesn't change when you change the lot or parcel size that you start with.&amp;nbsp; The columns are still at 20% and 80% even if you change the building width.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;const building_width = 5
const building_height = 0.2
const column_diameter = 1
const column_height = 7


Lot --&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;primitiveCube
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s(building_width, building_height, building_width)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;center(xz)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Building
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Building --&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Mass.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;t(0, building_height, 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Column1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Column2
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Column1 --&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;t(0.2*scope.sx - 0.5*column_diameter, 0, 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Column
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Column2 --&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;t(0.8*scope.sx - 0.5*column_diameter, 0, 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Column
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Column --&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s(column_diameter, column_height, column_diameter)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;primitiveCylinder
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/380837_result.png" style="width: 620px; height: 336px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, note that the following commands are equivalent.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;t(1, 2, 3)
translate(rel, scope, 1, 2, 3)
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Therefore, you can combine your translation amounts into a single command using t().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed that you're translating in the y direction, but I'm not sure this makes sense to me since you probably want to position the columns using x and z.&amp;nbsp; But, then, I don't know your shape set up and how the scopes of the shapes in your shape tree are created.&amp;nbsp; You can try to debug and understand the scopes of the shapes you create with your rules using the Model Hierarchy (Window -&amp;gt; Show Model Hierarchy -&amp;gt; Inspect model -&amp;gt; Select object in viewport).&amp;nbsp; Then, you can select a shape node in the shape tree and see what the scope of it is in the viewport.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:48:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/moving-the-columns-when-scale-the-parcel-is-change/m-p/141792#M1884</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2021-12-11T07:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the columns when scale the parcel is change</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/moving-the-columns-when-scale-the-parcel-is-change/m-p/141793#M1885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your answer .It was very useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2017 20:27:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/moving-the-columns-when-scale-the-parcel-is-change/m-p/141793#M1885</guid>
      <dc:creator>maziyaryousefi</dc:creator>
      <dc:date>2017-10-23T20:27:40Z</dc:date>
    </item>
  </channel>
</rss>

