lisp2arx
Visual Programming for AutoLisp
Mathématiques en programmation Lisp..
doc2cpp,doc2lsp, sld2lsp, bmp2dcl,
free__GifCcapture for all-CAD'platforms..
|
Lista Forumurilor Pe Tematici
|
lisp2arx | Reguli | Inregistrare | Login
POZE LISP2ARX
Nu sunteti logat.
|
Nou pe simpatie: Yuby Mona
| Femeie 23 ani Arges cauta Barbat 23 - 45 ani |
|
admin
Administrator
Din: Bucharest
Inregistrat: acum 14 ani
Postari: 517
|
|
Code:
(mapcar '(lambda (x)
(+ x 3)
)
'(10 20 30)
)=> (13 23 33) |
(defun @midppoiint (p1 p2) (mapcar '* '(0.5 0.5 0.5)(mapcar '+ p1 p2))) (setq p1 (list X offset 0.0) p2 (mapcar '* '(1 -1 1) p1) (mapcar 'print (reverse results))
Code:
(defun dfn_point_mid (pn1t pn2t / $rr dx1 dx2 dy1 dy2 dz1 dz2)
(setq;|a1562849|;
dx1 (if_real (car pn1t) nil)
dy1 (if_real (cadr pn1t) nil)
dz1 (if_real (caddr pn1t) 0.0)) (setq;|a1562977|;
dx2 (if_real (car pn2t) dx1)
dy2 (if_real (cadr pn2t) dy1)
dz2 (if_real (caddr pn2t) dz1)) (setq;|a1563097|;
$rr (if (and dx1 dy1 dx2 dy2) (list (* (+ dx1 dx2) 0.5) (* (+ dy1 dy2) 0.5) (* (+ dz1 dz2) 0.5)) "t154error<>3Dpnt"))
$rr)
(Defun if_real(a108 tzxelse / $rr) ;_ASSERT_OK
(setq;|a3795636|;
$rr (if (= (type a108) (quote SYM)) (eval a108) a108)
$rr (cond ( (= (type $rr) (quote INT)) (+ 1.0 (- $rr 1)))( (= (type $rr) (quote REAL)) $rr)( tzxelse)))
$rr) |
There is a list of the type ("1841B7" "184130" "18412E" ...) Elements in quotes are handl'y of autocad primitives. The list is not received in lisp and then passed to lisp. How can I get the list (1841B 184130 18412E ?.
Code:
Command: (mapcar 'read (list "abc" "def" "ghi"))
(ABC DEF GHI) |
_______________________________________
|
|
pus acum 4 ani |
|
admin
Administrator
Din: Bucharest
Inregistrat: acum 14 ani
Postari: 517
|
|
Code:
(setq a 10 b 20 c 30)
(mapcar '1+ (list a b c))
(11 21 31) |
(setq l2 (mapcar 'csptypes (list "aaa" "bb" "v" 1.2 "d" 1121234 nil T))) (apply 'strcat (mapcar 'csptypes (list "aaa" "bb" "v" 1.2 "d" 1121234 nil T))) {$R} Command: (apply 'strcat (mapcar 'csptypes (list "aaa" "bb" "v" 1.2 "d" 1121234 nil T))) Tip=SYM"SSSRSIN0" {$R} Command: (mapcar 'type (list "aaa" "bb" "v" 1.2 "d" 1121234 nil T)) (STR STR STR REAL STR INT nil SYM)
Code:
(Defun csptypes (sir / $rr tip)
(setq $rr nil tip (strcase (vl-prin1-to-string (type sir))))
(princ "\nTip=") (princ tip)
(if (wcmatch tip "STR,INT,REAL,NIL,FILE,LIST")
(setq $rr (chr (ascii tip)))
(setq $rr "0")
)
$rr) |
Comvert list of Variabile to Strings
Code:
_$ (setq lst '(A B C ))
(A B C)
_$ (mapcar 'vl-prin1-to-string lst)
("A" "B" "C") |
_______________________________________
|
|
pus acum 4 ani |
|