<?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: Constrain the move of a hotspot2 along a line ? in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213732#M15878</link>
    <description>&lt;BLOCKQUOTE&gt;Thierry wrote:&lt;BR /&gt;Thanks you for your example. I have understood how you do. But I'd like understand how works the editable hotspot. No french documentation for GDL, except the documentation AC 7.0, but without editable hotspot ! And the english documentation seem sketchy !&lt;/BLOCKQUOTE&gt;

Graphical Hotspots are fully documented in each version since AC8. Goto Menu &amp;gt; Help &amp;gt; GDL Reference Guide&amp;gt; Graphical Editing,&lt;BR /&gt;
or &lt;A href="http://www.graphisoft.com/ftp/gdl/manual/15/wwhelp/wwhimpl/js/html/wwhelp.htm" target="_blank"&gt;Online Help&lt;/A&gt;&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;Thierry wrote:&lt;BR /&gt;
Is there another way without ROT2 angle ?&lt;/BLOCKQUOTE&gt;

I don't see the problem, you delete the transformation once done.&lt;BR /&gt;
There are other ways to achieve the same result without using rot2, but calculations are more complicated.</description>
    <pubDate>Mon, 19 Dec 2011 16:42:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-12-19T16:42:56Z</dc:date>
    <item>
      <title>Constrain the move of a hotspot2 along a line ?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213723#M15869</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;HI&lt;BR /&gt;
&lt;BR /&gt;
With something like this, I can move a point C (editable hotspot2) on all directions :&lt;BR /&gt;
	!x&lt;BR /&gt;
	HOTSPOT2   Cx,   0,    ID,   Cy,   1+128  : ID=ID+1&lt;BR /&gt;
	HOTSPOT2   Cx,   -1,   ID,   Cy,   3         : ID=ID+1&lt;BR /&gt;
	HOTSPOT2   Cx,   Cy,  ID,   Cy,   2         : ID=ID+1&lt;BR /&gt;
	!y&lt;BR /&gt;
	HOTSPOT2   0,    Cy,   ID,   Cx,   1+128  : ID=ID+1&lt;BR /&gt;
	HOTSPOT2   -1,   Cy,   ID,   Cx,   3         : ID=ID+1&lt;BR /&gt;
	HOTSPOT2   Cx,  Cy,   ID,   Cx,   2         : ID=ID+1&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
How can I force the displacement of the point C along the line D ?&lt;BR /&gt;
C is halfway between A and B.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;/T&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/73433i7FFDAB2F5A72054D/image-size/large?v=v2&amp;amp;px=999" border="0" alt="hotspot2_01.jpg" title="hotspot2_01.jpg" /&gt;</description>
      <pubDate>Sat, 17 Dec 2011 22:54:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213723#M15869</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-17T22:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain the move of a hotspot2 along a line ?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213724#M15870</link>
      <description>There are a number of ways to accomplish this. What are your known variables? delta_x? delta_y? The angle of line "D"?&lt;BR /&gt;
&lt;BR /&gt;
Basically, you write a group of three hotspot2 commands to get a single moving hotspot constrained to a line. You just need to know the equation for your particular line. &lt;BR /&gt;
&lt;BR /&gt;
You could also look at simplifying things depending on the know variables, or by writing your hotspot for a simple case (ie. vertical or horizontal lines) and then rotate your coordinate system. &lt;BR /&gt;
&lt;BR /&gt;
HTH</description>
      <pubDate>Sun, 18 Dec 2011 03:39:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213724#M15870</guid>
      <dc:creator>Erich</dc:creator>
      <dc:date>2011-12-18T03:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain the move of a hotspot2 along a line ?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213725#M15871</link>
      <description>&lt;BLOCKQUOTE&gt;Erich wrote:&lt;BR /&gt;There are a number of ways to accomplish this. What are your known variables? delta_x? delta_y? The angle of line "D"?&lt;BR /&gt;
&lt;BR /&gt;
Basically, you write a group of three hotspot2 commands to get a single moving hotspot constrained to a line. You just need to know the equation for your particular line. &lt;BR /&gt;
&lt;BR /&gt;
You could also look at simplifying things depending on the know variables, or by writing your hotspot for a simple case (ie. vertical or horizontal lines) and then rotate your coordinate system. &lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;/BLOCKQUOTE&gt;

Merci Erich.&lt;BR /&gt;
&lt;BR /&gt;
All my known variables are in the drawing (A, B, C, O and a point (E) between A and B).&lt;BR /&gt;
So I have 2 points O and E on the D line.&lt;BR /&gt;
I can get the D line equation.&lt;BR /&gt;
How can I use it in the hotspot2 ?&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Sun, 18 Dec 2011 10:36:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213725#M15871</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-18T10:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain the move of a hotspot2 along a line ?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213726#M15872</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
Try in the master or value script;&lt;BR /&gt;
&lt;BR /&gt;
parameters b= (-a)&lt;BR /&gt;
&lt;BR /&gt;
HTH, Juha</description>
      <pubDate>Sun, 18 Dec 2011 14:00:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213726#M15872</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-18T14:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain the move of a hotspot2 along a line ?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213727#M15873</link>
      <description>You could also have just one moving hotspot &lt;BR /&gt;
