明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1661|回复: 8

[提问] 缩放命令改造

[复制链接]
发表于 2020-2-20 23:08:19 | 显示全部楼层 |阅读模式
请才高手
我想把缩放命令scale进行改造,用参照的方法,省略输入R参数,怎么改造?

谁有办法改造这个原生命令?
"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2020-2-21 13:00:03 | 显示全部楼层
(DEFUN C:TT()
  (if (and
        (setq ss (ssget))
        (setq pt (getpoint "指定指点"))
        )
    (COMMAND "scale" ss "" pt "R" pt pause)
    )
  
  )
 楼主| 发表于 2020-2-22 12:03:52 | 显示全部楼层
永不言弃 发表于 2020-2-21 13:00
(DEFUN C:TT()
  (if (and
        (setq ss (ssget))

感谢
发表于 2020-2-22 20:15:36 | 显示全部楼层
;;;          放大缩小 倍数       ;;;;;;;;;;
(defun c:V01  () (setq rr (ssget)) (command "scale" rr "" pause "0.1" )  (princ "\n缩小0.1倍")(princ))
(defun c:V02  () (setq rr (ssget)) (command "scale" rr "" pause "0.2" )  (princ "\n缩小0.2倍")(princ))
(defun c:V03  () (setq rr (ssget)) (command "scale" rr "" pause "0.3" )  (princ "\n缩小0.3倍")(princ))
(defun c:V04  () (setq rr (ssget)) (command "scale" rr "" pause "0.4" )  (princ "\n缩小0.4倍")(princ))
(defun c:V05  () (setq rr (ssget)) (command "scale" rr "" pause "0.5" )  (princ "\n缩小0.5倍")(princ))
(defun c:V06  () (setq rr (ssget)) (command "scale" rr "" pause "0.6" )  (princ "\n缩小0.6倍")(princ))
(defun c:V07  () (setq rr (ssget)) (command "scale" rr "" pause "0.7" )  (princ "\n缩小0.7倍")(princ))
(defun c:V08  () (setq rr (ssget)) (command "scale" rr "" pause "0.8" )  (princ "\n缩小0.8倍")(princ))
(defun c:V09  () (setq rr (ssget)) (command "scale" rr "" pause "0.9" )  (princ "\n缩小0.9倍")(princ))
(defun c:V1    () (setq rr (ssget)) (command "scale" rr "" pause "1" )  (princ "\n放大1倍")(princ))
(defun c:V2    () (setq rr (ssget)) (command "scale" rr "" pause "2" )  (princ "\n放大2倍")(princ))
(defun c:V3    () (setq rr (ssget)) (command "scale" rr "" pause "3" )  (princ "\n放大3倍")(princ))
(defun c:V4    () (setq rr (ssget)) (command "scale" rr "" pause "4" )  (princ "\n放大4倍")(princ))
(defun c:V5    () (setq rr (ssget)) (command "scale" rr "" pause "5" )  (princ "\n放大5倍")(princ))
(defun c:V6    () (setq rr (ssget)) (command "scale" rr "" pause "6" )  (princ "\n放大6倍")(princ))
(defun c:V7    () (setq rr (ssget)) (command "scale" rr "" pause "7" )  (princ "\n放大7倍")(princ))
(defun c:V8    () (setq rr (ssget)) (command "scale" rr "" pause "8" )  (princ "\n放大8倍")(princ))
(defun c:V9    () (setq rr (ssget)) (command "scale" rr "" pause "9" )  (princ "\n放大9倍")(princ))
发表于 2020-2-22 20:16:18 | 显示全部楼层
直接输入放大倍数的命令 好多了  
发表于 2020-2-24 17:31:18 | 显示全部楼层
ninja37 发表于 2020-2-22 20:16
直接输入放大倍数的命令 好多了



你这种定义方法如果要定义一亿种倍数(任何实数),是否得写一亿条函数?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2020-2-26 12:23:43 | 显示全部楼层
tryhi 发表于 2020-2-24 17:31
你这种定义方法如果要定义一亿种倍数(任何实数),是否得写一亿条函数?

一般放到1-10倍  做20个命令 绰绰有余了   就算这1-10倍很多都用的少   什么6倍7倍    如果有小数倍数或者特殊倍数再老老实实用SC命令    可能是行业不同    我这个行业完全够了
发表于 2022-12-24 10:28:24 | 显示全部楼层
行业不同    我这个行业完全够了
发表于 2022-12-24 22:33:22 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-16 06:48 , Processed in 0.195798 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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