- (defun c:GetPt( / ent pt1 pt2 ss i ptL1 ptL2 pts)
- (setq ent (car (entsel "选择竖线...")))
- (setq pt1 (cdr (assoc 10 (entget ent))))
- (setq pt2 (cdr (assoc 11 (entget ent))))
- (setq ss (ssget "f" (list pt1 pt2) '((0 . "line"))))
- (ssdel ent ss)
- (setq i 0)
- (repeat (sslength ss)
- (setq ent (ssname ss i))
- (setq ptL1 (cdr (assoc 10 (entget ent))))
- (setq ptL2 (cdr (assoc 11 (entget ent))))
- (setq ptInter (inters pt1 pt2 ptL1 ptL2))
- (if (equal ptL1 ptInter 0.00001)
- (setq pts (append pts (list ptL2)))
- (setq pts (append pts (list ptL1)))
- )
- (setq i (1+ i))
- )
- pts
- )
-
|