buildwitharch Posted March 19, 2010 Posted March 19, 2010 Hello. does anyone have a LISP that will run a continuous Fillet. I want to fillet a bunch of lines that cross without having to do the command over and over. It sould just clip the previous line selected with the next one (like a schematic profile for a stair, for instance). If it could automatically convert to a Pline also, that would be cool but not nec. Thanks Aaron Quote
nukecad Posted March 19, 2010 Posted March 19, 2010 Not a lisp but try changing your menu button to read- *^C^C_fillet The '*' tells it to repeat the command so once you have clicked it, and given a radius if you want, you just have to keep picking the lines you want to fillet. Press Esc to stop the repetition. Quote
alanjt Posted March 19, 2010 Posted March 19, 2010 Walking out the door, so I can't finish, but it's basically there... (defun c:CF (/ e1 e2) (while (and (setq e1 (entsel "\nSelect curve: ")) (or (vl-position (cdr (assoc 0 (entget e1))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!")) (setq e2 (entsel "\nSelect other curve: ")) (or (vl-position (cdr (assoc 0 (entget e2))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!")) (vl-cmdf "_.fillet" e1 e2) (vl-cmdf "_.pedit" Sorry. Quote
buildwitharch Posted March 19, 2010 Author Posted March 19, 2010 cool, that's a quick option but it still requires me to select the one line twice. Thanks for the the tip on the *. Quote
buildwitharch Posted March 19, 2010 Author Posted March 19, 2010 Walking out the door, so I can't finish, but it's basically there... (defun c:CF (/ e1 e2) (while (and (setq e1 (entsel "\nSelect curve: ")) (or (vl-position (cdr (assoc 0 (entget e1))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!")) (setq e2 (entsel "\nSelect other curve: ")) (or (vl-position (cdr (assoc 0 (entget e2))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!")) (vl-cmdf "_.fillet" e1 e2) (vl-cmdf "_.pedit" Sorry. I'm trying this one too. I'm not that proficient in LISP's so it may take me a little while. thanks Quote
alanjt Posted March 19, 2010 Posted March 19, 2010 Sorry I didn't have time to finish earlier... (defun c:CF (/ e1 e2) (vl-load-com) (while (and (setq e1 (entsel "\nSelect curve: ")) (or (vl-position (cdr (assoc 0 (entget (car e1)))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!") ) ;_ or (setq e2 (entsel "\nSelect other curve: ")) (or (vl-position (cdr (assoc 0 (entget (car e2)))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!") ) ;_ or (vl-cmdf "_.fillet" e1 e2) (if (zerop (getvar 'peditaccept)) (vl-cmdf "_.pedit" "_m" (ssadd (car e1) (ssadd (car e2))) "" "_y" "_j" "" "") (vl-cmdf "_.pedit" "_m" (ssadd (car e1) (ssadd (car e2))) "" "_j" "" "") ) ;_ if ) ;_ and ) ;_ while (princ) ) ;_ defun Quote
buildwitharch Posted March 19, 2010 Author Posted March 19, 2010 Sorry I didn't have time to finish earlier... (defun c:CF (/ e1 e2) (vl-load-com) (while (and (setq e1 (entsel "\nSelect curve: ")) (or (vl-position (cdr (assoc 0 (entget (car e1)))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!") ) ;_ or (setq e2 (entsel "\nSelect other curve: ")) (or (vl-position (cdr (assoc 0 (entget (car e2)))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!") ) ;_ or (vl-cmdf "_.fillet" e1 e2) (if (zerop (getvar 'peditaccept)) (vl-cmdf "_.pedit" "_m" (ssadd (car e1) (ssadd (car e2))) "" "_y" "_j" "" "") (vl-cmdf "_.pedit" "_m" (ssadd (car e1) (ssadd (car e2))) "" "_j" "" "") ) ;_ if ) ;_ and ) ;_ while (princ) ) ;_ defun This works similar to adding the "*" to the comand. It is nicer in that it makes the new line a polyline. That part is cool. Here is what i have in mind tho. I would like to be able to select the lines (in exhibit A) 7, A, 6, B, 5, C....etc. to achieve polyline stair pattern in exhibit B by only selecting those lines with one click in sequence. Currently I have to click 7 then A, A again then 6, 6 again then B and so forth. Does this make sence? I do appreciate your help. Thanks Quote
mdbdesign Posted March 19, 2010 Posted March 19, 2010 Try this: http://www.nyacad.com/NYacadFREE.htm Install and use ff to run. Beside it got a lots other goods. Unless Lee pop with new idea to do it. Quote
alanjt Posted March 20, 2010 Posted March 20, 2010 This works similar to adding the "*" to the comand. It is nicer in that it makes the new line a polyline. That part is cool. Here is what i have in mind tho. [ATTACH]18203[/ATTACH] I would like to be able to select the lines (in exhibit A) 7, A, 6, B, 5, C....etc. to achieve polyline stair pattern in exhibit B by only selecting those lines with one click in sequence. Currently I have to click 7 then A, A again then 6, 6 again then B and so forth. Does this make sence? I do appreciate your help. Thanks You're welcome. It does what you asked. Quote
BIGAL Posted March 22, 2010 Posted March 22, 2010 You could draw a line over all the lines and then calculate the intersection point of each crossing line do a sort based on line length from start to new point. Then its just fillet pt1 pt2, pt1=pt2, new pt2, fillet pt1 pt2 etc I have done this for autodimensioning of house plan walls sorry code is copyright but can help if possible. Quote
buildwitharch Posted March 22, 2010 Author Posted March 22, 2010 You're welcome. It does what you asked. Good morning. I must not know how to use it then because I can only get it to work by clicking twice like I've described above.I will keep playing with it. Aaron Quote
alanjt Posted March 22, 2010 Posted March 22, 2010 Good morning. I must not know how to use it then because I can only get it to work by clicking twice like I've described above.I will keep playing with it. Aaron Isn't that what you originally asked for? Quote
buildwitharch Posted March 22, 2010 Author Posted March 22, 2010 Isn't that what you originally asked for? is it possible for the command to recognize the line selected in the last fillet and reuse it for the next fillet? I currently have to click the same line twice. I'm trying to eliminate one extra click in a string of fillets. The rest of the command works great. Quote
alanjt Posted March 22, 2010 Posted March 22, 2010 is it possible for the command to recognize the line selected in the last fillet and reuse it for the next fillet? I currently have to click the same line twice. I'm trying to eliminate one extra click in a string of fillets. The rest of the command works great. Maybe something like this... (defun c:CF (/ e1 e2 lst ss) (vl-load-com) (while (and (or lst (and (setq e1 (entsel "\nSelect curve: ")) (or (vl-position (cdr (assoc 0 (entget (car e1)))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!") ) ;_ or (setq lst (cons e1 lst)) ) ;_ and ) ;_ or (setq e2 (entsel "\nSelect next curve: ")) (or (vl-position (cdr (assoc 0 (entget (car e2)))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!") ) ;_ or (setq lst (cons e2 lst)) (vl-cmdf "_.fillet" (cadr lst) (car lst)) ) ;_ and ) ;_ while (setq ss (ssadd)) (foreach x lst (setq ss (ssadd (car x) ss))) (if (zerop (getvar 'peditaccept)) (vl-cmdf "_.pedit" "_m" ss "" "_y" "_j" "" "") (vl-cmdf "_.pedit" "_m" ss "" "_j" "" "") ) ;_ if (princ) ) ;_ defun Quote
buildwitharch Posted March 22, 2010 Author Posted March 22, 2010 Maybe something like this... (defun c:CF (/ e1 e2 lst ss) (vl-load-com) (while (and (or lst (and (setq e1 (entsel "\nSelect curve: ")) (or (vl-position (cdr (assoc 0 (entget (car e1)))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!") ) ;_ or (setq lst (cons e1 lst)) ) ;_ and ) ;_ or (setq e2 (entsel "\nSelect next curve: ")) (or (vl-position (cdr (assoc 0 (entget (car e2)))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!") ) ;_ or (setq lst (cons e2 lst)) (vl-cmdf "_.fillet" (cadr lst) (car lst)) ) ;_ and ) ;_ while (setq ss (ssadd)) (foreach x lst (setq ss (ssadd (car x) ss))) (if (zerop (getvar 'peditaccept)) (vl-cmdf "_.pedit" "_m" ss "" "_y" "_j" "" "") (vl-cmdf "_.pedit" "_m" ss "" "_j" "" "") ) ;_ if (princ) ) ;_ defun Wow, you really write that stuff fast. This one works good for the fillet. I have some ideas for the mods (polyline yes / no option and select radius) but that can be later. Thanks for your help. Quote
alanjt Posted March 22, 2010 Posted March 22, 2010 Wow, you really write that stuff fast. This one works good for the fillet. I have some ideas for the mods (polyline yes / no option and select radius) but that can be later. Thanks for your help. (defun c:CF (/ e1 e2 lst lst2 ss) (setvar 'filletrad (cond ((getdist (strcat "\nSpecify fillet radius <" (rtos (getvar 'filletrad)) ">: "))) ((getvar 'filletrad)) ) ;_ cond ) ;_ setvar (while (and (or lst (and (setq e1 (entsel "\nSelect curve: ")) (or (vl-position (cdr (assoc 0 (entget (car e1)))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!") ) ;_ or (setq lst (cons e1 lst)) ) ;_ and ) ;_ or (setq e2 (entsel "\nSelect next curve: ")) (or (vl-position (cdr (assoc 0 (entget (car e2)))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!") ) ;_ or (setq lst (cons e2 lst)) (vl-cmdf "_.fillet" (cadr lst) (car lst)) (or (zerop (getvar 'filletrad)) (setq lst2 (cons (list (entlast)) lst2))) ) ;_ and ) ;_ while (initget 0 "Yes No") (and (eq "Yes" (getkword "\nConvert to LWPolyline? [Yes/No] <No>: ")) (setq ss (ssadd)) (foreach x (append lst lst2) (setq ss (ssadd (car x) ss))) (if (zerop (getvar 'peditaccept)) (vl-cmdf "_.pedit" "_m" ss "" "_y" "_j" "" "") (vl-cmdf "_.pedit" "_m" ss "" "_j" "" "") ) ;_ if ) ;_ and (princ) ) ;_ defun Quote
buildwitharch Posted March 22, 2010 Author Posted March 22, 2010 (defun c:CF (/ e1 e2 lst lst2 ss) (setvar 'filletrad (cond ((getdist (strcat "\nSpecify fillet radius <" (rtos (getvar 'filletrad)) ">: "))) ((getvar 'filletrad)) ) ;_ cond ) ;_ setvar (while (and (or lst (and (setq e1 (entsel "\nSelect curve: ")) (or (vl-position (cdr (assoc 0 (entget (car e1)))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!") ) ;_ or (setq lst (cons e1 lst)) ) ;_ and ) ;_ or (setq e2 (entsel "\nSelect next curve: ")) (or (vl-position (cdr (assoc 0 (entget (car e2)))) '("ARC" "LINE" "LWPOLYLINE")) (alert "Invalid object!") ) ;_ or (setq lst (cons e2 lst)) (vl-cmdf "_.fillet" (cadr lst) (car lst)) (or (zerop (getvar 'filletrad)) (setq lst2 (cons (list (entlast)) lst2))) ) ;_ and ) ;_ while (initget 0 "Yes No") (and (eq "Yes" (getkword "\nConvert to LWPolyline? [Yes/No] <No>: ")) (setq ss (ssadd)) (foreach x (append lst lst2) (setq ss (ssadd (car x) ss))) (if (zerop (getvar 'peditaccept)) (vl-cmdf "_.pedit" "_m" ss "" "_y" "_j" "" "") (vl-cmdf "_.pedit" "_m" ss "" "_j" "" "") ) ;_ if ) ;_ and (princ) ) ;_ defun That works better than I expected. It will be very useful. Thanks for your time. Quote
alanjt Posted March 22, 2010 Posted March 22, 2010 That works better than I expected. It will be very useful. Thanks for your time. No problem. Quote
Lee Mac Posted March 22, 2010 Posted March 22, 2010 Nice one Alan You love your logical operators Quote
alanjt Posted March 22, 2010 Posted March 22, 2010 Nice one Alan You love your logical operators Thanks. HaHa, I guess it does have a few. LoL Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.