<?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 2D Length for Railing panel? in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395174#M522</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I'm getting started with GDL, so please excuse me foe the dumb question!&lt;/P&gt;
&lt;P&gt;To get the 3D length of the railing panel I can use&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;RAILINGPANEL_GEOMETRY&lt;/STRONG&gt; to get the coordinates of the points and subtract to get the length. But this one doesn't work in 2D. I tried the same trick with&amp;nbsp;&lt;STRONG&gt;RAIL2D_FULL_POLYGON_GEOM&lt;/STRONG&gt; but it doesn't work. Maybe I got lucky and have the 3D one working without thoroughly understand how it behaves. Can someone show me how I can get the panel's length in 2D script?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks a lot in advance!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Aug 2023 08:51:39 GMT</pubDate>
    <dc:creator>MinhNguyen</dc:creator>
    <dc:date>2023-08-17T08:51:39Z</dc:date>
    <item>
      <title>2D Length for Railing panel?</title>
      <link>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395174#M522</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I'm getting started with GDL, so please excuse me foe the dumb question!&lt;/P&gt;
&lt;P&gt;To get the 3D length of the railing panel I can use&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;RAILINGPANEL_GEOMETRY&lt;/STRONG&gt; to get the coordinates of the points and subtract to get the length. But this one doesn't work in 2D. I tried the same trick with&amp;nbsp;&lt;STRONG&gt;RAIL2D_FULL_POLYGON_GEOM&lt;/STRONG&gt; but it doesn't work. Maybe I got lucky and have the 3D one working without thoroughly understand how it behaves. Can someone show me how I can get the panel's length in 2D script?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks a lot in advance!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 08:51:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395174#M522</guid>
      <dc:creator>MinhNguyen</dc:creator>
      <dc:date>2023-08-17T08:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: 2D Length for Railing panel?</title>
      <link>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395265#M523</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ToperBarrientos_0-1692327067498.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/44604i1033AB1743262E4B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ToperBarrientos_0-1692327067498.png" alt="ToperBarrientos_0-1692327067498.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;Kindly investigate this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 02:52:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395265#M523</guid>
      <dc:creator>Toper Barrientos</dc:creator>
      <dc:date>2023-08-18T02:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: 2D Length for Railing panel?</title>
      <link>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395285#M524</link>
      <description>&lt;P&gt;Hi, not sure if this is an answer to my question?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 06:18:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395285#M524</guid>
      <dc:creator>MinhNguyen</dc:creator>
      <dc:date>2023-08-18T06:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: 2D Length for Railing panel?</title>
      <link>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395289#M525</link>
      <description>&lt;P&gt;Hi Minh.&lt;/P&gt;&lt;P&gt;Im sorry for some glare answer.&lt;/P&gt;&lt;P&gt;What i mean is try to open the railing tool.. fr. there, several gdl scripts will open.&lt;/P&gt;&lt;P&gt;Then, go to the macro for 2d, &amp;amp; check the relevant 2d coordinates of the panel length.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 07:12:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395289#M525</guid>
      <dc:creator>Toper Barrientos</dc:creator>
      <dc:date>2023-08-18T07:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: 2D Length for Railing panel?</title>
      <link>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395290#M526</link>
      <description>&lt;P&gt;Ah, thanks for the info! What I'm trying to build is a custom railing panel from scratch, and I need the panel's length in each segment for calculation. I succeeded with&amp;nbsp;RAILINGPANEL_GEOMETRY in 3D script to get the value, but couldn't find its equivalent in 2D script &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 07:15:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395290#M526</guid>
      <dc:creator>MinhNguyen</dc:creator>
      <dc:date>2023-08-18T07:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: 2D Length for Railing panel?</title>
      <link>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395292#M527</link>
      <description>&lt;P&gt;I created my own panel once.&lt;/P&gt;
&lt;P&gt;If I remember correctly, I just used an existing panel and changed the 3D part of the script to show what I wanted.&lt;/P&gt;
&lt;P&gt;I left the 2D script alone as it is just a symbolic representation and I was happy with that.&lt;/P&gt;
&lt;P&gt;It will adjust automatically as you adjust the post spacing or segment lengths.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 07:27:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395292#M527</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2023-08-18T07:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: 2D Length for Railing panel?</title>
      <link>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395316#M528</link>
      <description>&lt;P&gt;Thanks Barry!&lt;/P&gt;
&lt;P&gt;Then maybe I will frame my question differently:&lt;/P&gt;
&lt;P&gt;Is there a way to get the length of the panel into 2D script of the panel? Like we put dimensions for the panel on floor plan, but to have the value calculated and useable in GDL (whether its 2D script or Parameters, I just need the numbers out for calculation)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MinhNguyen_0-1692349882867.png" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/44620iEB63091C0CB2F68B/image-size/large?v=v2&amp;amp;px=999" role="button" title="MinhNguyen_0-1692349882867.png" alt="MinhNguyen_0-1692349882867.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 09:14:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395316#M528</guid>
      <dc:creator>MinhNguyen</dc:creator>
      <dc:date>2023-08-18T09:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: 2D Length for Railing panel?</title>
      <link>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395320#M529</link>
      <description>&lt;P&gt;I haven't tried getting lengths in 2D.&lt;/P&gt;
