试试, 你这个其实用 WIPEOUT遮盖做更好,不断线,以后方便修改,断了,你就回不去了。
下面是断线的代码。 看你新来的,插件拷贝回去,加载,不能用的话,去看下 “插件使用方法”
 - (defun c:tt ()
- (defun *error* (msg)
- (princ msg)
- (xdrx_entity_delete cir)
- (xdrx_end)
- )
- (defun _callback (dynpt)
- (xdrx_setpropertyvalue
- cir
- "center"
- dynpt
- "radius"
- (/ #xd_var_global_circle_radius 2.0)
- )
- (princ)
- )
- (defun _erase (pt)
- (setq pts (xdrx_getsamplept cir))
- (if (setq ss (ssget "cp" pts '((0 . "*LINE,CIRCLE,ARC,ELLIPSE"))))
- (progn (ssdel cir ss)
- (xdrx_entity_copy cir)
- (setq ss (xdrx_curve_intersectbreak ss (entlast)))
- (command "layer" "")
- (setq box (xdrx_entity_box cir)
- box (xd::pnts:close box)
- box (xdrx_points_offset height box)
- box (xd::pnts:close box)
- dxy box
- )
- (if (setq ss1 (ssget "wp" box '((0 . "*line,arc,circle,ellipse"))))
- (progn (ssdel cir ss1)
- (xdrx_entity_delete ss1)
- )
- )
- )
- )
- (princ)
- )
- (xdrx_begin)
- (setq height (xd::doc:getpickboxheight))
- (xdrx_sysvar_push '("cursorsize" 1 "osmode" 32 "cmdecho" 0))
- (xdrx_pointmonitor "_callback")
- (if (not #xd_var_global_circle_radius)
- (setq #xd_var_global_circle_radius (* 3 height))
- )
- (xdrx_circle_make
- '(0 0 0)
- (/ #xd_var_global_circle_radius 2.0)
- )
- (setq cir (entlast))
- (while (and (xdrx_initget "C")
- (setq pt (getpoint (xdrx_prompt "\r(当前直径:" #xd_var_global_circle_radius ")擦除点[C-修改直径]<退出>:" t)))
- )
- (cond ((= pt "C")
- (if (setq val (getreal (xdrx_prompt
- "\n输入直径<"
- #xd_var_global_circle_radius
- ">:"
- t
- )
- )
- )
- (setq #xd_var_global_circle_radius val)
- )
- )
- ((= (type pt) 'LIST) (_erase pt))
- )
- )
- (xdrx_pointmonitor)
- (xdrx_entity_delete cir)
- (xdrx_end)
- (princ)
- )
|