冒个烟圈
发表于 2015-7-18 13:49:11
感谢楼主分享,,很好用的
my258
发表于 2016-10-17 12:49:47
很好,赞一个
LIULISHENG
发表于 2017-9-26 14:00:14
yuxin6618
发表于 2017-9-28 16:35:45
yuxin6618
发表于 2017-11-24 17:30:27
感谢楼主分享,,很好用
start4444
发表于 2017-11-29 14:56:37
yuxin6618
发表于 2017-12-8 09:32:37
好作品!,但是建议一下数主能不能改成两个方向,跟阵列差不多的那种
wudechao
发表于 2018-1-15 21:30:59
我也修改一下,用于表格Y向的动态复制。
(defun c:cdt (/ *error* oos oor p1 p2 pt0 pt1 ss e tst ee cn ns grr gr dis gr)
(setvar "cmdecho" 0)
(defun *error* (msg)
(if oos
(setvar "osmode" oos)
)
(if oor
(setvar "orthomode" oor)
)
(redraw)
(setvar "cmdecho" 1)
)
(setq oos (getvar "osmode"))
(setq oor (getvar "orthomode"))
(setq dis (getvar "offsetdist"))
(setvar "orthomode" 1)
(princ "\n选择要复制的物体:")
(setq p2 nil)
(if (setq ss (ssget))
(progn
(if (< dis 0)
(progn
(setq dis 500)
(setvar "offsetdist" 500)
)
)
(setvar "osmode" 672)
(setq dis (getdist (strcat "\n指定偏移距离或点选两点距离< " (rtos dis 2 2) " >:"))
dis (if dis
dis
(getvar "offsetdist")
)
)
(setvar "offsetdist" dis)
(setq pt1 (cadr (grread t 1)))
(trans pt1 0 1)
(setq p1 pt1)
(setq p2 (list (car pt1) (- (cadr pt1) (getvar "offsetdist"))))
(setq dis (distance p1 p2))
(setvar "osmode" 0)
(setq e (entlast))
)
)
(if p2
(progn
(setq tst t)
(while tst
(initget 128)
(setq grr (grread t 5 0))
(setq gr (car grr)
pt0 (cadr grr)
)
(cond
((= gr 5)
(redraw)
(grdraw p1 pt0 1)
(setq cn (fix (/ (distance p1 pt0) dis)))
(setq ee e
ns (ssadd)
)
(while (setq ee (entnext ee))
(setq ns (ssadd ee ns))
)
(command "erase" ns "")
(command "copy" ss "" "m" "non" p1)
(setq m 0)
(repeat cn
(setq m (1+ m))
(if (or
(and
(< (cadr pt0) (cadr p1))
(> (cadr p1) (cadr p2))
)
(and
(> (cadr pt0) (cadr p1))
(< (cadr p1) (cadr p2))
)
)
(progn
(command "non" (mapcar
'(lambda (x y)
(+ x (* m (- y x)))
)
p1
p2
)
)
)
(progn
(command "non" (mapcar
'(lambda (x y)
(- x (* m (- y x)))
)
p1
p2
)
)
)
)
)
(command)
)
((= gr 3)
(setq tst nil)
)
((or
(equal grr '(2 32))
(equal grr '(2 13))
(member gr '(11 25))
)
(setq tst nil)
)
)
)
)
)
(setvar "osmode" oos)
(setvar "orthomode" oor)
(setvar "cmdecho" 1)
(print)
)
20060510412
发表于 2018-11-1 10:45:22
请问,怎么将/符号修改为其他字母呢,比如d
eechenchun
发表于 2021-5-21 15:20:07
好东西就要用力顶顶顶