
- (defun c:tt ()
- (setq s1(car(entsel "选择大线"))
- s2(car(entsel "选择小线")))
- (setq lst (Vertexs s2))
- (if (pt-in lst s1)(princ "\n包含关系")(princ "\n非包含关系"))
- (prin1)
- )
- (defun pt-in(lst ename)
- (setq i 0)
- (setq n (length lst))
- (while (and(< (setq i (1+ i)) n)(= (distance (vlax-curve-getClosestPointTo ename (setq pt (nth i lst))) pt)0)))
- (setq ret(if (< i n) nil T))
- )
- (defun Vertexs (s1 / lst);取得多段线顶点表
- (setq lst (entget s1)
- lst (vl-remove-if-not '(lambda (x) (= (car x) 10)) lst)
- lst (mapcar 'cdr lst)
- )
- )
|