<?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: intersections between 3dpoly in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7721560#M109634</link>
    <description>&lt;P&gt;Are you looking for their point of apparent intersection as you would look at them in plan view, or do you know that they really have a 3D point of intersection?&lt;/P&gt;
&lt;P&gt;If it is the former, then you could temporarily flatten them to get the intersection point(s).&amp;nbsp; Then you could get the intersection parameters, unflatten them, and get the points at the params.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jan 2018 02:01:24 GMT</pubDate>
    <dc:creator>john.uhden</dc:creator>
    <dc:date>2018-01-25T02:01:24Z</dc:date>
    <item>
      <title>intersections between 3dpoly</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7719713#M109631</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have multiple intersections between 3dpoly ...&lt;BR /&gt;For which "intersectwith" method can not be applied.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I intend to do is add a vertex to each of the 3dpoly at the intersection between them, with Z being the average of the apparent intersections elevations. (Goal 1)&lt;BR /&gt;... If it is possible, the tolerance between elevations will eventually be requested and the intersections that have exceeded tolerance will be marked. (Goal 1+)&lt;BR /&gt;&lt;BR /&gt;I&amp;nbsp;am aware&amp;nbsp;of the fact that it's complex work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... I think I would be content with trimming the intersection area locally (Goal 2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;AoS&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 20:12:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7719713#M109631</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-24T20:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: intersections between 3dpoly</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7720482#M109632</link>
      <description>&lt;P&gt;Goal 2 is pretty simple to do manually.&amp;nbsp; Draw a Circle of the intended size anywhere.&amp;nbsp; Set &lt;STRONG&gt;APP&lt;/STRONG&gt;arent-Intersection as the one running Object-Snap mode.&amp;nbsp; Select the Circle, grab its midpoint grip, and go into Copy mode, and plonk it at all the apparent intersections.&amp;nbsp; Trim using the Circles as cutting edges.&amp;nbsp; Erase the Circles [which will be the Previous selection].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did it in your sample drawing, and it took&amp;nbsp;about a minute and a half.&amp;nbsp; You could do a lot of those in the time it would take to come up with a routine to automate Goal 1.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 20:32:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7720482#M109632</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-01-24T20:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: intersections between 3dpoly</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7721030#M109633</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Goal 2 is pretty simple to do manually.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, Mr. Cooper&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's what I did in the attached example.&lt;BR /&gt;Please imagine hundreds of such intersections in many kilometers of topographical survey.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;AoS&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 21:27:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7721030#M109633</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-24T21:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: intersections between 3dpoly</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7721560#M109634</link>
      <description>&lt;P&gt;Are you looking for their point of apparent intersection as you would look at them in plan view, or do you know that they really have a 3D point of intersection?&lt;/P&gt;
