好文档 - 专业文书写作范文服务资料分享网站

CAD XY坐标标注AUTO LISP程序

天下 分享 时间: 加入收藏 我要投稿 点赞

CAD X,Y坐标标注AUTO LISP程序

;;(DEFUN IDPT(/ p px py pxx pyy) (DEFUN IDPT () (SETQ X T) (WHILE X

(SETVAR \(INITGET 1)

(SETQ PP (GETPOINT \\

(SETVAR \

(SETQ P (OSNAP PP \(IF(= P NIL)

(PROMPT \(SETQ X NIL))) (SETQ PXX (CAR P) PYY (CADR P) PX(RTOS PXX 2 PRE1) PY(RTOS PYY 2 PRE1)))

;;(DEFUN MAX_XY(WI PX PY / L PX PY) (DEFUN MAX_XY () (SETQ KKK \

1 / 30

(SETQ LLL \(SETQ LX (STRLEN PX) LY (STRLEN PY))(IF (> LX LY) (PROGN

(SETQ W_NU (- LX LY)) (WHILE (> W_NU 0) (SETQ PY (STRCAT \

(SETQ W_NU (- W_NU 1)))))(IF (< LX LY) (PROGN

(SETQ W_NU (- LY LX)) (WHILE (> W_NU 0) (SETQ PX (STRCAT \

(SETQ W_NU (- W_NU 1)))))(SETQ PY (STRCAT KKK PY)) (SETQ PX (STRCAT LLL PX)) (SETQ PXL(STRLEN PX) PYL(STRLEN PY)

MAXL (FLOAT (MAX PXL PYL)) L(* WI MAXL)))

;;(DEFUN TEXT_P(/ W WX WY) (DEFUN TEXT_P () (SETVAR \

2 / 30

(INITGET 1)

(SETQ W (GETPOINT \\

(SETQ WX (CAR W))

(SETQ WY (CADR W)));;(DEFUN DRLIN(CAL P W L / ALPW WE) (DEFUN DRLIN () (SETQ AL01 (+ PI CAL)) (SETQ ALPW (ANGLE P W)) (SETQ AG-D (- ALPW CAL)) (IF (> AG-D 0) (PROGN

(IF (AND (< AG-D (* PI 0.5)) (> AG-D (* PI 0))) (SETQ WE (POLAR W CAL L) BZ 1))

(IF (AND (> AG-D (* PI 0.5)) (< AG-D (* PI 1.5)))

(SETQ WE (POLAR W AL01 L) BZ 2))

(IF (AND (> AG-D (* PI

3 / 30

1.5)) (< AG-D (* PI 2))) (SETQ WE (POLAR W CAL L) BZ 3))

;>>>>>)(PROGN ;<<<<<

(IF (AND (> AG-D (* PI - 0.5)) (< AG-D (* PI 0))) (SETQ WE (POLAR W CAL L) BZ 1))

(IF (AND (< AG-D (* PI - 0.5)) (> AG-D (* PI - 1.5)))

(SETQ WE (POLAR W AL01 L) BZ 2))

(IF (AND (< AG-D (* PI 1.5)) (> AG-D (* PI -2))) (SETQ WE (POLAR W CAL L) BZ 3)) ;>>>>>))

(COMMAND \

0.0 \

4 / 30

(DEFUN DRCORD () (IF (= BZ 2) (SETQ WB WE)

(SETQ WB W))(SETQ WBX (POLAR WB (+ (* PI 0.5) CAL) H)

WBY (POLAR WB (+ (* PI

1.5) CAL) H))(SETQ AL_CAL (* 180 (/ CAL PI))) (COMMAND \

(COMMAND \WE CAL WI PRE2)

(DEFUN DRELEV () (IF (< WX PXX)

(SETQ EPL (POLAR WE AL01 (* WI 0.5)))

(SETQ EPR (POLAR WE CAL (* WI

0.5))))(SETQ DHH (GETREAL \\

(IF (= DHH NIL)

(PROMPT \(PROGN

(SETQ DH (RTOS DHH 2 PRE2)) (SETQ CLA (GETVAR \

5 / 30

CAD XY坐标标注AUTO LISP程序

CADX,Y坐标标注AUTOLISP程序;;(DEFUNIDPT(/ppxpypxxpyy)(DEFUNIDPT()(SETQXT)(WHILEX(SETVAR\(INITGET1)(SETQPP(GETPOINT\\(SETVAR\(SETQP(OSN
推荐度:
点击下载文档文档为doc格式
6wc258yp9g4oweh0q68m0sr9z0p08p00nz8
领取福利

微信扫码领取福利

微信扫码分享