<?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: GDL Tube loop in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/GDL-Tube-loop/m-p/371756#M812</link>
    <description>&lt;P&gt;The first and last points of the TUBE path are dummy points.&lt;/P&gt;
&lt;P&gt;The profile is not actually extended to those points, but they are used to define the start and end angle of the profile.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the second point in the path is really the starting point of the profile.&lt;/P&gt;
&lt;P&gt;If you make the first point the negative distance of your third point in relation to the second point, you will effectively be defining a straight line through the first second and third points.&lt;/P&gt;
&lt;P&gt;So the start end of your profile will always be perpendicular the the first visible section of the path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The same for the last point, it needs to be a continuation of a straight line from the 3rd last to second last points.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So in your case something like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;0, -a/2, 0, 0, !!!dummy point&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;0, 0, 0, 0,&lt;/P&gt;
&lt;P&gt;0, a/2, 0, 0,&lt;/P&gt;
&lt;P&gt;0, a/2, zzyzx, 0,&lt;/P&gt;
&lt;P&gt;0, -a/2, zzyzx, 0,&lt;/P&gt;
&lt;P&gt;0, -a/2, 0, 0,&lt;/P&gt;
&lt;P&gt;0, 0, 0, 0,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;0, a/2, 0, 0&amp;nbsp;&amp;nbsp; !!!dummy point&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2023 07:23:58 GMT</pubDate>
    <dc:creator>Barry Kelly</dc:creator>
    <dc:date>2023-02-28T07:23:58Z</dc:date>
    <item>
      <title>GDL Tube loop</title>
      <link>https://community.graphisoft.com/t5/GDL/GDL-Tube-loop/m-p/371752#M811</link>
      <description>&lt;P&gt;I'm working on a small project in GDL, to create a 'picture frame' from a profile swept along a polyline. I have just a rectangle for now but can put in more complex details later. The result responds to parametric width, height and profile thickness and length parameters.&lt;/P&gt;
&lt;P&gt;The issue I have run into is that the cross section seems to be randomly sheared at the begin and end of the tube. Any idea why this is happening? Is there a status code or something to automatically close the Tube object? I looked here and did not find any settings to control the begin and end angle of the tube object;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gdl.graphisoft.com/reference-guide/shapes-generated-from-polylines" target="_self"&gt;https://gdl.graphisoft.com/reference-guide/shapes-generated-from-polylines&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArchDMn_1-1677558083414.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/34702iA64E6FB76C8E2119/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ArchDMn_1-1677558083414.png" alt="ArchDMn_1-1677558083414.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;RESOL res
MATERIAL mat
PEN pen_mod

HOTSPOT -a/2, 0, zzyzx
HOTSPOT a/2, 0, zzyzx
HOTSPOT 0, 0, zzyzx

HOTSPOT -a/2, 0, 0
HOTSPOT a/2, 0, 0
HOTSPOT 0, 0, 0

HOTSPOT -a/2-widc, 0, 0
HOTSPOT a/2+widc, 0, 0

ROTZ -90

	GOSUB 100
	TUBE pnum, 8, 0,
	GET (NSP),
	0, 0, 0, 0,
	0, 0, 0, 0,
	0, a/2, 0, 0,
	0, a/2, zzyzx, 0,
	0, -a/2, zzyzx, 0,
	0, -a/2, 0, 0,
	0, 0, 0, 0,
	0, 0, zzyzx, 0

DEL 1

END

100:
	pnum=4
	PUT 0, 0, 0
	PUT C, 0, 0
	PUT C, D, 0
	PUT 0, D, 0
RETURN&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;a= unit width&lt;/P&gt;
&lt;P&gt;zzyzx= unit height&lt;/P&gt;
&lt;P&gt;C= profile thickness&lt;/P&gt;
&lt;P&gt;D= profile length&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 07:08:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/GDL-Tube-loop/m-p/371752#M811</guid>
      <dc:creator>ArchDMn</dc:creator>
      <dc:date>2023-02-28T07:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: GDL Tube loop</title>
      <link>https://community.graphisoft.com/t5/GDL/GDL-Tube-loop/m-p/371756#M812</link>
      <description>&lt;P&gt;The first and last points of the TUBE path are dummy points.&lt;/P&gt;
&lt;P&gt;The profile is not actually extended to those points, but they are used to define the start and end angle of the profile.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the second point in the path is really the starting point of the profile.&lt;/P&gt;
&lt;P&gt;If you make the first point the negative distance of your third point in relation to the second point, you will effectively be defining a straight line through the first second and third points.&lt;/P&gt;
&lt;P&gt;So the start end of your profile will always be perpendicular the the first visible section of the path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The same for the last point, it needs to be a continuation of a straight line from the 3rd last to second last points.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So in your case something like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;0, -a/2, 0, 0, !!!dummy point&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;0, 0, 0, 0,&lt;/P&gt;
&lt;P&gt;0, a/2, 0, 0,&lt;/P&gt;
&lt;P&gt;0, a/2, zzyzx, 0,&lt;/P&gt;
&lt;P&gt;0, -a/2, zzyzx, 0,&lt;/P&gt;
&lt;P&gt;0, -a/2, 0, 0,&lt;/P&gt;
&lt;P&gt;0, 0, 0, 0,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;0, a/2, 0, 0&amp;nbsp;&amp;nbsp; !!!dummy point&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 07:23:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/GDL-Tube-loop/m-p/371756#M812</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2023-02-28T07:23:58Z</dc:date>
    </item>
  </channel>
</rss>

