明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1678|回复: 2

[基础] 无聊的更改

[复制链接]
发表于 2011-4-2 21:04:05 | 显示全部楼层 |阅读模式


  有时候就觉得按"P"键有点远,,就改了一下..圆角的命令,,

(Defun c:f5 ()
  (Setvar "Filletrad" 0.5)
  (Setvar "Pickbox" 8)
  (Ty_Fillet)
  (Setvar "Pickbox" 6)
  (princ)
)
(defun Ty_Fillet ()
  (setq princtyp "l")
  (setq i 0)
  (princ "\n*** 选择第一个对象或[多段线(D)/半径(R)/修剪(T)]: ")
  (Command "_Fillet")
  (While (= (Getvar "Cmdnames") "FILLET")
    (setq grdate (grread Nil 4 2))
    (setq grd (car grdate)
   pnt (cadr grdate)
    )
    (cond ((= pnt 100)
    (progn (Command)
    (setq princtyp "D")
     (princ "D")
    (getstring NIl)
    (princ "\n*** 选择二维多段线: ")
    (Command "_Fillet" "P")
    (setq i 1)
    )
   )
   ((= pnt 114)
    (progn (setq efr (getvar "FILLETRAD"))
    (setq efr1 (getreal (strcat "\n*** 输入圆角半径[" (rtos efr 2 2) "]:  ")))
    (if (= efr1 Nil)
      (Setq efr1 efr)
    )
    (setvar "FILLETRAD" efr1)
    (princ (strcat "\n*** 已设圆角半径为:" (rtos efr1 2 2)))
    (princ "\n*** 选择第一个对象或[多段线(D)/半径(R)/修剪(T)]: ")
    )
   )
   ((= grd 3)
    (if (= princtyp "l")
      (if (= i 1)
        (princ "\n*** 选择第二个对象: ")
      )
      (progn (princ "\n*** 选择二维多段线: "))
    )
    (setq z (nentselp (cadr grdate)))
    (if z
      (if (= i 1)
        (progn (Command pnt))
        (progn (Command) (Command "_Fillet" pnt) (princ "\n*** 选择第二个对象: ") (setq i 1))
      )
    )
   )
   ((or (equal pnt 32) (equal pnt 13) (equal grd 25)) (Command))
    )
  )
)
发表于 2011-4-2 21:25:28 | 显示全部楼层
看了半天,还是有点佩服的,不就为了个P么,写了那么多。
发表于 2011-4-2 22:27:56 | 显示全部楼层
mandala 发表于 2011-4-2 21:25
看了半天,还是有点佩服的,不就为了个P么,写了那么多。

无聊的更改
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2025-6-10 13:32 , Processed in 0.177756 second(s), 31 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表