<?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: How to obtain the X and Y coordinates of vertices on curves or line segments in GDL programming in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/398230#M5621</link>
    <description>&lt;P&gt;Hello: Thank you for your guidance. I will continue to explore&lt;/P&gt;</description>
    <pubDate>Thu, 14 Sep 2023 11:51:15 GMT</pubDate>
    <dc:creator>baixiaodong</dc:creator>
    <dc:date>2023-09-14T11:51:15Z</dc:date>
    <item>
      <title>How to obtain the X and Y coordinates of vertices on curves or line segments in GDL programming</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397760#M5535</link>
      <description>&lt;P&gt;How to obtain the X and Y coordinates of vertices on a curve or line segment in GDL writing, and drive a point on another line segment through these coordinates?&lt;/P&gt;&lt;P&gt;I am planning to use the REVOLVE command to create a jar model. The upper and lower materials of the jar model are different, and the REVOLVE command cannot allocate different materials for the weft part. Therefore, I need to use two REVOLVE commands to create the upper and lower parts of the jar separately, in order to meet the requirements of attaching different materials. As the jar model is parameterized, the upper and lower parts will be linked and seamlessly connected, This requires the vertex at the end of the lower part to drive the starting vertex of the upper part. I think so, but I haven't found a feasible method yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2023 15:59:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397760#M5535</guid>
      <dc:creator>baixiaodong</dc:creator>
      <dc:date>2023-09-10T15:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain the X and Y coordinates of vertices on curves or line segments in GDL programming</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397782#M5543</link>
      <description>&lt;P&gt;I am not quite sure I understand your problem.&lt;/P&gt;
&lt;P&gt;You must give the coordinates for the curve profile, so you already know them.&lt;/P&gt;
&lt;P&gt;So if it was all one material, there would be no issue.&lt;/P&gt;
&lt;P&gt;If using two materials, you just break the curve profile into two separate REVOLVEs.&lt;/P&gt;
&lt;P&gt;The last point of the first REVOLVE is the first point of the second REVOLVE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;They will both be using the same center (axis) for the revolve, so there should be no issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise can you provide an image showing the problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 01:10:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397782#M5543</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2023-09-11T01:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain the X and Y coordinates of vertices on curves or line segments in GDL programming</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397797#M5549</link>
      <description>&lt;P&gt;Hello: Thank you for your attention. That's what you mean, but I don't know how to operate it. Attached are the pictures below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The length, diameter, and inclination of the bottle cap should all be linked with the bottle body, and when the bottle body changes, the cap also needs to change. To drive the first vertex of the bottle cap with the last vertex of the bottle body.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="捕获.JPG" style="width: 657px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/45572i4B0D6B4B3BA41215/image-size/large?v=v2&amp;amp;px=999" role="button" title="捕获.JPG" alt="捕获.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 05:30:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397797#M5549</guid>
      <dc:creator>baixiaodong</dc:creator>
      <dc:date>2023-09-11T05:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain the X and Y coordinates of vertices on curves or line segments in GDL programming</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397800#M5550</link>
      <description>&lt;P&gt;The bottom coordinate for the cap is the same for the top of the glass.&lt;/P&gt;
&lt;P&gt;So it would be as if you have one profile, but you just break it where the glass and cap meet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BarryKelly_0-1694412134116.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/45573i20670C07537157D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BarryKelly_0-1694412134116.png" alt="BarryKelly_0-1694412134116.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;Barry.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 06:02:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397800#M5550</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2023-09-11T06:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain the X and Y coordinates of vertices on curves or line segments in GDL programming</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397801#M5551</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/30144"&gt;@baixiaodong&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why not just drawing it in your 2D plan view and drag and dropping the linework in your 2D script ? Then you could just make it parametric by changing the coordinates accordingly. Don't forget to base the sketch around the origin of your plan view.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 06:09:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397801#M5551</guid>
      <dc:creator>MetalFingerz</dc:creator>
      <dc:date>2023-09-11T06:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain the X and Y coordinates of vertices on curves or line segments in GDL programming</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397818#M5555</link>
      <description>&lt;P&gt;When drawing lines in a plan view, the data of the points is too large and irregular, often exceeding ten decimal places. Additionally, it is not very convenient to parameterize&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 08:41:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397818#M5555</guid>
      <dc:creator>baixiaodong</dc:creator>
      <dc:date>2023-09-11T08:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain the X and Y coordinates of vertices on curves or line segments in GDL programming</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397851#M5556</link>
      <description>&lt;P&gt;Or is there a possibility that the REVOLVE command can hide rotating faces that do not need to be displayed, and hide the faces generated between two vertices&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 14:51:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397851#M5556</guid>
      <dc:creator>baixiaodong</dc:creator>
      <dc:date>2023-09-11T14:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain the X and Y coordinates of vertices on curves or line segments in GDL programming</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397911#M5610</link>
      <description>&lt;P&gt;Only the first and last (base &amp;amp; top) surfaces.&lt;/P&gt;
