<?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 Joining 3d points with 3D polyline? in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/joining-3d-points-with-3d-polyline/m-p/11275620#M54392</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am wondering if there is a way to join a set of 3D points with a 3D polyline to generate a section profile of a 3D topographical survey.&lt;/P&gt;&lt;P&gt;I have found a lisp file that generates points at the apparent intersection of 3D polylines and a 2d polyline denoting the "cutting plane" (see image below). If you need any more information on what I'm looking for please don't hesitate to ask.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lwindsor73_0-1656930215780.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1087450i32AB5CE4245E50E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lwindsor73_0-1656930215780.png" alt="lwindsor73_0-1656930215780.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jul 2022 10:26:19 GMT</pubDate>
    <dc:creator>lwindsor73</dc:creator>
    <dc:date>2022-07-04T10:26:19Z</dc:date>
    <item>
      <title>Joining 3d points with 3D polyline?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/joining-3d-points-with-3d-polyline/m-p/11275620#M54392</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am wondering if there is a way to join a set of 3D points with a 3D polyline to generate a section profile of a 3D topographical survey.&lt;/P&gt;&lt;P&gt;I have found a lisp file that generates points at the apparent intersection of 3D polylines and a 2d polyline denoting the "cutting plane" (see image below). If you need any more information on what I'm looking for please don't hesitate to ask.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lwindsor73_0-1656930215780.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1087450i32AB5CE4245E50E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lwindsor73_0-1656930215780.png" alt="lwindsor73_0-1656930215780.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 10:26:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/joining-3d-points-with-3d-polyline/m-p/11275620#M54392</guid>
      <dc:creator>lwindsor73</dc:creator>
      <dc:date>2022-07-04T10:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Joining 3d points with 3D polyline?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/joining-3d-points-with-3d-polyline/m-p/11275843#M54393</link>
      <description>&lt;P&gt;I believe Autodesk Civil 3D has several functions that can do exactly that. In a vanilla AutoCAD you are probably stuck with a lisp function to generate the line for you, or to do it manually.&lt;BR /&gt;&lt;BR /&gt;A lisp for this shouldn't be too complicated the issue is how to determine the correct order of the points. I think the lisp you already have could be expanded to generate a 3D pline in addition to creating the points. If you share it here I'll see what I can do.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Otherwise the people at the &lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bd-p/130" target="_blank" rel="noopener"&gt;customization forums&lt;/A&gt;, can also help.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 12:22:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/joining-3d-points-with-3d-polyline/m-p/11275843#M54393</guid>
      <dc:creator>Michiel.Valcke</dc:creator>
      <dc:date>2022-07-04T12:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Joining 3d points with 3D polyline?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/joining-3d-points-with-3d-polyline/m-p/11275914#M54394</link>
      <description>&lt;P&gt;Hi there, I've attached the lisp file that I found to generate the points, I'm relatively new to it so haveb't a clue about how the program works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the link to the thread of where the file came from.&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/creating-points-at-3d-polyline-intersections/td-p/9691490" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/creating-points-at-3d-polyline-intersections/td-p/9691490&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there's anything else you need please let me know.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 13:05:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/joining-3d-points-with-3d-polyline/m-p/11275914#M54394</guid>
      <dc:creator>lwindsor73</dc:creator>
      <dc:date>2022-07-04T13:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Joining 3d points with 3D polyline?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/joining-3d-points-with-3d-polyline/m-p/11276219#M54395</link>
      <description>&lt;P&gt;Since the Points will always be in a straight line in XY terms, no matter what their order from the order of the contours' virtual intersections with the straight guide path, it should be possible to sort them by either X or Y coordinate, and apply their coordinates to a new 3DPolyline.&amp;nbsp; The concept [not tested except most of the pieces in isolation, nor assembled into an actual routine yet]:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Add each Point's location to a list as it's created, i.e. add &lt;STRONG&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;this&lt;/FONT&gt;&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="2" color="#999999"&gt;....&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#999999"&gt;&amp;nbsp; &amp;nbsp; (vlax-release-object obj_point)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&amp;nbsp; &amp;nbsp;&lt;STRONG&gt; (setq ptlist (cons (cdr (assoc 10 (entget (entnext)))) ptlist))&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#999999"&gt;&amp;nbsp; );while Inters_list&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#999999"&gt;....&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then after it's done making all the points, you'll have a list of all their locations.&amp;nbsp; I assume [without studying the code deeply] that the order of that list will be affected by the drawing order of the contours, in which case sort them by [arbitrarily] X coordinates:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &lt;STRONG&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;(setq ptlist (vl-sort ptlist '(lambda (a b) (&amp;lt; (car a) (car b))))&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[If the guide line might ever be &lt;EM&gt;parallel to the Y axis&lt;/EM&gt; so the X coordinates of the Points are all the same, a check could be added for that, and if it finds that condition, it could sort by Y coordinates instead.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then string all those coordinates together into one undifferentiated list, the way they're stored in a 3DPolyline's VLA properties:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;STRONG&gt;&amp;nbsp; (setq ptscoords (apply 'append ptlist))&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have the routine draw any simple initial 3DPolyline, and make a VLA object of it:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;STRONG&gt;&amp;nbsp; (command "_.3dpoly" '(0 0 0) '(1 0 0) "")&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;STRONG&gt;&amp;nbsp; (setq 3dp (vlax-ename-&amp;gt;vla-object (entlast)))&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and &lt;EM&gt;impose that coordinates list on it&lt;/EM&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; (vlax-put 3dp 'coordinates ptscoords)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 15:57:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/joining-3d-points-with-3d-polyline/m-p/11276219#M54395</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2022-07-04T15:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Joining 3d points with 3D polyline?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/joining-3d-points-with-3d-polyline/m-p/11276263#M54396</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;something similar was my idea as well.&lt;BR /&gt;&lt;BR /&gt;I'm not sure that the points would always have been sortable, that's why I wanted to take a list from within the lisp routine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12592381"&gt;@lwindsor73&lt;/a&gt;&amp;nbsp;I have added Kent's code to your lisp (untested) download it from here and try it out. All credit goes to&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;don't forget to thank him with a like or mark his post as a solution.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 16:34:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/joining-3d-points-with-3d-polyline/m-p/11276263#M54396</guid>
      <dc:creator>Michiel.Valcke</dc:creator>
      <dc:date>2022-07-04T16:34:37Z</dc:date>
    </item>
  </channel>
</rss>

