<?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 hotspot editing won't work in 2 directions at once in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/hotspot-editing-won-t-work-in-2-directions-at-once/m-p/587362#M6293</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am having an issue in GDL. I wanted to set up some 2D hotspots that would allow me to stretch a corner of a rectangle in both the X and Y directions at the same time. I have done this a lot of times before, and it was working fine, but in this specific case it doesn't seem to be working, and I don't know why.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the attached test GDL object you can see that I am using A and B to define a rectangle at an angle in 3D (the rotation axis is the X axis).&lt;/P&gt;
&lt;PRE&gt;rotx angle&lt;BR /&gt;addx -A_half&lt;BR /&gt;rect A, B&lt;/PRE&gt;
&lt;P&gt;In 2D, I wanted to set up some hotspots for the stretching. A is the same projected as it is in 3D, so I used A for the X direction (or actually A/2, because my origin is in the center of the A edge), but B is in an angle, so when it is projected, it shortens. Thus, I set up a parameter for the projected length of B (B_projected), and in the parameter script I set up a connection between B and B_projected (as well as between A and A_half).&lt;/P&gt;
&lt;PRE&gt;if GLOB_MODPAR_NAME = "A_half" then&lt;BR /&gt;&lt;SPAN&gt; parameters a = 2 * A_half&lt;/SPAN&gt;&lt;BR /&gt;else&lt;BR /&gt;&lt;SPAN&gt; parameters A_half = a / 2&lt;/SPAN&gt;&lt;BR /&gt;endif&lt;BR /&gt;&lt;BR /&gt;if GLOB_MODPAR_NAME = "B_projected" then&lt;BR /&gt;&lt;SPAN&gt; parameters b = B_projected / cos(angle)&lt;/SPAN&gt;&lt;BR /&gt;else&lt;BR /&gt;&lt;SPAN&gt; parameters B_projected = b * cos(angle)&lt;/SPAN&gt;&lt;BR /&gt;endif&lt;/PRE&gt;
&lt;P&gt;Now, if I set up the X-direction hotspots and comment out the Y direction hotspots, the stretching works. If I do the opposite, and have the Y-direction hotspots only, the stretching also works. If I comment out the B - B_projected connection in the parameter script, then the stretching works in both directions. but with everything there, the stretching will only work in the X/A direction, and not the Y/B direction.&lt;/P&gt;
&lt;PRE&gt;rect2 -A_half, 0, A_half, B_projected&lt;BR /&gt;&lt;BR /&gt;! -------------------------------&lt;BR /&gt;! --- 2D hotspots for editing ---&lt;BR /&gt;! -------------------------------&lt;BR /&gt;&lt;BR /&gt;_unID = 0&lt;BR /&gt;&lt;BR /&gt;! --- horizontal ---&lt;BR /&gt;&lt;BR /&gt;! bottom right&lt;BR /&gt;&lt;BR /&gt;hotspot2 0, 0, _unID, A_half, 1 + 128, a: _unID = _unID + 1 ! Base&lt;BR /&gt;hotspot2 A_half, 0, _unID, A_half, 2, a: _unID = _unID + 1 ! Moving&lt;BR /&gt;hotspot2 -A_half, 0, _unID, A_half, 3, a: _unID = _unID + 1 ! Reference&lt;BR /&gt;&lt;BR /&gt;! bottom left&lt;BR /&gt;&lt;BR /&gt;hotspot2 0, 0, _unID, A_half, 1 + 128, a: _unID = _unID + 1 ! Base&lt;BR /&gt;hotspot2 -A_half, 0, _unID, A_half, 2, a: _unID = _unID + 1 ! Moving&lt;BR /&gt;hotspot2 A_half, 0, _unID, A_half, 3, a: _unID = _unID + 1 ! Reference&lt;BR /&gt;&lt;BR /&gt;! top right&lt;BR /&gt;&lt;BR /&gt;hotspot2 0, B_projected, _unID, A_half, 1 + 128, a: _unID = _unID + 1 ! Base&lt;BR /&gt;hotspot2 A_half, B_projected, _unID, A_half, 2, a: _unID = _unID + 1 ! Moving&lt;BR /&gt;hotspot2 -A_half, B_projected, _unID, A_half, 3, a: _unID = _unID + 1 ! Reference&lt;BR /&gt;&lt;BR /&gt;! top left&lt;BR /&gt;&lt;BR /&gt;hotspot2 0, B_projected, _unID, A_half, 1 + 128, a: _unID = _unID + 1 ! Base&lt;BR /&gt;hotspot2 -A_half, B_projected, _unID, A_half, 2, a: _unID = _unID + 1 ! Moving&lt;BR /&gt;hotspot2 A_half, B_projected, _unID, A_half, 3, a: _unID = _unID + 1 ! Reference&lt;BR /&gt;&lt;BR /&gt;! --- vertical ---&lt;BR /&gt;&lt;BR /&gt;! right&lt;BR /&gt;&lt;BR /&gt;hotspot2 A_half, 0, _unID, B_projected, 1 + 256, b: _unID = _unID + 1 ! Base&lt;BR /&gt;hotspot2 A_half, B_projected, _unID, B_projected, 2, b: _unID = _unID + 1 ! Moving&lt;BR /&gt;hotspot2 A_half, -B_projected, _unID, B_projected, 3, b: _unID = _unID + 1 ! Reference&lt;BR /&gt;&lt;BR /&gt;! left&lt;BR /&gt;&lt;BR /&gt;hotspot2 -A_half, 0, _unID, B_projected, 1 + 256, b: _unID = _unID + 1 ! Base&lt;BR /&gt;hotspot2 -A_half, B_projected, _unID, B_projected, 2, b: _unID = _unID + 1 ! Moving&lt;BR /&gt;hotspot2 -A_half, -B_projected, _unID, B_projected, 3, b: _unID = _unID + 1 ! Reference&lt;/PRE&gt;
&lt;P&gt;Weirdly enough, you can still see the B value in the tracker, but it just simply won't work.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielk_0-1707411293077.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/53091i4D152FA362AE1AE6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="danielk_0-1707411293077.png" alt="danielk_0-1707411293077.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone shed a light on why this specific arrangement won't work for me? What am I doing wrong?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 24 Sep 2024 08:23:19 GMT</pubDate>
    <dc:creator>danielk</dc:creator>
    <dc:date>2024-09-24T08:23:19Z</dc:date>
    <item>
      <title>hotspot editing won't work in 2 directions at once</title>
      <link>https://community.graphisoft.com/t5/GDL/hotspot-editing-won-t-work-in-2-directions-at-once/m-p/587362#M6293</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am having an issue in GDL. I wanted to set up some 2D hotspots that would allow me to stretch a corner of a rectangle in both the X and Y directions at the same time. I have done this a lot of times before, and it was working fine, but in this specific case it doesn't seem to be working, and I don't know why.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the attached test GDL object you can see that I am using A and B to define a rectangle at an angle in 3D (the rotation axis is the X axis).&lt;/P&gt;