&lt;P&gt;Not surfaces in between.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if you could there would be a gap and you could see into the bottle.&lt;/P&gt;
&lt;P&gt;So I am not sure why you would want to do that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am lazy.&lt;/P&gt;
&lt;P&gt;If you have the REVOLVE for the bottle, post it here and I will show you how to do the cap.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 01:44:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397911#M5610</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2023-09-12T01:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain the X and Y coordinates of vertices on curves or line segments in GDL programming</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397934#M5612</link>
      <description>&lt;P&gt;Water needs to be placed inside, and the water and bottle body will interact under the influence of parameters&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;poly2_ 11,15,
-0.025,0,1,
-0.01,1,800,
-0.01,0.022,1001,
-0.01,0.023,1,
0.01,90,2001,
-0.1,0,301, !Bottle height
-0.1-0.02,0.005,900,
0,45,4001,
0.022,- 45,2001,
0,0,300, ! Bottle mouth height
0,0,-1



poly2_ 10,15, ! Outer bottle
-0.01,0,1,
-0.01,1,800,
0,0.022,1001,
0,0.022+0.005,1,
0.008,90,2001,
-0.1-0.012,0,301,
-0.1-0.02,0.005,900,
0,45,4001,
0.022-0.002,- 45,2001,
0,0,300     ! Bottle mouth height&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 12 Sep 2023 23:53:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397934#M5612</guid>
      <dc:creator>baixiaodong</dc:creator>
      <dc:date>2023-09-12T23:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain the X and Y coordinates of vertices on curves or line segments in GDL programming</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397957#M5614</link>
      <description>&lt;P&gt;You have a very wide neck on your bottle - I did not alter this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I did was took your polylines and paste in the 2d script.&lt;/P&gt;
&lt;P&gt;Viewed those in the 2D view.&lt;/P&gt;
&lt;P&gt;Placed a marquee around it and copied.&lt;/P&gt;
&lt;P&gt;Pasted this in the 2D symbol window.&lt;/P&gt;
&lt;P&gt;Created a fill from the result but left a small gap above the y-axis - mask values in REVOLVE can close this gap.&lt;/P&gt;
&lt;P&gt;Manually draw the fill from the start working anti-clockwise - this will give you the proper start and end point in the correct order.&lt;/P&gt;
&lt;P&gt;Otherwise if you magic wand the fill, you will have to figure out the start and end points and re-arrange them in the script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BarryKelly_0-1694507160987.png" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/45618iE337AB73A6A7237A/image-size/large?v=v2&amp;amp;px=999" role="button" title="BarryKelly_0-1694507160987.png" alt="BarryKelly_0-1694507160987.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I made a fill to represent the neck of the bottle (as I said it is a bit wide, but just went with what you had drawn).&lt;/P&gt;
&lt;P&gt;Now select those fills and drag them into the 2D script - this will create code for those polygons.&lt;/P&gt;
&lt;P&gt;I could have probably worked from your polygons, but I would have had to work out the order of the points - and as I said before I am lazy!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The polygon generated this way is what you need for the REVOLVEs.&lt;/P&gt;
&lt;P&gt;You only need the x,y co-ordinates, so copy then to the 3D script and add the actual REVOLVE command instead of the POLY2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you should end up with is this.&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;!!!neck
REVOLVE       7,      360,      1*0+2*0+4*1+8*1+16*1+32*1+64*0,

        -0.1553553390593, 0.02035533905933,      1, 		!!!bottom of cap
        -0.1773274563337, 0.02035533905933,      1, 
        -0.1773274563337, 0.02329906375881,      1,
        -0.1773274563337, 0.02329906375881,      1, 
        -0.1872900866456, 0.02329906375881,      1, 
        -0.1872900866456, 0.01835533905933,      1, 
        -0.1553553390593, 0.01835533905933,      1 

