الأحد، 15 مايو 2016

ليسب لاستخراج الاحداثيات في جدول











من اهم ليسبات استخراج الكوردينيت (coordinate)












افتح اي ليسب عندك واعمل ctrl+A
ثم قم بالنسخ النص الاتي كما هو  ثم SAVE  ,وبعدين اعمل اعادة تسميه  لليسب الجديد وليكون COOR وكده بقى عندك ليسب هااام جدا تقدر تطلع الCOORDINATEفي جدول على الرسم بسهوله جدا

















(defun c:coor() (princ "\nthis lsp to type the coordinate x,y.& make table") ;(command "osnap" "none" ) (command "osnap" "int,endpoint" ) (setq p(getpoint "\n Enter First Point :") pp(getpoint "\n Enter Second Point :") u(getint "\n Enter start point number:") tab(getpoint "\n Enter Upper Left Corner of Table:") u1 (+ 1 u) x(car p) y(cadr p) ; z(caddr p) x1(car pp) y1(cadr pp) ; z1(caddr pp) text(strcat "(" (rtos x 2 4) "," (rtos y 2 4)")") text1(strcat "(" (rtos x1 2 4) "," (rtos y1 2 4) ")") p1(mapcar '+ p (list 0.25 0.45)) p2(mapcar '+ pp (list 0.25 0.45)) p10(mapcar '+ p (list 0.25 -0.45)) p11(mapcar '+ pp (list 0.25 -0.45)) tab1(mapcar '+ tab (list 3 0 )) tab2(mapcar '+ tab (list 6 0 )) tab3(mapcar '+ tab (list 9 0 )) tab4(mapcar '+ tab (list 12 0 )) tab5(mapcar '+ tab (list 0 -1 )) tab6(mapcar '+ tab1 (list 0 -1 )) tab7(mapcar '+ tab2 (list 0 -1 )) tab8(mapcar '+ tab3 (list 0 -1 )) tab9(mapcar '+ tab4 (list 0 -1 )) tab10(mapcar '+ tab5 (list 0 -1)) tab11(mapcar '+ tab6 (list 0 -1)) tab12(mapcar '+ tab7 (list 0 -1)) tab13(mapcar '+ tab8 (list 0 -1)) tab14(mapcar '+ tab9 (list 0 -1)) tab15(mapcar '+ tab10 (list 0 -1)) tab16(mapcar '+ tab11 (list 0 -1)) tab17(mapcar '+ tab12 (list 0 -1)) tab18(mapcar '+ tab13 (list 0 -1)) tab19(mapcar '+ tab14 (list 0 -1)) POIN(mapcar '+ tab (list 0.65 -0.7)) POIN1(mapcar '+ tab1 (list 0.45 -0.7)) POIN2(mapcar '+ tab2 (list 0.45 -0.7)) POIN3(mapcar '+ tab3 (list 0.9 -0.7)) POIN4(mapcar '+ tab5 (list 1 -0.7)) POIN5(mapcar '+ tab6 (list 1.5 -0.5)) POIN6(mapcar '+ tab7 (list 1.5 -0.5)) POIN7(mapcar '+ tab8 (list 1.5 -0.5)) POIN8(mapcar '+ poin4 (list 0 -1)) POIN9(mapcar '+ poin5 (list 0 -1)) POIN10(mapcar '+ poin6 (list 0 -1)) POIN11(mapcar '+ poin7 (list 0 -1)) uu(strcat "P" (itoa u) ) uu1(strcat "P" (itoa u1) ) ) (command "osnap" "none" ) ; (command "Style" n "" "" "" "" "" "" "") (command "style" "romans" "romans" "0.25" "1" "0" "n" "n" "n" "") ;(command "line" p pp "") (command "line" tab tab3 "") (command "line" tab5 tab8 "") (command "line" tab10 tab13 "") (command "line" tab15 tab18 "") (command "line" tab tab15 "") (command "line" tab1 tab16 "") (command "line" tab2 tab17 "") (command "line" tab3 tab18 "") ;(command "line" tab4 tab19 "") (command "circle" p "0.125" ) (command "change" "l" "" "p" "c" "3" "") (command "circle" pp "0.125" ) (command "change" "l" "" "p" "c" "3" "") ;(command "text" p1 "0" text "") ;(command "text" p2 "0" text1 "") (command "text" p10 "0"uu "") (command "text" p11 "0"uu1 "") (command "text" poin "0" "POINT" "") (command "text" poin1 "0" "EASTING" "") (command "text" poin2 "0" "NORTHING" "") ;(command "text" poin3 "0" "Z" "") (command "text" poin4 "0" uu "") (command "text" poin8 "0" uu1 "") (command "text" "j" "mc" poin5 "0" (rtos x 2 4) "") (command "text" "j" "mc" poin6 "0" (rtos y 2 4) "") ;(command "text" "j" "mc" poin7 "0" (rtos z 2 4) "") (command "text" "j" "mc" poin9 "0" (rtos x1 2 4) "") (command "text" "j" "mc" poin10 "0" (rtos y1 2 4) "") ;(command "text" "j" "mc" poin11 "0" (rtos z1 2 4) "") (command "osnap" "int,endpoint" ) (command "osnap" "int,endpoint" ) (setq ppp(getpoint "\n Enter Next Point :") ) (while ( /= ppp nil ) (progn (setq u1 (+ 1 u1) x1(car ppp) y1(cadr ppp) ; z1(caddr pp) text1(strcat "(" (rtos x1 2 4) "," (rtos y1 2 4) ")") p2(mapcar '+ ppp (list 0.25 0.45)) p11(mapcar '+ ppp (list 0.25 -0.45)) uu1(strcat "P" (itoa u1) ) tab15(mapcar '+ tab15 (list 0 -1)) tab16(mapcar '+ tab16 (list 0 -1)) tab17(mapcar '+ tab17 (list 0 -1)) tab18(mapcar '+ tab18 (list 0 -1)) tab19(mapcar '+ tab19 (list 0 -1)) POIN8(mapcar '+ poin8 (list 0 -1)) POIN9(mapcar '+ poin9 (list 0 -1)) POIN10(mapcar '+ poin10 (list 0 -1)) POIN11(mapcar '+ poin11 (list 0 -1)) );setq (command "osnap" "none" ) ; (command "line" pp ppp "") (command "circle" ppp "0.125" ) (command "change" "l" "" "p" "c" "3" "") ;(command "text" p2 "0" text1 "") (command "text" p11 "0"uu1 "") (command "text" poin8 "0"uu1 "") (command "text" "j" "mc" poin9 "0" (rtos x1 2 4) "") (command "text" "j" "mc" poin10 "0" (rtos y1 2 4) "") ;(command "text" "j" "mc" poin11 "0" (rtos z1 2 4) "") (command "line" tab15 tab18 "") (setq pp ppp ;u1 (+ 1 u1) );setq (command "osnap" "int,endpoint" ) (setq ppp(getpoint "\n Enter Next Point :") ) );progn ) ;while (command "osnap" "none" ) (command "line" tab tab15 "") (command "line" tab1 tab16 "") (command "line" tab2 tab17 "") (command "line" tab3 tab18 "") ;(command "line" tab4 tab19 "") (command "osnap" "int,endpoint" ) );end

ليست هناك تعليقات:

إرسال تعليق