&lt;P&gt;If it is the former, then you could temporarily flatten them to get the intersection point(s).&amp;nbsp; Then you could get the intersection parameters, unflatten them, and get the points at the params.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 02:01:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7721560#M109634</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2018-01-25T02:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: intersections between 3dpoly</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7724194#M109635</link>
      <description>&lt;P&gt;Hello John,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have specified in my first post that the "intersectwith" method does not work. So is a veritable 3D intersection.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I can form a list with the x and y coordinates of the plane intersection point using the function LM:intersections (Thanks Lee Mac!).&lt;BR /&gt;I do not know how to get the two levels of this intersection.&lt;BR /&gt;I want to introduce in the list of x and y the Z obtained as average of the two levels, and then to use this new list to introduce vertexes on both 3dpoly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;AoS&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 18:47:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7724194#M109635</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-25T18:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: intersections between 3dpoly</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7724271#M109636</link>
      <description>I was trying to explain that if you temporarily flatten the 3D polys into&lt;BR /&gt;2D polys (at the same elevation), then you can use intersectwith to find&lt;BR /&gt;the 2D coordinates and the get the paramatpoint for each.  For polylines,&lt;BR /&gt;parameters increase by 1 for each vertex so that a param of 0.5 is&lt;BR /&gt;literally hallway between the 1st and 2nd vertices, no matter whether the&lt;BR /&gt;polyline is 2D or 3D.&lt;BR /&gt;Then you can get each 3D point by using getpointatparam.&lt;BR /&gt;You don't have to use the FLATTEN command.  Instead you can (setq coords&lt;BR /&gt;(vlax-get object 'Coordinates)), change all their Z values to zero (I can&lt;BR /&gt;show you how if you need), (vlax-put object 'Coordinates zeros) for each&lt;BR /&gt;and then vla-intersectwith.  After that (vlax-put object 'Coordinates&lt;BR /&gt;coords) to return them to 3D.&lt;BR /&gt;&lt;BR /&gt;Just be careful because getcoordinates returns a flat list (x1 y1 z1 x2 y2&lt;BR /&gt;z2 xn yn zn) and they must be put back as a flat list, but I can show you&lt;BR /&gt;how if you need.</description>
      <pubDate>Thu, 25 Jan 2018 19:06:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7724271#M109636</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2018-01-25T19:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: intersections between 3dpoly</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7724400#M109637</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1119496"&gt;@aosrom&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;BR /&gt;I do not know how to get the two levels of this intersection.&lt;BR /&gt;I want to introduce in the list of x and y the Z obtained as average of the two levels....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Once you get the XY apparent intersections somehow, you can use the (vlax-curve-getClosestPointToProjection) function [&lt;A href="http://help.autodesk.com/view/ACD/2018/ENU/?guid=GUID-23A1B8CE-9FF5-482C-AF32-3EE48784B905" target="_blank"&gt;read about it&lt;/A&gt;] to find where that falls on each Polyline.&amp;nbsp; You might find it helpful to Search for examples of its usage in this Forum.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 19:46:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7724400#M109637</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-01-25T19:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: intersections between 3dpoly</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7724434#M109638</link>
      <description>&lt;P&gt;Hi Adrian,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code below will add the intersection vertex to each 3D polyline; I've only tested it on the drawing you provided.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It uses the method John Uhden described:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Determine the intersection points using flattened copies of the selected 3D polylines i.e. Z = 0.0.&lt;/LI&gt;&lt;LI&gt;Get the parameter (ParmAtPoint)&amp;nbsp;at the intersection point of the&amp;nbsp;flattened polylines.&lt;/LI&gt;&lt;LI&gt;Use the parameter to get the 3D intersection point on each 3D polyline.&lt;/LI&gt;&lt;LI&gt;Add the 3D intersection point to the coordinates of the 3D polyline.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I've processed the intersections of the flattened 3D polylines inside a block definition.&lt;/P&gt;&lt;P&gt;I use a block definition&amp;nbsp;as a "sandbox" where modifications are made to copies&amp;nbsp;of the existing selected 3D polylines leaving the&amp;nbsp;originals unchanged.&lt;/P&gt;&lt;P&gt;Also if an error occurs, the original 3D polylines remain unchanged and any modified geometry only exists in the block definition which can be purged.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The modified 3D polylines are grip selected which shows a grip at all the vertices.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Trevor&lt;/P&gt;&lt;PRE&gt;;;  3DPolyInters.lsp by Trevor Bird
;;
;;  2018-01-25