!!!bottle
REVOLVE       24,      360,      1*1+2*1+4*1+8*1+16*1+32*1+64*0,
 

        -0.009992499015367,        0.001,      1, 			!!!start point
        0.01857142857143, 0.0002857142857143,    900, 
                   0, -48.02837615769,   4001, 
                   0,        0.027,      1, 
              -0.008,        0.027,    900, 
                   0,           90,   4001, 
               -0.12,        0.035,      1, 
               -0.12,        0.005,    900, 
                   0,           45,   4001, 
        -0.1553553390593, 0.04035533905933,    900, 
                   0,          -45,   4001, 				!!!top of bottle
        -0.1553553390593, 0.02035533905933,      1,		 	!!!bottom of cap
        -0.1553553390593, 0.01835533905933,      1, 
        -0.1553553390593, 0.04035533905933,    900, 
                   0,           45,   4001,
        -0.1397989898732, 0.02479898987322,      1, 
               -0.12,        0.005,    900, 
                   0,          -45,   4001, 
               -0.02,        0.033,      1, 
               -0.02,        0.023,    900, 
                   0,          -90,   4001, 
               -0.01,        0.022,      1, 
        -0.001708278580815, 0.0002329172141919,    900, 
                   0, 67.25948321345,   4001				!!!end point
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Adjusting the masking values to show the top and base for the bottle, but hide for the neck as you want that open.&lt;/P&gt;
&lt;P&gt;If you want to close the top, then rearrange the co-ordinates so the first and last points are the 2 co-ordinates for the top of the neck and leave the top and bottom surface mask values as '1'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should have a bottle with a wide neck.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BarryKelly_1-1694507672669.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/45621iB4DFD19B8E59EB15/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BarryKelly_1-1694507672669.png" alt="BarryKelly_1-1694507672669.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;Add another REVOLVE for the liquid inside.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to make the bottle size parametric, that is a bit more involved.&lt;/P&gt;
&lt;P&gt;You will have to work out the co-ordinates that you want to be parametric and replace them with parameters.&lt;/P&gt;
&lt;P&gt;Or you can just use the MUL command to stretch x, y, and/or z axis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or just use the bottle objects in the default library?&lt;/P&gt;
&lt;P&gt;Have a look at the scripts for the champagne bottle - that is all they have done for that one - REVOLVEs and MULs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 08:45:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/397957#M5614</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2023-09-12T08:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain the X and Y coordinates of vertices on curves or line segments in GDL programming</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/398230#M5621</link>
      <description>&lt;P&gt;Hello: Thank you for your guidance. I will continue to explore&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 11:51:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/398230#M5621</guid>
      <dc:creator>baixiaodong</dc:creator>
      <dc:date>2023-09-14T11:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain the X and Y coordinates of vertices on curves or line segments in GDL programming</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/398317#M5626</link>
      <description>&lt;P&gt;Try this command, You can allocate material for every segment.&lt;BR /&gt;REVOLVE{2} n, alphaOffset, alpha, mask,&lt;STRONG&gt; sideMat,&lt;/STRONG&gt;&lt;BR /&gt;x1, y1, s1, mat1, ..., xn, yn, sn, matn&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 06:13:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/398317#M5626</guid>
      <dc:creator>Pertti Paasky</dc:creator>
      <dc:date>2023-09-15T06:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain the X and Y coordinates of vertices on curves or line segments in GDL programming</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/398522#M5638</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 03:12:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-obtain-the-X-and-Y-coordinates-of-vertices-on-curves-or/m-p/398522#M5638</guid>
      <dc:creator>baixiaodong</dc:creator>
      <dc:date>2023-09-18T03:12:54Z</dc:date>
    </item>
  </channel>
</rss>

