Copyright © 2004-2022 SQL: 1.43 saniye - Sorgu: 80 - Ortalama: 0.01787 saniye
05.09.2009 17:03
trkgo |
Kod: ;; Çizgiyi istediğin yerden koparma komutu
(defun c:BC () (setq scl (getvar "dimscale" )) (setq dis (* scl 0.052)) (if (= "WASTE" name) (setq dist (* dis 1.5)) (if (= "DUCT" name) (setq dist (* dis 1.5)) (if (= "DUCT-RA" name) (setq dist (* dis 1.5)) (setq dist (* dis 1.5)) ))) (setq lne (entsel "\nPick line to break:")) (terpri) (setq pnt (getpoint "\nPick break point:" )) (terpri) (setq pick (entget (car lne))) (setq pt1 (cdr (assoc 10 pick))) (setq pt2 (cdr (assoc 11 pick))) (setq a (angle pt1 pt2)) (setq ang ( * a 57.3)) (setq bpt1 (polar pnt a dis)) (setq bpt2 (polar pnt (- a pi) dis)) (command "break" lne "f" bpt1 bpt2 ) ) Not:http://www.cadtutor.net/forum/index.php sitesinden alıntıdır. ehya (06.09.2009 12:43 GMT) |
07.09.2009 05:00
bud_0782 |
break komutuyla çizgiyi istediğimiz yerden kırabiliyoruz zaten.bu komutun ondan farkı nedir?
|
07.09.2009 09:54
trkgo |
Alıntı Break ile 2 nokta seçmek gerekiyor burada ise tek noktadan kırıyor
|
07.09.2009 10:56
bud_0782 |
br komutunun 2 çeşidi vardır.biri seçtiğiniz noktadan kırar (bu lispteki gibi), diğeri ise seçtiğiniz iki nokta arasını kırar.
|
07.09.2009 12:20
yazgunesi |
trkgo bu çizgi kırma lispini yanlış yerden kopyalamışsın galiba. :-)) Orada forumumda kişiler tartışmışlar paylaşım yapmışlar tabi konu biraz uzamış da gitmiş... Lispin olması gereken kodlama 2. sayfada gözüküyor. Şu anda sadece komut ismini değiştirdim. >>>> (defun c:bc1 ()
Lispin alıntı yapıldığı orjinal sayfa : Linkleri görebilmek için ÜYE olmalısınız. Kod: ;; This lisp breaks a two lines which cross each other (defun c:bc1 () (setq scl (getvar "dimscale" )) (setq dis (* scl 0.052)) (setq lne (entsel "\nPick line to break:")) (terpri) (setq pnt (getpoint "\nPick break point:" )) (terpri) (setq pick (entget (car lne))) (setq pt1 (cdr (assoc 10 pick))) (setq pt2 (cdr (assoc 11 pick))) (setq a (angle pt1 pt2)) (setq ang ( * a 57.3)) (setq bpt1 (polar pnt a dis)) (setq bpt2 (polar pnt (- a pi) dis)) (command "break" lne "f" bpt1 bpt2 ) (princ) ) (Princ "Lisp'i çalıştırmak için > bc1 < yazınız! ") Break lispi konusunda bazı örnekler buldum onlara da bir göz atın derim örnek olması açısından. Kod: ; break to point lispi (defun c:breakpoint (/ object point) ;Objeyi kır noktadan (setq object (entsel)) ;ilk değişkeni tanımla (princ "Specify Break Point: ") ;Set the request that you want on screen; (setq point (getpoint)) ;Set the second variable; (command "_break" object "f" point point) ;insert the command that you are working with; ) (Princ "Lisp'i çalıştırmak için >breakpoint < yazınız! ") Kod: ;Copyright 1987 Omura Illustration ; line break (defun c:lnbreak(/ a b v1 v2 pt1 pt2 int) (setvar "cmdecho" 0) (setq a (getpoint "\nPick line of break: ")) (setq b (getpoint a "\nSecond point: ")) (setq v1 (ssget "c" a b)) (setq v2 0) (while (/= v2 (sslength v1)) (setq pt1(cdr(assoc 10(entget(ssname v1 v2))))) (setq pt2(cdr(assoc 11(entget(ssname v1 v2))))) (setq int(inters a b pt1 pt2)) (command "break" int "@") (setq v2(+ v2 1))) ) (Princ "Lisp'i çalıştırmak için > lnbreak < yazınız! ") Kod: ; BRKDSH.LSP ; By Jim Nakazawa ; (415) 768-1234 ; This is to break a line between 2 intersecting lines and break that line ; into the specified number of dashes & breaks (better to enter an ODD number) ; This program was written for those occaisions when you need to show a ; broken dashed line but defining a new linetype ; is too much trouble and changing the ltscale doesn't give the right results. (defun C:BRKDSH (/ os p1 p2 p3 n a d p4 c) (setq os (getvar "osmode")) (setvar "osmode" 512);osnap set to nearest (setq p1 (getpoint "Pick Line to be Dashed: ")) (terpri) (setvar "osmode" 32);osnap set to intersection (setq p2 (getpoint "Pick First Intersection: ")) (terpri) (setq p3 (getpoint "Pick 2nd Intersection: ")) (terpri) (setq n (getint "Enter Number of Dashes Desired: ")) (setq a (angle p2 p3)) (setq d (distance p2 p3)) (setq p4 (polar p2 a (/ d n))) (command "break" p1 "f" p2 p4) (setq c 2) (repeat (fix (/ (- n 1) 2)); (couldn't get to work using "(while" ) (setq p4 (polar p2 a (* c (/ d n)))) (command "break" p4 (polar p4 a (/ d n))) (setq c (+ c 2)) ) (setvar "osmode" os);returns osnap to original setting (princ);to exit quietly ) (princ "Lisp'i çalıştırmak için > BRKDSH < yazınız! ") Kod: ; Function to insert and properly rotate a valve or other ; object on a "pipe" and to break the line to the proper ; size. ; ; Parameters passed are name of block to be inserted and the ; size of the break in the line, and the scale factor. ; ; Eliot Shanabrook & John Intorcio 6/11/86 ; ; (breakl "Gate" 0.375 0.5) ; ; Which would insert a block called GATE which is normally ; 0.375" long at a scale of 0.5. ; (defun BREAKL (name size scale) (setvar "CMDECHO" 0) (setq apsave (getvar "aperture")) (setq pt3 nil) (command "aperture" 5) (terpri) (setq pti (getpoint "Insertion point:")) (command "snap" off) (setq pt1 (polar pti 0 0.125)) (setq pt3 (osnap pt1 "nea")) (if (= pt3 nil) (setq ang1 (/ pi 2)) (setq ang1 0)) (setq pt5 (polar pti ang1 (* size scale))) (command "break" pti pt5) (setq ang2 (*(/ ang1 (/ pi 2)) 90)) (command "insert" name pti scale scale ang2) (setvar "aperture" apsave) ) (princ "Lisp'i çalıştırmak için > BREAKL < yazınız! ") Kod: ; Break With First Option ; TIP852: BRKFST.LSP (c)1993, James E. Towle ;; This LISP is for multiple breaks with the F, (FIRST), option ;; it has been working on AutoCAD 10 & 12 for me. ;; BY: JAMES E. TOWLE ;;; === NWERR.LSP === Error handler (DEFUN NWERR (s) (if (/= s "Function cancelled") (princ (strcat "\nError:" s)) ) (setq *error* olderr) (PRINC) ) ;;; === BRKFST.LSP === (defun C:BRKFST () (setq olderr *error* *error* nwerr chm 0) (setvar "cmdecho" 0) (setq ent1 (entsel "\nPick Line To Break: ") ent (car ent1) ) (redraw ent 3) (setq pt2 (getpoint "\nFirst point: ") pt3 (getpoint "\nSecond Point: ") ) (command "BREAK" ent1 "F" pt2 pt3) (setvar "cmdecho" 1) (setq *error* olderr) (princ) );END (princ "Lisp'i çalıştırmak için > BRKFST < yazınız! ") Kod: ; Break Crossing Lines ; (C)1994, Stan Kowalski (defun etype (E) (setq E (Cdr (assoc 0 (entget (car E))))) ) (defun askdist (R S / R S ANS) (setq ANS nil) (if (= R nil) (progn (while (or (= ANS "") (= ANS nil)) (princ (strcat S ": ")) (setq ANS (getdist)) );end while (setq R ANS) );end progn (progn (princ (strcat S " <" (rtos R) ">: ")) (setq ANS (getdist)) (if (or (= ANS nil) (= ANS "")) (setq R R) (setq R ANS) ) );end progn );end if R );end function askdist (defun C:THRU (/ CON CPE CPM ET ETE ETM IP HG) (setq CON (entsel "\nSelect line to remain continuous: ")) (if (null CON) (prompt "\nI don't think you selected anything.") (progn (setq THRU_GAP (askdist THRU_GAP "\nGap spacing")) (if (or (= (etype CON) "POLYLINE") (= (etype CON) "LINE") ) (progn (setvar "cmdecho" 0) (setvar "highlight" 0) (setq CPE (osnap (cadr CON) "endp") CPM (osnap (cadr CON) "midp") ) (setq ET (entsel "\nEntity passing thru: ")) (while ET (setq ETE (osnap (cadr ET) "endp") ETM (osnap (cadr ET) "midp") ) (setq IP (inters CPE CPM ETE ETM nil) HG (/ thru_gap 2.0) ) (command "break" (cadr ET) "F" (polar IP (angle ETE ETM) HG) (polar IP (angle ETM ETE) HG) );end command (setq ET (entsel "\nEntity passing thru: ")) );end while );end progn - work portion (prompt "Continuous entity not a line") );end if - continuous entity line or polyline );end progn - yes entity present );end if - continuous entity selected (setvar "cmdecho" 1) (setvar "highlight" 1) (princ) );end command (princ "Lisp'i çalıştırmak için > THRU < yazınız! ") Kod: ;Program to break 2 parallel lines -- Break2.lsp
(defun c:break2 (/ pt1 pt2 pt3 pt4 pt0 ang1 dst1) (setvar "osmode" 512) ;near osnap mode (setq pt1 (getpoint "\nSelect object: ")) ;get first break point (setq pt2 (getpoint pt1 "\nEnter second point: ")) ;get second break point (setvar "osmode" 128) ;perpend osnap mode (Setq pt3 (getpoint pt1 "\nSelect parallel line: "));get 2nd line (Setvar "osmode" 0) ;no osnap mode (setq ang1 (angle pt1 pt3)) ;find angle btwn lines (setq dst1 (distance pt1 pt3)) ;find dist. btwn lines (setq pt4 (polar pt2 ang1 dst1)) ;derive pt4 on 2nd line (command "break" pt1 pt2 ;break 1st line "break" pt3 pt4 ;break 2nd line "line" pt1 pt3 "" ;close ends of lines "line" pt2 pt4 "" ) ) (princ "Lisp'i çalıştırmak için > break2 < yazınız! ") yazgunesi (07.09.2009 15:50 GMT) |
07.09.2009 12:23
ehya |
lispin bile yabancısına talep ediliyo...
ey halkım o kadar yerli malı lisp yazdık... onlar niye kullanılmıyo :)
|
07.09.2009 13:16
Harbi65 |
Alıntı Ehya; Kral gibi seslenmişsin..:D
|
07.09.2009 13:22
ehya |
estf. krallık haddime değil..
lisp yazıyorum diye de, kendimi büyük görmedim şimdiye kadar. sadece yerli olanlara dikkat çekmek istedim o kadar...
|
07.09.2009 15:29
mateus |
teşekkürler emeğine sağlık
trkgo
|
01.05.2012 09:17
trkgo |
Alıntı Yok sadece kendım ıcın cok lazım olmustu arastırırken sıtedekı arkadaslarımızada faydası olur dıye paylastım. Baska amac yok :=
|
01.05.2012 12:21
ProhibiT |
Önce burada arasaydınız, böyle şimendifer katarı gibi Lisp'lere gerek olmadığını görürdünüz :)
Kod: (defun C:bRk (/ e n) Çok canınız sıkılırsa tek satırda bile yazılabilir.(setvar "cmdecho" 0) (command "undo" "group") (redraw (setq e (car (entsel))) 3) (command "break" e (setq n (getpoint)) n) (rerdaw e 1)(redraw entlast 1) (command "undo" "e") (prin1)) Kod: (defun C:bRk1 (/ n) (command "break" (car (entsel)) (setq n (getpoint)) n)) Hatta daha da ileri gidip, obje seçerken kırma noktasını da tek tıkla seçmek için;Kod: (defun C:bRk2 (/ n) (setq n (entsel))(command "break" (car n)(cadr n)(cadr n)))
|
20.01.2017 11:58
boldpilot70 |
Selam arkadaşlar
Resimdeki gibi polyline çizgiyi üzerindeki noktaların olduğu yerden kırabilen bir lisp arıyorum. Örneğin önce kırılacak çizgiyi seçip sonrada noktaların hepsini seçip noktaların olduğu yerden kırmak. admin (06.04.2018 21:21 GMT) |
alumina |
Alıntı Explode islemini sonradan manuel olarak yaparsin. https://cizimokulu.com/t16263-autolisp-polylinea-kesisim-noktalarinda-vertex-ekleyen-lisp.html&n=last#bottom
|