本帖最后由 gaics 于 2023-6-7 14:56 编辑
- (defun c:CCX (/ e p d zz p1)
- (setq ss (ssadd))
- (setq d 10)
- (setq e (car (entsel "\n拾取基准线")))
- (while (setq p (getpoint "\n垂足位置"))
- (setq zz (getreal "\n输入高程:"))
- (setq p (vlax-curve-getclosestpointto e p))
- (setq p1
- (polar p
- (+ (angle p
- (mapcar '+
- (vlax-curve-getfirstDeriv
- e
- (vlax-curve-getParamAtPoint e p)
- )
- p
- )
- )
- (* pi 0.5)
- )
- d
- )
- )
- (entmakex
- (list
- '(0 . "LINE")
- (cons 10 (list (car p) (cadr p) zz))
- (cons 11 (list (car p1) (cadr p1) zz))
- )
- )
- )
- (princ)
- )
新生成的线段貌似无法合并,暂时移除pedit命令。
|