本帖最后由 xyp1964 于 2013-10-8 22:52 编辑
- ;; 块线平行
- (defun c:test1374 (/ i ss s1 pt)
- (xyp-CMDLA0)
- (while (and (setq s0 (car (entsel "\n选择曲线: ")))
- (setq ss (ssget '((0 . "insert"))))
- )
- (setq i -1)
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq p1 (xyp-DXF 10 s2)
- p2 (vlax-curve-getclosestpointto s0 p1)
- rad (xyp-Get-AngleAtPoint s0 p2)
- rad (- rad (* pi 0.5))
- )
- (xyp-SubUpd s1 50 rad)
- )
- )
- (xyp-CMDLA1)
- )
|