<?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: 2D Tube - GDL code in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/2D-Tube-GDL-code/m-p/138053#M16812</link>
    <description>A few things more to do and change in the GDL code:&lt;BR /&gt;&lt;IMG src="https://community.graphisoft.com/t5/image/serverpage/image-id/13973iFC9D56B935377FDE/image-size/large?v=v2&amp;amp;px=999" border="0" alt="Tube 2D_Fi_Arrow.jpg" title="Tube 2D_Fi_Arrow.jpg" /&gt;</description>
    <pubDate>Thu, 07 Jul 2011 09:29:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-07-07T09:29:39Z</dc:date>
    <item>
      <title>2D Tube - GDL code</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/2D-Tube-GDL-code/m-p/138050#M16809</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I´am trying to make a 2D Tube object on a basis of an existing object (drainage line 10.gsm). I have problems with the start and end position of the contour lines on both side of the axis line (they must follow axis line if it´s end position is streched and angled wit use of it´s end point hotspot on Plan View).&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 06 Jul 2011 21:14:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/2D-Tube-GDL-code/m-p/138050#M16809</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-06T21:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: 2D Tube - GDL code</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/2D-Tube-GDL-code/m-p/138051#M16810</link>
      <description>I suppose the answer will depend on how you have coded the extra lines!! &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
In the original object there is only one hotspot to move/rotate the line on the end point. How did you rotate it to produce the middle image?&lt;BR /&gt;
&lt;BR /&gt;
Can you post an extract of the code, or even the whole object?</description>
      <pubDate>Wed, 06 Jul 2011 23:17:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/2D-Tube-GDL-code/m-p/138051#M16810</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-06T23:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: 2D Tube - GDL code</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/2D-Tube-GDL-code/m-p/138052#M16811</link>
      <description>&lt;BLOCKQUOTE&gt;Peter wrote:&lt;BR /&gt;I suppose the answer will depend on how you have coded the extra lines!! &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
1. In the original object there is only one hotspot to move/rotate the line on the end point. How did you rotate it to produce the middle image?&lt;BR /&gt;
&lt;BR /&gt;
2. Can you post an extract of the code, or even the whole object?&lt;/BLOCKQUOTE&gt;

&lt;BR /&gt;
Thank you Peter for your help. In meantime I found the solution. Just a little trigonometry formula and now IT WORKS!&lt;BR /&gt;
&lt;BR /&gt;
Answers on your questions:&lt;BR /&gt;
1. With that hotspot on the end point yuo can stretch (shorten or lenghten) AND rotate the line at the same time. The middle image....I just rotate the object through the start point.&lt;BR /&gt;
&lt;BR /&gt;
2. I post the object (advise....most of the UI an parts of the code is in slovene langueage. I must translate it back in english). &lt;BR /&gt;
&lt;BR /&gt;
Now I have another problems:&lt;BR /&gt;
3. Problem 2....In UI (Parameters) - GDL code, it is not possible to input a sign for diameter (ALT+0216), or am I missing something? The same when I use the object and try to insert that character.&lt;BR /&gt;
&lt;BR /&gt;
4. Using the object (input values for SLOPE - in %, and TEXT HIGHT). That values change if I change "WORKING UNITS" in the menu Options. My default&lt;BR /&gt;
units are "cm", so I insert 1 for Slope, and that value must be the same if I change to "mm" or "m"!!. But it´s not so. I see this values:&lt;BR /&gt;
Working Units   Slope - %   Text Hight&lt;BR /&gt;
     mm                10               2&lt;BR /&gt;
     cm                  1               0.2&lt;BR /&gt;
      m                 0.01           0,002&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
