<?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: getting first intersecting 3dsolid and intersection point value along a line in autolisp. in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12106101#M27034</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6591997"&gt;@hosneyalaa&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the reply. I've added the sample drawing.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jul 2023 07:20:33 GMT</pubDate>
    <dc:creator>ShricharanaB</dc:creator>
    <dc:date>2023-07-17T07:20:33Z</dc:date>
    <item>
      <title>getting first intersecting 3dsolid and intersection point value along a line in autolisp.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12101375#M27032</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to check for the first 3d solid along a line. This line would be a starting point and the direction. The idea of this being, inserting a dynamic block at the starting point and extend it till the first intersection using dynamic stretch and parameter.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This has to be independent of&amp;nbsp; current view. And the code will always run in WCS (even if the current view is different).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've shown here the line (just for representing, I'd just have a starting point and its angles)&amp;nbsp; and there are three random 3d solids on it's path. I want to get the first intersection point (on the green cube face). note that these are just to get across the idea and may not be actual situations.&amp;nbsp; the 3d solid may have any shape.&lt;/P&gt;&lt;P&gt;This 3d solid can be in any layer or have any color.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ShricharanaB_1-1689324583687.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1240439i32162A6F48707C55/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ShricharanaB_1-1689324583687.png" alt="ShricharanaB_1-1689324583687.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ShricharanaB_2-1689324785857.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1240443iB0FA407A963AFFAC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ShricharanaB_2-1689324785857.png" alt="ShricharanaB_2-1689324785857.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ShricharanaB_0-1689684175128.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1241834i07C6142BD879ADB6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ShricharanaB_0-1689684175128.png" alt="ShricharanaB_0-1689684175128.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;How can I go about getting this point?&lt;/P&gt;&lt;P&gt;I'm using AutoCAD Mechanical 2020.&lt;/P&gt;&lt;P&gt;Thanks in advance for any help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 12:41:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12101375#M27032</guid>
      <dc:creator>ShricharanaB</dc:creator>
      <dc:date>2023-07-18T12:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: getting first intersecting 3dsolid and intersection point value along a line in autolisp.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12103970#M27033</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Can you attached example drawing&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2023 16:01:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12103970#M27033</guid>
      <dc:creator>hosneyalaa</dc:creator>
      <dc:date>2023-07-15T16:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: getting first intersecting 3dsolid and intersection point value along a line in autolisp.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12106101#M27034</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6591997"&gt;@hosneyalaa&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the reply. I've added the sample drawing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 07:20:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12106101#M27034</guid>
      <dc:creator>ShricharanaB</dc:creator>
      <dc:date>2023-07-17T07:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: getting first intersecting 3dsolid and intersection point value along a line in autolisp.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12108783#M27035</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12961036"&gt;@ShricharanaB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;programmatically, using AutoLISP / Visual LISP, I think it will not be possible to get the intersection point between the 'line' and a '3d solid may have any shape'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can use some workarounds to get the point.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There will be some user interference to select the 3DSolid?&lt;BR /&gt;If not, the dwg will have only three 3DSolis?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 08:45:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12108783#M27035</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2023-07-18T08:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: getting first intersecting 3dsolid and intersection point value along a line in autolisp.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109071#M27036</link>
      <description>&lt;P&gt;Maybe this could help you?&lt;/P&gt;&lt;P&gt;Take the "New" option and give the 3 points defining the plane, then select your line.&lt;/P&gt;&lt;P&gt;This line will be Trimed/Extended to this plane, you just have to interrogate the end of this line to get its coordinates.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:int_3d ( / js nw_ucs dxf_ent dxf_10 dxf_11 p10_2d p11_2d p_int)
  (initget "New Current")
  (setq nw_ucs (getkword "\nUse UCS [New/Current] &amp;lt;Current&amp;gt;: "))
  (if (eq nw_ucs "New")
    (command "_.ucs" "_3point" pause pause pause)
  )
  (princ "\nSelect the line to Extend/Trim to a section plane: ")
  (while (null (setq js (ssget "_:S"  '((0 . "LINE")))))
    (princ "\nEmpty selection or not a line!")
  )
  (while js
    (setq
      dxf_ent (entget (ssname js 0))
      dxf_10 (trans (cdr (assoc 10 dxf_ent)) 0 1)
      dxf_11 (trans (cdr (assoc 11 dxf_ent)) 0 1)
      p10_2d (list (car dxf_10) (cadr dxf_10) 0.0)
      p11_2d (list (car dxf_11) (cadr dxf_11) 0.0)
      p_int (inters p10_2d p11_2d dxf_10 dxf_11 nil)
    )
    (cond
      (p_int
        (if (&amp;gt; (distance p_int p11_2d) (distance p_int p10_2d))
          (entmod (subst (cons 10 (trans p_int 1 0)) (assoc 10 dxf_ent) dxf_ent))
          (entmod (subst (cons 11 (trans p_int 1 0)) (assoc 11 dxf_ent) dxf_ent))
        )
      )
      (T
        (princ "\nLine parallel to the cutting plane!")
      )
    )
    (princ "\nSelect the line to Extend/Trim: &amp;lt;Enter for exit&amp;gt;: ")
    (setq js (ssget "_:S"  '((0 . "LINE"))))
  )
  (if (eq nw_ucs "New")
    (command "_.ucs" "_previous")
  )
  (prin1)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 18 Jul 2023 11:19:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109071#M27036</guid>
      <dc:creator>CADaSchtroumpf</dc:creator>
      <dc:date>2023-07-18T11:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: getting first intersecting 3dsolid and intersection point value along a line in autolisp.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109156#M27037</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/75977"&gt;@hmsilva&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The drawing may have all possible object types blocks, 3dsolids, meshes etc.&lt;/P&gt;&lt;P&gt;Currently idea is not to select 3d solids. But if a selection of made to select multiple 3d solids in one selection would it help?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/524107"&gt;@CADaSchtroumpf&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for taking your time for writing this code!.&lt;BR /&gt;How ever, the idea is to check for these intersections at multiple locations (may be in hundreds ) ( line starting at different locations, going parallelly , not from a single point)&amp;nbsp; as required and get the point so the distance between the line start point and the first intersection point can be found so that I can calculate the distance between the two.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I think the snapshots I added earlier may not be enough, attaching a snap which can make it clearer, I think.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ShricharanaB_1-1689682120823.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1241812iB652A52155C1122C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ShricharanaB_1-1689682120823.png" alt="ShricharanaB_1-1689682120823.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each point from which this should be done is dependent on something else. If I can figure out from one point I can do the same for the rest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 12:07:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109156#M27037</guid>
      <dc:creator>ShricharanaB</dc:creator>
      <dc:date>2023-07-18T12:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: getting first intersecting 3dsolid and intersection point value along a line in autolisp.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109336#M27038</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12961036"&gt;@ShricharanaB&lt;/a&gt;&amp;nbsp; try&lt;/P&gt;&lt;P&gt;from&amp;nbsp; link&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=40494.msg457913#msg457913" target="_blank"&gt;http://www.theswamp.org/index.php?topic=40494.msg457913#msg457913&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;;;Break 3d lines by a 3d Plane
;;;Author: Chen Qing Jun, qjchen
;;;Programed by: South China University of Technology
;;;date: 2011.12.19
;;;Note: the intersection function of Line and Plane, has the parameter of nil and T
;;;      For T, the line segment should pass through the plane
;;;      but it is not necessary for the nil parameter.
;;;      The plane defined by 3p is infinite.
;;; 
;;; http://www.theswamp.org/index.php?topic=40494.msg457913#msg457913
;;;
;;;_Some vector function, some get from gile's great function________________
;;;
(defun q:geo:is-3p-plane(p1 p2 p3)
 (&amp;gt; (q:vec:Len (q:vec:Norm (q:vec:cross* (q:vec:- p2 p1) (q:vec:- p3 p1)))) 1e-6)
)
(defun q:geo:is-samepoint(p1 p2) (&amp;lt; (distance p1 p2) 1e-5) )
(defun q:vec:+(v1 v2) (mapcar '+ v1 v2) )
(defun q:vec:-(v1 v2) (mapcar '- v1 v2) )
(defun q:vec:*c(v a) (mapcar '(lambda(x) (* x a)) v) )
(defun q:vec:dot*(v1 v2) (apply '+ (mapcar '* v1 v2)) )
(defun q:vec:cross*(v1 v2)
  (list (q:det:2 (cadr v1) (caddr v1) (cadr v2) (caddr v2))
        (q:det:2 (caddr v1) (car v1) (caddr v2) (car v2))
        (q:det:2 (car v1) (cadr v1) (car v2) (cadr v2))) 
)
;;;;cal determinant
;;;;|a1 a2|
;;;;|b1 b2|
(defun q:det:2(a1 a2 b1 b2)  (- (* a1 b2) (* a2 b1)))
;;;;Normalize a vector
(defun q:vec:Norm(v / l)
  (if (not (zerop (setq l (distance '(0 0 0) v))))
  (mapcar '(lambda(x) (/ x l)) v))
)
;;;;Vector Length
(defun q:vec:Len(v / l)  (distance '(0 0 0) v))
;;;;a normal to a plane, 
(defun q:geo:normal.to.3p(p1 p2 p3)
  (if (q:geo:is-3p-plane p1 p2 p3)(q:vec:cross* (q:vec:- p2 p1) (q:vec:- p3 p1)))
)
;;p1 p2 are two points,V is the normal of the plane, VP is one point on the plane
;;ref:   http://en.wikipedia.org/wiki/Line-plane_intersection
;;       http://softsurfer.com/Archive/algorithm_0104/algorithm_0104B.htm
(defun q:geo:line-intersect-plane-1(P1 P2 V VP F / d l n)
 (setq n (q:vec:Norm V) l (q:vec:Norm (q:vec:- P2 P1)))
 (if (not (zerop (q:vec:dot* l n)))
   (progn
     (setq d (/ (q:vec:dot* (q:vec:- VP P1) n) (q:vec:dot* l n)))
     (setq res (q:vec:+ P1 (q:vec:*c l d)))
     (setq temp (q:vec:Len (q:vec:- P2 P1)))
     (if (and F (or (&amp;lt; d 0) (&amp;gt; d (q:vec:Len (q:vec:- P2 P1))))) (setq res nil)) 
   )
 )
 res
)
;;;;;;______end of Vector function__________________________________;;;
(defun q:entmake:point(pt layer)
  (entmake (list (cons 0 "POINT")(cons 8 layer)(cons 10 pt)))
)
(defun q:mulentmod (ent numlst contentlst / i x)
  (setq i 0)
  (foreach x numlst
    (if (/= (assoc x ent) nil)
      (setq ent (subst (cons x (nth i contentlst)) (assoc x ent) ent ) )
      (setq ent (append ent (list (cons x (nth i contentlst))) ) )
    )
    (setq i (1+ i))
  )
  (entmod ent)  ;(entupd ent)
)
;;;;;stdlib from Reini Urban
(defun std-sslist (ss / n lst)
  (if (eq 'pickset (type ss))
    (repeat (setq n (fix (sslength ss))) ; fixed
      (setq lst (cons (ssname ss (setq n (1- n))) lst))
    )
  )
)
;;;???______by qjchen____________________________;;;
(defun c:PBL()
  (setq p1 (getpoint "\nThe first point:") p2 (getpoint "\nThe second point:") p3 (getpoint "\nThe third point:"))
  (if (q:geo:is-3p-plane p1 p2 p3)
    (progn 
      (setq c (std-sslist(ssget '((0 . "LINE")))))
      (setq pn (q:geo:normal.to.3p p1 p2 p3))
      (foreach x c
       (setq pa (cdr (assoc 10 (entget x))) pb (cdr (assoc 11 (entget x))))
       (setq int (q:geo:line-intersect-plane-1 pa pb pn p1 T))
       
       (if (and int (not (q:geo:is-samepoint int pa))(not (q:geo:is-samepoint int pb)))
	  (progn
            (q:mulentmod (entget (entmakex (entget x))) (list 62 11) (list 1 int))
	    ;(q:mulentmod (entget (entmakex (entget x))) (list 62 10) (list 2 int))
	    (entdel x)
	    ;(q:entmake:point int "0")
	 )
	 )
      )
    )
    (princ "\n These three points can not form a plane.")
  )
)

(princ)
(princ "\n Break 3d lines by a 3d Plane,by qjchen,the command is :test")
(princ)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&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="990.gif" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1241844iAE92C5F6BB1C0366/image-size/large?v=v2&amp;amp;px=999" role="button" title="990.gif" alt="990.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 13:27:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109336#M27038</guid>
      <dc:creator>hosneyalaa</dc:creator>
      <dc:date>2023-07-18T13:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: getting first intersecting 3dsolid and intersection point value along a line in autolisp.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109388#M27039</link>
      <description>&lt;P&gt;You coded too much...&lt;/P&gt;&lt;P&gt;I am afraid that OP don't know which 3DSOLID is first on detection... So IMHO, for each line user must obtain &lt;STRONG&gt;all intersecting&lt;/STRONG&gt; &lt;STRONG&gt;points&lt;/STRONG&gt; AFAIK only with IMPRINT command and for each line, OP should check for closest point to starting point... This is how I see this task... I may be wrong, but picking 3 points for plane definition is total miss of the task... So long from me... Bye...&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 13:54:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109388#M27039</guid>
      <dc:creator>marko_ribar</dc:creator>
      <dc:date>2023-07-18T13:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: getting first intersecting 3dsolid and intersection point value along a line in autolisp.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109556#M27040</link>
      <description>&lt;P&gt;The PBL command approach is all well and good if the first thing encountered has a flat face like that.&amp;nbsp; But "any shape" could be [for example] a sphere or cylinder or cone, or something very convoluted, for which that would not be a solution.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 14:47:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109556#M27040</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-07-18T14:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: getting first intersecting 3dsolid and intersection point value along a line in autolisp.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109663#M27041</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12961036"&gt;@ShricharanaB&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/75977"&gt;@hmsilva&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The drawing may have all possible object types blocks, 3dsolids, meshes etc.&lt;/P&gt;
&lt;P&gt;Currently idea is not to select 3d solids. But if a selection of made to select multiple 3d solids in one selection would it help?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/524107"&gt;@CADaSchtroumpf&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for taking your time for writing this code!.&lt;BR /&gt;How ever, the idea is to check for these intersections at multiple locations (may be in hundreds ) ( line starting at different locations, going parallelly , not from a single point)&amp;nbsp; as required and get the point so the distance between the line start point and the first intersection point can be found so that I can calculate the distance between the two.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I think the snapshots I added earlier may not be enough, attaching a snap which can make it clearer, I think.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ShricharanaB_1-1689682120823.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1241812iB652A52155C1122C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ShricharanaB_1-1689682120823.png" alt="ShricharanaB_1-1689682120823.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Each point from which this should be done is dependent on something else. If I can figure out from one point I can do the same for the rest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12961036"&gt;@ShricharanaB&lt;/a&gt;&amp;nbsp;I was thinking to use rays using the starting point and the direction&lt;BR /&gt;test each ray with all 3dsolids using the command 'PROJECTGEOMETRY' &lt;BR /&gt;test if new entities were added&lt;BR /&gt;test if the new entities are intersecting ray object using the IntersectWith method and store the resulting points in a list&lt;BR /&gt;find the nearest point to the start point&lt;BR /&gt;delete ray and the new entities&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it will be very slow&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;the idea is to check for these intersections at multiple locations (may be in hundreds)&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps, &lt;BR /&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 16:09:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109663#M27041</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2023-07-18T16:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: getting first intersecting 3dsolid and intersection point value along a line in autolisp.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109751#M27042</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;&lt;/P&gt;&lt;P&gt;Yes, as you explained So I asked from him to be attached Example drawing Let's see what he has shapes&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 15:58:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109751#M27042</guid>
      <dc:creator>hosneyalaa</dc:creator>
      <dc:date>2023-07-18T15:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: getting first intersecting 3dsolid and intersection point value along a line in autolisp.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109970#M27043</link>
      <description>&lt;P&gt;I expected that (ssget) using Fence selection with the Line endpoints would be the answer, because from it you can get all the things that the Fence intersects, in order, &lt;EM&gt;and&lt;/EM&gt; the locations at which it intersects them.&amp;nbsp; But it doesn't work -- there must be something peculiar about how it calculates where a Fence line "intersects" a 3D Solid.&amp;nbsp; I set up a very clean situation in which all the findings should be in whole-number values, but they're not.&amp;nbsp; It did, at least, in very limited trial, &lt;EM&gt;identify the first object&lt;/EM&gt; that the Fence encountered out of several, but did not report the right location for where it hit.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 17:29:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12109970#M27043</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-07-18T17:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: getting first intersecting 3dsolid and intersection point value along a line in autolisp.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12110003#M27044</link>
      <description>&lt;P&gt;Assuming that you have a collection of&lt;SPAN&gt;&amp;nbsp;3ds solids that "may have any shape" and you wish to find the first intersection of a line with that set of solids here is an approach that may be programmable in VLISP.&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;Union the set of solids together.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;sweep a small triangle using the line as a path.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Perform a Boolean intersect with the results of #1 and #2.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;align3d the results (solid and line) such that the intersection line is parallel to the x axis of the WCS.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Get the minimum x coordinated of the bounding box.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;place a point on the line with the x coordinate of #5.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Reverse the alignment that was done in step #4.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;The point is now at the first intersection!&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;Note, the task that you are asking is essentially done via &lt;A href="https://en.wikipedia.org/wiki/Z-buffering" target="_blank" rel="noopener"&gt;z-buffering&lt;/A&gt; during the rendering process. Perhaps a rendering engine that enables you to access the z-buffered result could be used.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 17:43:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12110003#M27044</guid>
      <dc:creator>leeminardi</dc:creator>
      <dc:date>2023-07-18T17:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: getting first intersecting 3dsolid and intersection point value along a line in autolisp.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12110791#M27045</link>
      <description>&lt;P&gt;Just a real guess, allowing for a tolerance of like 0.00001 if we make the line a solid then can subtract the shape from it. So get end points of solid line maybe a radius of 0.00000001 for a circle extruded along path. get answers then undo so original shape is returned.&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="SeaHaven_0-1689730618081.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1242102i228A1C51412A527E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1689730618081.png" alt="SeaHaven_0-1689730618081.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 01:37:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/getting-first-intersecting-3dsolid-and-intersection-point-value/m-p/12110791#M27045</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-07-19T01:37:11Z</dc:date>
    </item>
  </channel>
</rss>

