 - ;; 任意空间直线在z=0平面的交点
- (defun c:tt ()
- (if (and
- (setq s1 (car (entsel "\n选择直线1: ")))
- (setq s2 (car (entsel "\n选择直线2: ")))
- (= (xyp-get-dxf 0 s1) "LINE")
- (= (xyp-get-dxf 0 s2) "LINE")
- )
- (progn
- (setq p1 (xyp-3d2d (xyp-get-dxf 10 s1))
- p2 (xyp-3d2d (xyp-get-dxf 11 s1))
- p3 (xyp-3d2d (xyp-get-dxf 10 s2))
- p4 (xyp-3d2d (xyp-get-dxf 11 s2))
- )
- (if (setq pt (inters p1 p2 p3 p4 nil))
- (xyp-Cross pt 100 1)
- )
- )
- )
- (princ)
- )
|