&lt;PRE&gt;rotx angle&lt;BR /&gt;addx -A_half&lt;BR /&gt;rect A, B&lt;/PRE&gt;
&lt;P&gt;In 2D, I wanted to set up some hotspots for the stretching. A is the same projected as it is in 3D, so I used A for the X direction (or actually A/2, because my origin is in the center of the A edge), but B is in an angle, so when it is projected, it shortens. Thus, I set up a parameter for the projected length of B (B_projected), and in the parameter script I set up a connection between B and B_projected (as well as between A and A_half).&lt;/P&gt;
&lt;PRE&gt;if GLOB_MODPAR_NAME = "A_half" then&lt;BR /&gt;&lt;SPAN&gt; parameters a = 2 * A_half&lt;/SPAN&gt;&lt;BR /&gt;else&lt;BR /&gt;&lt;SPAN&gt; parameters A_half = a / 2&lt;/SPAN&gt;&lt;BR /&gt;endif&lt;BR /&gt;&lt;BR /&gt;if GLOB_MODPAR_NAME = "B_projected" then&lt;BR /&gt;&lt;SPAN&gt; parameters b = B_projected / cos(angle)&lt;/SPAN&gt;&lt;BR /&gt;else&lt;BR /&gt;&lt;SPAN&gt; parameters B_projected = b * cos(angle)&lt;/SPAN&gt;&lt;BR /&gt;endif&lt;/PRE&gt;
&lt;P&gt;Now, if I set up the X-direction hotspots and comment out the Y direction hotspots, the stretching works. If I do the opposite, and have the Y-direction hotspots only, the stretching also works. If I comment out the B - B_projected connection in the parameter script, then the stretching works in both directions. but with everything there, the stretching will only work in the X/A direction, and not the Y/B direction.&lt;/P&gt;
&lt;PRE&gt;rect2 -A_half, 0, A_half, B_projected&lt;BR /&gt;&lt;BR /&gt;! -------------------------------&lt;BR /&gt;! --- 2D hotspots for editing ---&lt;BR /&gt;! -------------------------------&lt;BR /&gt;&lt;BR /&gt;_unID = 0&lt;BR /&gt;&lt;BR /&gt;! --- horizontal ---&lt;BR /&gt;&lt;BR /&gt;! bottom right&lt;BR /&gt;&lt;BR /&gt;hotspot2 0, 0, _unID, A_half, 1 + 128, a: _unID = _unID + 1 ! Base&lt;BR /&gt;hotspot2 A_half, 0, _unID, A_half, 2, a: _unID = _unID + 1 ! Moving&lt;BR /&gt;hotspot2 -A_half, 0, _unID, A_half, 3, a: _unID = _unID + 1 ! Reference&lt;BR /&gt;&lt;BR /&gt;! bottom left&lt;BR /&gt;&lt;BR /&gt;hotspot2 0, 0, _unID, A_half, 1 + 128, a: _unID = _unID + 1 ! Base&lt;BR /&gt;hotspot2 -A_half, 0, _unID, A_half, 2, a: _unID = _unID + 1 ! Moving&lt;BR /&gt;hotspot2 A_half, 0, _unID, A_half, 3, a: _unID = _unID + 1 ! Reference&lt;BR /&gt;&lt;BR /&gt;! top right&lt;BR /&gt;&lt;BR /&gt;hotspot2 0, B_projected, _unID, A_half, 1 + 128, a: _unID = _unID + 1 ! Base&lt;BR /&gt;hotspot2 A_half, B_projected, _unID, A_half, 2, a: _unID = _unID + 1 ! Moving&lt;BR /&gt;hotspot2 -A_half, B_projected, _unID, A_half, 3, a: _unID = _unID + 1 ! Reference&lt;BR /&gt;&lt;BR /&gt;! top left&lt;BR /&gt;&lt;BR /&gt;hotspot2 0, B_projected, _unID, A_half, 1 + 128, a: _unID = _unID + 1 ! Base&lt;BR /&gt;hotspot2 -A_half, B_projected, _unID, A_half, 2, a: _unID = _unID + 1 ! Moving&lt;BR /&gt;hotspot2 A_half, B_projected, _unID, A_half, 3, a: _unID = _unID + 1 ! Reference&lt;BR /&gt;&lt;BR /&gt;! --- vertical ---&lt;BR /&gt;&lt;BR /&gt;! right&lt;BR /&gt;&lt;BR /&gt;hotspot2 A_half, 0, _unID, B_projected, 1 + 256, b: _unID = _unID + 1 ! Base&lt;BR /&gt;hotspot2 A_half, B_projected, _unID, B_projected, 2, b: _unID = _unID + 1 ! Moving&lt;BR /&gt;hotspot2 A_half, -B_projected, _unID, B_projected, 3, b: _unID = _unID + 1 ! Reference&lt;BR /&gt;&lt;BR /&gt;! left&lt;BR /&gt;&lt;BR /&gt;hotspot2 -A_half, 0, _unID, B_projected, 1 + 256, b: _unID = _unID + 1 ! Base&lt;BR /&gt;hotspot2 -A_half, B_projected, _unID, B_projected, 2, b: _unID = _unID + 1 ! Moving&lt;BR /&gt;hotspot2 -A_half, -B_projected, _unID, B_projected, 3, b: _unID = _unID + 1 ! Reference&lt;/PRE&gt;
&lt;P&gt;Weirdly enough, you can still see the B value in the tracker, but it just simply won't work.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielk_0-1707411293077.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/53091i4D152FA362AE1AE6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="danielk_0-1707411293077.png" alt="danielk_0-1707411293077.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone shed a light on why this specific arrangement won't work for me? What am I doing wrong?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 08:23:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/hotspot-editing-won-t-work-in-2-directions-at-once/m-p/587362#M6293</guid>
      <dc:creator>danielk</dc:creator>
      <dc:date>2024-09-24T08:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: hotspot editing won't work in 2 directions at once</title>
      <link>https://community.graphisoft.com/t5/GDL/hotspot-editing-won-t-work-in-2-directions-at-once/m-p/587395#M6294</link>
      <description>&lt;P&gt;My guess would be your false GLOB_MODPAR_NAME? In your code, as soon as you start modifying A, your second statement fixes B, and viceversa.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;IF GLOB_MODPAR_NAME = "A_half" THEN&lt;BR /&gt;&lt;SPAN&gt; parameters A = 2 * A_half&lt;/SPAN&gt;&lt;BR /&gt;endIF&lt;BR /&gt;IF GLOB_MODPAR_NAME = "A" then&lt;BR /&gt;&lt;SPAN&gt; parameters A_half = A / 2&lt;/SPAN&gt;&lt;BR /&gt;endif&lt;BR /&gt;&lt;BR /&gt;IF GLOB_MODPAR_NAME = "B_projected" THEN&lt;BR /&gt;&lt;SPAN&gt; parameters B = B_projected / cos(angle)&lt;/SPAN&gt;&lt;BR /&gt;endIF&lt;BR /&gt;IF GLOB_MODPAR_NAME = "B" | GLOB_MODPAR_NAME = "angle" THEN&lt;BR /&gt;&lt;SPAN&gt; parameters B_projected = B * cos(angle)&lt;/SPAN&gt;&lt;BR /&gt;endif&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 02:04:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/hotspot-editing-won-t-work-in-2-directions-at-once/m-p/587395#M6294</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2024-02-09T02:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: hotspot editing won't work in 2 directions at once</title>
      <link>https://community.graphisoft.com/t5/GDL/hotspot-editing-won-t-work-in-2-directions-at-once/m-p/587486#M6295</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yep, that was it. I didn't consider that they would be interpreted like that (running the param script for one modified parameter at a time), but it makes perfect sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 12:34:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/hotspot-editing-won-t-work-in-2-directions-at-once/m-p/587486#M6295</guid>
      <dc:creator>danielk</dc:creator>
      <dc:date>2024-02-09T12:34:31Z</dc:date>
    </item>
  </channel>
</rss>

