- (defun C:EE0 (/ LIN PT1 PT2 PT3 WW1 WW2)
- (command "_.ucs" "w")
- (setq PT1 (getpoint "\n第一点: ")
- PT2 (getpoint PT1 "\n第二点: "))
- (grdraw PT1 PT2 3 1)
- (setq PT3 (getpoint PT2 "\n第三点: "))
- (grdraw PT2 PT3 3 1)
- (grdraw PT3 PT1 3 1)
- (command "_.ucs" 3 PT1 PT2 PT3)
- (setq lin (car(entsel "\n面外线: "))
- pt1 (cdr (assoc 10 (entget lin)))
- pt2 (cdr (assoc 11 (entget lin))))
- (setq WW1 (trans (list (car (trans pt1 0 1)) (cadr (trans pt1 0 1)) 0) 1 0)
- WW2 (trans (list (car (trans pt2 0 1)) (cadr (trans pt2 0 1)) 0) 1 0)
- pt3 (inters pt1 pt2 ww1 ww2 nil))
- (command "_.ucs" "p")
- (grdraw PT1 pt3 3 1)
- (command "_.ucs" "p")
- (princ "\n线与面交点(世界坐标): ")(princ pt3)
- (princ)
- )
|