With this code I can find the intersection point of a LINE with a POLYLINE or with a
POLYLINE .
;;*//*/*/*/*/*/*/*/*/*/*/*/*/**/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
(defun in-pt (ent#a ent#b / inter-point )
;;;(setq inter-point ())
(setq inter-point
(vlax-safearray->list
(vlax-variant-value
(vla-intersectwith
(vlax-ename->vla-object ent#a)
(vlax-ename->vla-object ent#b)
acExtendNone
) ;_end intersectwith
) ;_end vlax-variant-value
) ;_end vlax-safearray->list
) ;_setq
(setq list-puntos inter-point)
) ;_end defun
;;*//*/*/*/*/*/*/*/*/*/*/*/*/**/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
(defun c:inters ( / list-puntos linea linea# polilinea polilinea# )
(setq linea (entsel "\n seleccione la linea"))
(setq linea# (car linea))
(setq polilinea (entsel "\n Polilinea :"))
(setq polilinea# (car polilinea))
(in-pt linea# polilinea#)
(prin1 list-puntos)
);_end defun inters
(c:inters)
When I select a LINE with a POLYLINE it return me a LIST with 6 values , the 3 coordinates twice , as follow
(185728.0 997670.0 9.2 185728.0 997670.0 9.2)
But if I choose a LINE with a LWPOLYLINE, I get this , as it is to be espected.
(185699.0 997715.0 0.0)
Trying to know what happen I move both the LINE and LWPOLYLINE pair to share their
intersection with the POLYLINE and LINE, so the 4 are intersected at the same point.
And when I choose the POLYLINE with the LWPOLYLINE , I got this values
(185728.0 997670.0 9.2 185728.0 997670.0 9.2)
What is happening?
??