hehoubin 发表于 2012-11-18 00:21
能放子程序SSINTERS的源码吗
- (defun ssinters (ss / pts en1 en2)
- (while (> (sslength ss) 1)
- (setq en1 (ssname ss 0))
- (ssdel en1 ss)
- (setq n (sslength ss))
- (repeat n
- (setq en2 (ssname ss (setq n (1- n))))
- (setq pts (append pts (Curveinters en1 en2)))
- )
- )
- pts
- )
- (defun Curveinters (en1 en2 / pl pts)
- (setq pl (vlax-invoke (vlax-ename->vla-object en2) 'IntersectWith (vlax-ename->vla-object en1) acExtendNone))
- (while pl
- (setq pts (append pts (list (list (car pl) (cadr pl) (caddr pl))))
- pl (cdr (cdr (cdr pl)))
- )
- )
- pts
- )
|