&lt;P&gt;I see there are commands to get info in 3D but not so much in 2D&lt;/P&gt;
&lt;P&gt;There is ... RAIL_CONNECTING_POSTS&lt;/P&gt;
&lt;P&gt;Something about a proportional value for the position of posts where 1 is the overall length (of I assume the segment).&lt;/P&gt;
&lt;P&gt;So maybe you can deduce the panel length from that, but it all sounds a bit difficult.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 09:44:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/395320#M529</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2023-08-18T09:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: 2D Length for Railing panel?</title>
      <link>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/396087#M530</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You can't get the 3D length in 2D of the panel object. The projected length can be calculated from RAIL2D_FULL_POLYLINE_GEOM.&lt;/P&gt;
&lt;P&gt;For labels there is RAILING_3DLENGTH, but that is the whole railing's length.&lt;/P&gt;
&lt;P&gt;In IES individual projected lengths can be listed as Width.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 14:04:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/396087#M530</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2023-08-24T14:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: 2D Length for Railing panel?</title>
      <link>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/396160#M531</link>
      <description>&lt;P&gt;Hi Peter,&lt;/P&gt;
&lt;P&gt;That's awesome! I was looking into&amp;nbsp;&lt;SPAN&gt;RAIL2D_FULL_POLYLINE_GEOM but can't figure out how to use it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If I use &lt;EM&gt;RAIL2D_FULL_POLYLINE_GEOM[2][1] - RAIL2D_FULL_POLYLINE_GEOM[1][1]&amp;nbsp;&lt;/EM&gt;like what I did in the 3D script, unfortunately it doesn't work.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Can you please show me how this command should work?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you so much in advance!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 02:04:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/396160#M531</guid>
      <dc:creator>MinhNguyen</dc:creator>
      <dc:date>2023-08-25T02:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: 2D Length for Railing panel?</title>
      <link>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/397437#M5516</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sorry for the late reply.&lt;/P&gt;
&lt;P&gt;For straight panels you have to use both coordinates with Pythagorean theorem.&lt;/P&gt;
&lt;P&gt;Curved panels are not that easy, curves are described with the same format as the Polyoperations addon uses:&lt;/P&gt;
&lt;P&gt;* x and y coordinates are the start point of the arc (the end is the next x, y, point)&lt;/P&gt;
&lt;P&gt;* the third parameter is the signed central angle of the arc. &lt;A href="https://gdl.graphisoft.com/gdl_other_docs/how-to-create-2d-opening-symbol#CurvedEdges" target="_self"&gt;Here&lt;/A&gt; are some illustrations.&lt;/P&gt;
&lt;P&gt;The arc length, using trigonometry is: (PI / 180) * chordlength * ((alpha / 2) / sin (alpha / 2))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 07:38:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/397437#M5516</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2023-09-06T07:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: 2D Length for Railing panel?</title>
      <link>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/397453#M5518</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/14532"&gt;@Peter Baksa&lt;/a&gt;&amp;nbsp;wrote:
&lt;P class="1693990219616"&gt;.....&lt;/P&gt;
&lt;P&gt;For straight panels you have to use both coordinates with Pythagorean theorem.&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi Peter, no worries! Thanks for the information, this is really helpful! Let's focus on straight panel for now, as this was my problem anyway&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I assume we need the coordinate of 2 points to calculate their distance using&amp;nbsp;&lt;SPAN&gt;Pythagorean theorem &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;d = sqrt((x2-x1)^2+(y2-y1)^2)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I can't seem to use&amp;nbsp;&lt;STRONG&gt;RAIL2D_FULL_POLYGON_GEOM&amp;nbsp;&lt;/STRONG&gt;to get the coordinates of the 2 points:&lt;/P&gt;
&lt;P&gt;- If I use&amp;nbsp;&lt;EM&gt;RAIL2D_FULL_POLYGON_GEOM[2][1] - RAIL2D_FULL_POLYGON_GEOM[1][1],&lt;/EM&gt; I have the following error&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Archicad_nuHoyQcsiJ.png" style="width: 804px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/45434i38DF79E6B4A22240/image-size/large?v=v2&amp;amp;px=999" role="button" title="Archicad_nuHoyQcsiJ.png" alt="Archicad_nuHoyQcsiJ.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;- With&amp;nbsp;RAIL2D_FULL_POLYGON_GEOM[1][1] -&amp;nbsp;RAIL2D_FULL_POLYGON_GEOM[1][2], the script is ok, but this is not the value we look for (which should be x2-x1)? And the result is 0.0000 anyway&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Archicad_I5XtXplk7b.png" style="width: 725px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/45435i4647EEF4DC2AF7B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Archicad_I5XtXplk7b.png" alt="Archicad_I5XtXplk7b.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;- Last attempt: if I would consider the first point to be 0,0, and the second point is actually what can be pulled from&amp;nbsp;RAIL2D_FULL_POLYGON_GEOM, then the result of this command&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;dummy = sqr(RAIL2D_FULL_POLYLINE_GEOM[1][1]^2 + RAIL2D_FULL_POLYLINE_GEOM[1][2]^2)
print dummy&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is 0.0000 in Report dialog&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you once again!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 09:52:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/397453#M5518</guid>
      <dc:creator>MinhNguyen</dc:creator>
      <dc:date>2023-09-06T09:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: 2D Length for Railing panel?</title>
      <link>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/398552#M5641</link>
      <description>&lt;P&gt;Oh I see. During check script global variables might not be filled with sensible geometric data like they would when the object is placed in the plan.&lt;/P&gt;
&lt;P&gt;Check with vardim1 whether the array size is good for your calculations.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 11:19:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/2D-Length-for-Railing-panel/m-p/398552#M5641</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2023-09-18T11:19:15Z</dc:date>
    </item>
  </channel>
</rss>

