A plane intersecting splines

A plane intersecting splines

Anonymous
Not applicable
241 Views
1 Reply
Message 1 of 2

A plane intersecting splines

Anonymous
Not applicable
Hi,
I need some help with this problem:
I would like to make a cutting plane from three points then i would like to select some splines to find theirs intersection with the cutting plane and finally to draw a new spline across intersection points.
i would be very grateful if someone can help me, i am new in autolisp.
Tiago Carvalho
0 Likes
242 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Hi Tiago_Carvalho,
test and attempt with this code

(setq es1 (car (entsel "\nSelect a first line")))
(setq es2 (car (entsel "\nSelect a second line")))

(setq intersection_point (car (GetInters es1 es2 acExtendNone)))

(defun GetInters (firstobj nextobj mode / coord ptlst) ; by Joe
Burke
(vl-load-com)
(if
(= (type firstobj) 'ENAME)
(setq firstobj (vlax-ename->vla-object firstobj))
)
(if
(= (type nextobj) 'ENAME)
(setq nextobj (vlax-ename->vla-object nextobj))
)
(and
(setq coord (vlax-invoke firstobj 'IntersectWith nextobj mode))
(repeat
(/ (length coord) 3)
(setq ptlst (cons (list (car coord) (cadr coord) (caddr coord))
ptlst))
(setq coord (cdddr coord))
)
)
(reverse ptlst)
) ;end

wrote in message news:5138465@discussion.autodesk.com...
Hi,
I need some help with this problem:
I would like to make a cutting plane from three points then i would like to
select some splines to find theirs intersection with the cutting plane and
finally to draw a new spline across intersection points.
i would be very grateful if someone can help me, i am new in autolisp.
Tiago Carvalho
0 Likes