There´s a part of the code to make those lines:&lt;BR /&gt;
&lt;BR /&gt;
! ---------- Drainage Line (Stretchy Line_OD) - 2D SCRIPT &lt;BR /&gt;
! Stretchy Line&lt;BR /&gt;
gosub 100                       ! Hotspots&lt;BR /&gt;
gosub 200                       ! Line&lt;BR /&gt;
gosub 300                       ! Text&lt;BR /&gt;
END 							! End the routine&lt;BR /&gt;
100 :  !!! ========== Hotspots ==========  &lt;BR /&gt;
uid = 1&lt;BR /&gt;
hotline2  x[1], y[1], x[2], y[2]&lt;BR /&gt;
hotspot2  x[1], y[1]					! start point&lt;BR /&gt;
!!! ----- move in x direction -----&lt;BR /&gt;
hotspot2  0   , y[2], uid, x[2], 1+128 : uid = uid+1    ! base   &lt;BR /&gt;
hotspot2 -1   , y[2], uid, x[2], 3     : uid = uid+1    ! ref&lt;BR /&gt;
hotspot2  x[2], y[2], uid, x[2], 2     : uid = uid+1    ! move  &lt;BR /&gt;
!!! ----- move in y direction -----		&lt;BR /&gt;
hotspot2 x[2],  0   , uid, y[2], 1+128 : uid = uid+1    ! base&lt;BR /&gt;
hotspot2 x[2], -1   , uid, y[2], 3     : uid = uid+1    ! ref&lt;BR /&gt;
hotspot2 x[2],  y[2], uid, y[2], 2     : uid = uid+1    ! move&lt;BR /&gt;
add2 xx, yy&lt;BR /&gt;
	hotspot2 0, 0, uid	 : uid = uid+1	! centre (deplacement) &lt;BR /&gt;
del 1&lt;BR /&gt;
return&lt;BR /&gt;
&lt;BR /&gt;
200 :  !!! ========== Line - AXE ==========&lt;BR /&gt;
pen penLine&lt;BR /&gt;
line_type 	ltLine&lt;BR /&gt;
line2 x[1], y[1], x[2], y[2]&lt;BR /&gt;
&lt;BR /&gt;
	!! ========== Lines - OUTER CONTOUR ==========&lt;BR /&gt;
	x[3] = x[1] - (SIN(ang) * fiCevi/2)		!!left line&lt;BR /&gt;
	y[3] = y[1] + (COS(ang) * fiCevi/2)		!!ang....see Master Script&lt;BR /&gt;
	x[4] = x[2] - (SIN(ang) * fiCevi/2)		!!fiCevi= diameter in English&lt;BR /&gt;
	y[4] = y[2] + (COS(ang) * fiCevi/2)&lt;BR /&gt;
&lt;BR /&gt;
	x[5] = x[1] + (SIN(ang) * fiCevi/2)		!!right line&lt;BR /&gt;
	y[5] = y[1] - (COS(ang) * fiCevi/2)&lt;BR /&gt;
	x[6] = x[2] + (SIN(ang) * fiCevi/2)&lt;BR /&gt;
	y[6] = y[2] - (COS(ang) * fiCevi/2)&lt;BR /&gt;
&lt;BR /&gt;
pen robPen&lt;BR /&gt;
line_type 	robLine&lt;BR /&gt;
line2 x[3], y[3], x[4], y[4]&lt;BR /&gt;
line2 x[5], y[5], x[6], y[6]&lt;BR /&gt;
&lt;BR /&gt;
return</description>
      <pubDate>Thu, 07 Jul 2011 01:25:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/2D-Tube-GDL-code/m-p/138052#M16811</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-07T01:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: 2D Tube - GDL code</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/2D-Tube-GDL-code/m-p/138053#M16812</link>
      <description>A few things more to do and change in the GDL code:&lt;BR /&gt;&lt;IMG src="https://community.graphisoft.com/t5/image/serverpage/image-id/13973iFC9D56B935377FDE/image-size/large?v=v2&amp;amp;px=999" border="0" alt="Tube 2D_Fi_Arrow.jpg" title="Tube 2D_Fi_Arrow.jpg" /&gt;</description>
      <pubDate>Thu, 07 Jul 2011 09:29:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/2D-Tube-GDL-code/m-p/138053#M16812</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-07T09:29:39Z</dc:date>
    </item>
  </channel>
</rss>

