End of the day and i am here. :ugly:
Need to get the points in two lists with one intersection point nad 2 intersection points =>
Still do not understand why the ipp return the results only when the result is printed in ipp function. Took it from cabs lisp
(defun c:trim2 ()
;;funi
(defun ipp (obj1 obj2 / iplist)
(if (not (vl-catch-all-error-p
(setq iplist (vl-catch-all-apply
'vlax-safearray->list
(list
(vlax-variant-value
(vla-intersectwith obj1 obj2 0)
)
)
)
)
)
)
(princ)
(setq iplist nil)
)
(print iplist)
;;;ubratj potom
)
(defun ipp-corection (p / r)
(if (= (length p) 3)
(setq r p)
(princ)
)
(if (= (length p) 6)
(progn
(setq p1 (list
(car p)
(cadr p)
(caddr p)
)
)
(setq p (cdr (cdr (cdr p))))
(setq p2 (list
(car p)
(cadr p)
(caddr p)
)
)
(setq r (list p1 p2))
)
(setq r nil)
)
)
;;;voood
(setq ss1 (ssget));;;break
(setq ss2 (ssget));;;boundary
;;;rabota
(repeat (setq i1 (sslength ss1))
;;;;1
(setq e1 (vlax-ename->vla-object (ssname ss1 (setq i1 (1- i1)))))
(print i1)
(repeat (setq i2 (sslength ss2))
(print i2)
(setq pl0
(ipp-corection
(ipp e1
(vlax-ename->vla-object (ssname ss2 (setq i2 (1- i2))))
)
)
)
)
)
;;;1
)