and rotate it before declaring;&lt;BR /&gt;
&lt;BR /&gt;
rot2 -45&lt;BR /&gt;
hotspot2 xxx-direction...&lt;BR /&gt;
hotspot2 xxx-direction...&lt;BR /&gt;
hotspot2 xxx-direction...&lt;BR /&gt;
del 1&lt;BR /&gt;
&lt;BR /&gt;
Regards, Juha</description>
      <pubDate>Sun, 18 Dec 2011 14:25:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213727#M15873</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-18T14:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain the move of a hotspot2 along a line ?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213728#M15874</link>
      <description>I would try using my last method. The same as Juha says. &lt;BR /&gt;
&lt;BR /&gt;
Start by determining your angle for the line AB. Assume that the origin passes through your point E. Then your angle is ATN (Ay/Ax). You many need a special case for when your angle is 90 or 270 degrees as the tangent blows up there. &lt;BR /&gt;
&lt;BR /&gt;
Next, write your hotspots in only the vertical direction with an angle transformation before it. You would have something like this:&lt;BR /&gt;

&lt;PRE&gt;IF Ax&amp;lt;&amp;gt;0 THEN
   ang = ATN(Ay/Ax)
  ELSE
   ang = 90  !! it could also be ang = 270 
ENDIF

ROT2 ang
 HOTSPOT2  0,   Cy, ID, Cx, 1+128 : ID=ID+1 
 HOTSPOT2 -1,   Cy, ID, Cx, 3 : ID=ID+1  
 HOTSPOT2  Cx,  Cy, ID, Cx, 2 : ID=ID+1 
DEL 1 &lt;/PRE&gt;</description>
      <pubDate>Sun, 18 Dec 2011 15:12:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213728#M15874</guid>
      <dc:creator>Erich</dc:creator>
      <dc:date>2011-12-18T15:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain the move of a hotspot2 along a line ?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213729#M15875</link>
      <description>All points (...A,B,C...) are in a matrix parameter " points [40][x,y] "&lt;BR /&gt;
If I use the solution :&lt;BR /&gt;
ROT2 angle&lt;BR /&gt;
DEL 1&lt;BR /&gt;
all points are in a wrong place, because I don't use a local coordinate system with ADD2 x,y for each point.&lt;BR /&gt;
&lt;BR /&gt;
I'd rather another way, perhaps using the D line equation ?&lt;BR /&gt;
With E (between A and B), and O (center of circle), I have two points on the line D.&lt;BR /&gt;
with line equation : y = ax + b&lt;BR /&gt;
I have :&lt;BR /&gt;
a = (Ey - Oy) / (Ex - Ox)&lt;BR /&gt;
b = Oy - aOx&lt;BR /&gt;
&lt;BR /&gt;
What can I do after ?&lt;BR /&gt;
&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;Juha wrote:&lt;BR /&gt;parameters b= (-a)&lt;/BLOCKQUOTE&gt;
I don't understand &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_rolleyes.gif" style="display : inline;" /&gt;&lt;BR /&gt;
&lt;BR /&gt;
Best regards</description>
      <pubDate>Sun, 18 Dec 2011 21:24:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213729#M15875</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-18T21:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain the move of a hotspot2 along a line ?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213730#M15876</link>
      <description>You need some trigo to find centre and radius of the arc, according to any location of your points. &lt;BR /&gt;
See attached example.</description>
      <pubDate>Mon, 19 Dec 2011 13:18:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213730#M15876</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-19T13:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain the move of a hotspot2 along a line ?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213731#M15877</link>
      <description>&lt;BLOCKQUOTE&gt;Olivier wrote:&lt;BR /&gt;You need some trigo to find centre and radius of the arc, according to any location of your points. &lt;BR /&gt;
See attached example.&lt;/BLOCKQUOTE&gt;

Thanks you for your example. I have understood how you do. But I'd like understand how works the editable hotspot. No french documentation for GDL, except the documentation AC 7.0, but without editable hotspot ! And the english documentation seem sketchy !&lt;BR /&gt;
Is there another way without ROT2 angle ?&lt;BR /&gt;
&lt;BR /&gt;
Merci</description>
      <pubDate>Mon, 19 Dec 2011 15:32:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213731#M15877</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-19T15:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain the move of a hotspot2 along a line ?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213732#M15878</link>
      <description>&lt;BLOCKQUOTE&gt;Thierry wrote:&lt;BR /&gt;Thanks you for your example. I have understood how you do. But I'd like understand how works the editable hotspot. No french documentation for GDL, except the documentation AC 7.0, but without editable hotspot ! And the english documentation seem sketchy !&lt;/BLOCKQUOTE&gt;

Graphical Hotspots are fully documented in each version since AC8. Goto Menu &amp;gt; Help &amp;gt; GDL Reference Guide&amp;gt; Graphical Editing,&lt;BR /&gt;
or &lt;A href="http://www.graphisoft.com/ftp/gdl/manual/15/wwhelp/wwhimpl/js/html/wwhelp.htm" target="_blank"&gt;Online Help&lt;/A&gt;&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;Thierry wrote:&lt;BR /&gt;
Is there another way without ROT2 angle ?&lt;/BLOCKQUOTE&gt;

I don't see the problem, you delete the transformation once done.&lt;BR /&gt;
There are other ways to achieve the same result without using rot2, but calculations are more complicated.</description>
      <pubDate>Mon, 19 Dec 2011 16:42:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213732#M15878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-19T16:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain the move of a hotspot2 along a line ?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213733#M15879</link>
      <description>This is done and it works (with ROT2).&lt;BR /&gt;
Thanks to everyone.</description>
      <pubDate>Wed, 21 Dec 2011 20:39:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Constrain-the-move-of-a-hotspot2-along-a-line/m-p/213733#M15879</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-21T20:39:08Z</dc:date>
    </item>
  </channel>
</rss>

