|
|
发表于 2011-7-27 15:08:44
|
显示全部楼层
来自: 中国台湾
http://www.cadtutor.net/forum/archive/index.php/t-40010.html
5 W7 |! e9 K, f0 eHelp Modifying Converting Arc to Circle Lisp Code Please!9 Z! ?8 _# ~( e y) R
! v6 S+ G2 y! i/ o7 C6 C% V( ~
===========================================================" Y' S w- L! k2 V
;;; http://ww3.cad.de/foren/ubb/Forum145/HTML/001720.shtml4 d" U0 J$ ~0 B" Z* j$ t! o# @/ c
(defun c:Arc2Circle ()) U2 [) E1 p3 o, g) y) l' x' T
(defun arc2Circle (OBJ / DATA R M)
1 ~8 B @9 q9 H; t: V9 m. J% k (if(and(=(type OBJ)'ENAME)2 b0 o5 n8 r! q. [
(setq DATA(entget OBJ))! x$ D. Y) Y2 V5 e, w
(=(cdr(assoc 0 DATA)) "ARC")
7 D" m- r, M& n( Q$ P* q* u8 Y! x (setq R (cdr(assoc 40 DATA))); v8 t {% G4 }8 v) J( w
(setq M (cdr(assoc 10 DATA)))) r' A' G- W1 |
)
/ c. s7 U, f3 G5 X, Y% f (progn. n5 O6 r* A9 f% L# q9 |* J7 N
(command "_circle" M R) / m3 G( H; O7 T S5 [
(command "_matchprop" OBJ (entlast)"")4 C% y# I _( s; ]$ s/ W2 s
(entdel OBJ)
5 t3 x3 ?) h+ v! W5 ` ) 6 f6 s* ^' ~0 s. o& \% i( O
)
! T, E6 T* q6 U( j( h# q1 I- R ) & a$ D9 D: ~5 O5 o# h0 N: T% S
(Arc2Circle (car(entsel "\n请选择弧: ")))) ^: u" [+ h) A3 b
)
' y3 z$ k8 v7 v( l2 S; i( L . I$ S5 \% ]0 r( |
' k/ t2 I5 h6 m) f, A or1 U! q! z$ C6 M6 a1 ?9 [
http://www.gocad.co.kr/qa_lisp/218868/page/186 |
评分
-
查看全部评分
|