回望南山
记忆痕迹可以鲜明, 回望往事如数家珍——
posts - 177,  comments - 54,  trackbacks - 0

(defun CheckSamePoint (p / p0 i exit0)
  (setq i -1)
  (while (and intps
       (setq p0 (nth (setq i (1+ i)) intps))
       (not (setq exit0 (equal p p0 1e-4)))
  )
  )
  (princ exit0)
  exit0
)


;;求直线选择集交点, 滤重复点
(defun lnsinters (ss /  n m e1 e2 el el1 p1 p2 p3 p4 intp intps)
(if (and ss (> (sslength ss) 0))(progn
  (setq n -1)
  (while (setq e1 (ssname ss (setq n (1+ n))))
    (setq el (entget e1)
   m  n
   p1 (cdr (assoc 10 el))
   p2 (cdr (assoc 11 el))
    )
    (while (setq e2 (ssname ss (setq m (1+ m))))
      (setq el1  (entget e2)
     p3  (cdr (assoc 10 el1))
     p4  (cdr (assoc 11 el1))
     intp (inters p1 p2 p3 p4)
      )
      (if (and intp (not (CheckSamePoint intp)))
 (setq intps (cons intp intps))
      )
    )
  )
))
  intps
)


(defun c:tt ()
  (princ (lnsinters (ssget)))
  (princ)
)


Line选择集交点函数.LSP

posted on 2008-03-12 21:26 深藏记忆 阅读(267) 评论(0)  编辑  收藏 所属分类: Vlisp之韵

飘过是缘,相识最真

订阅到抓虾
google reader
gougou


点击这里给我发消息


<2008年3月>
2425262728291
2345678
9101112131415
16171819202122
23242526272829
303112345

常用链接

留言簿(5)

随笔分类

随笔档案

文章分类

文章档案

相册

收藏夹

八面来息

天天充电

同行者

积分与排名

  • 积分 - 58732
  • 排名 - 61

最新评论

阅读排行榜

评论排行榜