;;------------------------------------------------------------------------------
(defun c:3dpolyinters
  (
    /

    Block_Name

    color_int
    col_Block
    col_Blocks
    Coordinates1_list
    Coordinates1_sa
    Coordinates1_var
    Coordinates2_list
    Coordinates2_sa
    Coordinates2_var
    Coordinates3_list
    Coordinates3_sa
    Coordinates3_var
    Coordinates4_list
    Coordinates4_sa
    Coordinates4_var

    dps_Params1
    dps_Params2

    EndParam1
    EndParam2

    flag_Intersects

    Inters1_list
    Inters1_Point
    Inters1_sa
    Inters1_var

    list_params1
    list_params2

    Objects1_sa
    Objects2_list
    Objects2_var
    obj_AD
    obj_POLYLINE1
    obj_POLYLINE1:2D
    obj_POLYLINE1:3D
    obj_POLYLINE2
    obj_POLYLINE2:2D
    obj_POLYLINE2:3D

    Param1
    Param2
    ParamAtPoint1
    ParamAtPoint2
    PointAtParam1:3D
    PointAtParam1_list
    PointAtParam2:3D
    PointAtParam2_list
    POLYLINE1_ename
    POLYLINE2_ename

    ssC1
    ssC2
    ss_Filter
    ss_length1
    ss_length2
    ss_modified
    ss_POLYLINES
    StartParam1
    StartParam2
    sv_cvport
  )
  (setq obj_AD      (vlax-get-property (vlax-get-acad-object) 'ActiveDocument)
        col_Blocks  (vlax-get-property obj_AD 'Blocks)

        sv_cvport   (getvar 'CVPORT)
  );setq

  (setq ss_Filter
    '(
      (0 . "POLYLINE")
      (-4 . "&amp;amp;=")
      (70 . 8)
    );'
  );setq

  (if (= sv_cvport 1)
    (setq ss_Filter  (append ss_Filter (list (cons 410 (getvar 'CTAB)))))
    (setq ss_Filter  (append ss_Filter '((410 . "Model"))))
  );if (= sv_cvport 1)




  (setq ss_POLYLINES  (ssget ":L" ss_Filter))

  (cond
    ( (not ss_POLYLINES)
      (princ "\nNo Polylines selected.")
    );(not ss_POLYLINES)


    (ss_POLYLINES
      ;;  &amp;lt;!--
      ;;  Do intersection processing inside a block definition so that construction geometry can be easily managed and deleted.
      (setq Block_Name  "3DPolyInters_DELETE_ME")

      (cond
        ( (not (tblsearch "BLOCK" Block_Name))
          (setq col_Block  (vlax-invoke-method col_Blocks 'Add (vlax-3D-point '(0.0 0.0 0.0)) Block_Name))

          (vlax-put-property col_Block 'BlockScaling acUniform)
          (vlax-put-property col_Block 'Explodable :vlax-true)
          (vlax-put-property col_Block 'Units (getvar 'InsUnits))
        )

        (T
          (setq col_Block  (vlax-invoke-method col_Blocks 'Item Block_Name))

          (vlax-for vf::objectcb col_Block
            (vlax-invoke-method vf::objectcb 'Delete)
          );vf::objectcb
        );T
      );cond
      ;;  --&amp;gt;


      (setq ssC1         -1
            ss_length1   (sslength ss_POLYLINES)
            color_int    0
            ss_modified  (ssadd)
      );setq

      (repeat ss_length1
        (setq POLYLINE1_ename    (ssname ss_POLYLINES (setq ssC1  (1+ ssC1)))
              obj_POLYLINE1      (vlax-ename-&amp;gt;vla-object POLYLINE1_ename)

              color_int          (1+ color_int)

              StartParam1        (vlax-curve-getStartParam obj_POLYLINE1)
              EndParam1          (vlax-curve-getEndParam obj_POLYLINE1)
              Param1             StartParam1
              dps_Params1        nil
              Coordinates1_list  nil
        );setq

        (repeat (1+ (fix EndParam1))
          (setq PointAtParam1_list  (vlax-curve-getPointAtParam obj_POLYLINE1 Param1)
                dps_Params1         (append dps_Params1 (list (cons Param1 PointAtParam1_list)))
                Coordinates1_list   (append Coordinates1_list (list (car PointAtParam1_list) (cadr PointAtParam1_list) 0.0))
                Param1              (+ Param1 1.0)
          );setq
        );repeat (1+ (fix EndParam1))


        ;;  &amp;lt;!-- Copy obj_POLYLINE1 into block created for intersection processing geometry.
        (setq Objects1_sa  (vlax-make-safearray vlax-vbObject '(0 . 0)))

        (vlax-safearray-fill Objects1_sa (list obj_POLYLINE1))

        (setq Objects2_var      (vlax-invoke-method obj_AD 'CopyObjects Objects1_sa col_Block)
              Objects2_list     (vlax-safearray-&amp;gt;list (vlax-variant-value Objects2_var))
              obj_POLYLINE1:2D  (car Objects2_list)
              obj_POLYLINE1:3D  (vlax-invoke-method obj_POLYLINE1:2D 'Copy)
        );setq


        ;;  Flatten obj_POLYLINE1:2D i.e. Z = 0.0
        (setq Coordinates1_sa  (vlax-make-safearray vlax-vbDouble (cons 0 (1- (length Coordinates1_list)))))

        (vlax-safearray-fill Coordinates1_sa Coordinates1_list)

        (setq Coordinates1_var  (vlax-make-variant Coordinates1_sa (logior vlax-vbArray vlax-vbDouble)))

        (vlax-put-property obj_POLYLINE1:2D 'Coordinates Coordinates1_var)
        (vlax-invoke-method obj_POLYLINE1:2D 'Update)
        ;;  --&amp;gt;


        ;;  &amp;lt;!-- Check for intersections with obj_POLYLINE1 and the rest of the 3D polylines selected.
        (setq ss_length2       (- ss_length1 (1+ ssC1))
              ssC2             ssC1
              flag_Intersects  nil
        );setq

        (repeat ss_length2
          (setq POLYLINE2_ename    (ssname ss_POLYLINES (setq ssC2  (1+ ssC2)))
                obj_POLYLINE2      (vlax-ename-&amp;gt;vla-object POLYLINE2_ename)

                StartParam2        (vlax-curve-getStartParam obj_POLYLINE2)
                EndParam2          (vlax-curve-getEndParam obj_POLYLINE2)
                Param2             StartParam2
                dps_Params2        nil

                Coordinates2_list  nil
          );setq

          (repeat (1+ (fix EndParam2))
            (setq PointAtParam2_list  (vlax-curve-getPointAtParam obj_POLYLINE2 Param2)
                  dps_Params2         (append dps_Params2 (list (cons Param2 PointAtParam2_list)))
                  Coordinates2_list   (append Coordinates2_list (list (car PointAtParam2_list) (cadr PointAtParam2_list) 0.0))
                  Param2              (+ Param2 1.0)
            );setq
          );repeat (1+ (fix EndParam2))


          ;;  &amp;lt;!-- Copy obj_POLYLINE2 into block created for intersection processing geometry.
          (setq Objects1_sa (vlax-make-safearray vlax-vbObject '(0 . 0)))

          (vlax-safearray-fill Objects1_sa (list obj_POLYLINE2))

          (setq Objects2_var      (vlax-invoke-method obj_AD 'CopyObjects Objects1_sa col_Block)
                Objects2_list     (vlax-safearray-&amp;gt;list (vlax-variant-value Objects2_var))
                obj_POLYLINE2:2D  (car Objects2_list)
                obj_POLYLINE2:3D  (vlax-invoke-method obj_POLYLINE2:2D 'Copy)
          );setq


          ;;  Flatten obj_POLYLINE2:2D i.e. Z = 0.0
          (setq Coordinates2_sa  (vlax-make-safearray vlax-vbDouble (cons 0 (1- (length Coordinates2_list)))))

          (vlax-safearray-fill Coordinates2_sa Coordinates2_list)

          (setq Coordinates2_var  (vlax-make-variant Coordinates2_sa (logior vlax-vbArray vlax-vbDouble)))

          (vlax-put-property obj_POLYLINE2:2D 'Coordinates Coordinates2_var)
          (vlax-invoke-method obj_POLYLINE2:2D 'Update)
          ;;  --&amp;gt;


          ;;  &amp;lt;!-- Check for intersection.
          (setq Inters1_var  (vlax-invoke-method obj_POLYLINE1:2D 'IntersectWith obj_POLYLINE2:2D acExtendNone)
                Inters1_sa   (vlax-variant-value Inters1_var)
          );setq

          (cond
            (  (not (minusp (vlax-safearray-get-u-bound Inters1_sa 1)))
              ;;  Intersects.
              (setq Inters1_list     (vlax-safearray-&amp;gt;list Inters1_sa)
                    flag_Intersects  T
              );setq

              (while Inters1_list
                (setq Inters1_Point  nil)

                (repeat 3
                  (setq Inters1_Point  (append Inters1_Point (list (car Inters1_list)))
                        Inters1_list   (cdr Inters1_list)
                  );setq
                );repeat 3

                (setq ParamAtPoint1     (vlax-curve-getparamatpoint obj_POLYLINE1:2D Inters1_Point)
                      ParamAtPoint2     (vlax-curve-getparamatpoint obj_POLYLINE2:2D Inters1_Point)

                      PointAtParam1:3D  (vlax-curve-getpointatparam obj_POLYLINE1:3D ParamAtPoint1)
                      PointAtParam2:3D  (vlax-curve-getpointatparam obj_POLYLINE2:3D ParamAtPoint2)
                );setq

                (if (not (assoc ParamAtPoint1 dps_Params1))
                  (setq dps_Params1  (append dps_Params1 (list (cons ParamAtPoint1 PointAtParam1:3D))))
                );if

                (if (not (assoc ParamAtPoint2 dps_Params2))
                  (setq dps_Params2  (append dps_Params2 (list (cons ParamAtPoint2 PointAtParam2:3D))))
                );if
              );while Inters1_list
              ;;  --&amp;gt;


              ;;  &amp;lt;!-- Reconstruct obj_POLYLINE2 3D polyline vertices to include additional vertices at intersections.
              ;;  Sort dps_Params2 in numerical order.
              (setq list_params2       (mapcar 'car dps_Params2)
                    list_params2       (vl-sort list_params2 '&amp;lt;)
                    dps_Params2        (mapcar '(lambda (_param2) (assoc _param2 dps_Params2)) list_params2)
                    Coordinates3_list  (apply 'append (mapcar 'cdr dps_Params2))
                    Coordinates3_sa    (vlax-make-safearray vlax-vbDouble (cons 0 (1- (length Coordinates3_list))))
              );setq

              (vlax-safearray-fill Coordinates3_sa Coordinates3_list)

              (setq Coordinates3_var  (vlax-make-variant Coordinates3_sa (logior vlax-vbArray vlax-vbDouble)))

              (vlax-put-property obj_POLYLINE2 'Coordinates Coordinates3_var)
              (vlax-invoke-method obj_POLYLINE2 'Update)

              (ssadd POLYLINE2_ename ss_modified)
              ;;  --&amp;gt;
            )

            (T
              ;;  No intersections.
            );T
          );cond


          (vlax-invoke-method obj_POLYLINE2:2D 'Delete)
          (vlax-invoke-method obj_POLYLINE2:3D 'Delete)

          (vlax-release-object obj_POLYLINE2:2D)
          (vlax-release-object obj_POLYLINE2:3D)


          (vlax-release-object obj_POLYLINE2)
        );repeat ss_length2


        ;;  Delete copied geometry from processing block.
        (vlax-invoke-method obj_POLYLINE1:2D 'Delete)
        (vlax-invoke-method obj_POLYLINE1:3D 'Delete)
        (vlax-release-object obj_POLYLINE1:2D)
        (vlax-release-object obj_POLYLINE1:3D)
        ;;  --&amp;gt;


        ;;  &amp;lt;!-- Reconstruct obj_POLYLINE1 3D polyline vertices to include additional vertices at intersections.
        (if flag_Intersects
          (progn
            ;;  Sort dps_Params1 in numerical order.
            (setq list_params1       (mapcar 'car dps_Params1)
                  list_params1       (vl-sort list_params1 '&amp;lt;)
                  dps_Params1        (mapcar '(lambda (_param1) (assoc _param1 dps_Params1)) list_params1)
                  Coordinates4_list  (apply 'append (mapcar 'cdr dps_Params1))
                  Coordinates4_sa    (vlax-make-safearray vlax-vbDouble (cons 0 (1- (length Coordinates4_list))))
            );setq

            (vlax-safearray-fill Coordinates4_sa Coordinates4_list)

            (setq Coordinates4_var  (vlax-make-variant Coordinates4_sa (logior vlax-vbArray vlax-vbDouble)))

            (vlax-put-property obj_POLYLINE1 'Coordinates Coordinates4_var)
            (vlax-invoke-method obj_POLYLINE1 'Update)

            ;;  For testing change color of obj_POLYLINE1.
;            (vlax-put-property obj_POLYLINE1 'Color color_int)

            (ssadd POLYLINE1_ename ss_modified)
          );progn
        );if flag_Intersects
        ;;  --&amp;gt;


        (vlax-release-object obj_POLYLINE1)
      );repeat ss_length1


      ;;  "Purge" intersection processing block.
      (vlax-invoke-method col_Block 'Delete)

      (vlax-release-object col_Block)


      ;;  Grip and select.
      (sssetfirst nil ss_modified)
    );ss_POLYLINES
  );cond


  (vlax-release-object col_Blocks)
  (vlax-release-object obj_AD)


  (princ)
);c:3dpolyinters




;;------------------------------------------------------------------------------
(princ "\n3DPolyInters loaded. Start command with 3DPOLYINTERS.")
(princ)&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Jan 2018 20:01:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7724434#M109638</guid>
      <dc:creator>trevor.bird.au</dc:creator>
      <dc:date>2018-01-25T20:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: intersections between 3dpoly</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7724566#M109639</link>
      <description>&lt;P&gt;Thanks everyone,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I will try to modify the Trevor function so that the elevation of the new vertex will be the average of the two elevations of the intersection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;AoS&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 20:44:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersections-between-3dpoly/m-p/7724566#M109639</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-25T20:44:52Z</dc:date>
    </item>
  </channel>
</rss>

