Madruga_SP Posted January 27, 2014 Posted January 27, 2014 Hi guys, I need a little help. The fillet command didn't work as I want to for the lines. I want to make a fillet in 2 two lines with differents layers and join it and turn into the first line layer I selected. Just like a polyline but with lines. Thank in advance Quote
Madruga_SP Posted January 27, 2014 Author Posted January 27, 2014 I don't know if I explained clearly my task. But I'd like the Fillet command worked in line just like works in polyline. Sorry for my poor English Thank you very much! Quote
pefi Posted January 27, 2014 Posted January 27, 2014 You want the result of fillet (arc) to be on the same layer as the first line and you also want second picked line to be moved to the same layer as the first line? Quote
Madruga_SP Posted January 27, 2014 Author Posted January 27, 2014 Hi pefi, Thank you for the quick replay You want the result of fillet (arc) to be on the same layer as the first line and you also want second picked line to be moved to the same layer as the first line? Almost that. I just I wanna the fillet (arc) to be on the same layer as the first line and joining it. Remembering it is a LINE. Thank you. Quote
pefi Posted January 27, 2014 Posted January 27, 2014 (defun c:ff () (command "_fillet" (setq line_1 (entsel)) (entsel)) (command "_matchprop" line_1 "l" "") (princ) ) No handrails - use carefully. Uses whatever radius you have set in FILLET command. P.S. LISP gurus here could do it better, so wait for more answers. Quote
Madruga_SP Posted January 27, 2014 Author Posted January 27, 2014 Thank you pefi... very kind of you interest in my task. I really appreciate that. But the code didn't work as I expected to, have to set the radius and make the line the same layer. Thank you anyway I hope someone can help me out. Quote
jdiala Posted January 27, 2014 Posted January 27, 2014 (defun C:ff (/ l a p1 p2 b) (if (setq a (entsel) p1 (vlax-curve-getclosestpointto (vlax-ename->vla-object (car a)) (cadr a)) l (cdr (assoc 8 (entget (car a)))) b (entsel) p2 (vlax-curve-getclosestpointto (vlax-ename->vla-object (car b)) (cadr b)) ) (progn (vla-put-layer (vlax-ename->vla-object (car b)) l) (command "._fillet" "_non" p1 "_non" p2) (if (> 0 (getvar 'filletrad)) (vla-put-layer (vlax-ename->vla-object (entlast)) l) ) ) ) (princ) )(vl-load-com) Quote
Madruga_SP Posted January 27, 2014 Author Posted January 27, 2014 Hi jdiala, Thank you for the code, just need to specify fillet radius. Could you help me, please? Regards Quote
jdiala Posted January 27, 2014 Posted January 27, 2014 Hi jdiala,Thank you for the code, just need to specify fillet radius. Could you help me, please? Regards Sorry for the dirty code and inefficient code. No error function and testing for pick entities. I don't have much time to work on it. Someone will surely come to your aid on this one. Now back to my work, have a deadline to meet. (defun C:ff (/ l a p1 p2 b ) (if (and (setvar 'filletrad (getreal "\nEnter radius :")) (setq a (entsel) p1 (vlax-curve-getclosestpointto (vlax-ename->vla-object (car a)) (cadr a)) l (cdr (assoc 8 (entget (car a)))) b (entsel) p2 (vlax-curve-getclosestpointto (vlax-ename->vla-object (car b)) (cadr b)) ) ) (progn (vla-put-layer (vlax-ename->vla-object (car b)) l) (command "._fillet" "_non" p1 "_non" p2) (if (> 0 (getvar 'filletrad)) (vla-put-layer (vlax-ename->vla-object (entlast)) l) ) ) ) (princ) ) Quote
neophoible Posted January 27, 2014 Posted January 27, 2014 Here is a version to try as well. (defun c:ff (/ 1stLine NewArc) (command "_.fillet" (setq 1stLine (entsel "First line: ")) (entsel "Other line: ")) (setq NewArc (entlast)) (command "_.PEdit" 1stLine "_J" NewArc "" "") (princ) ) I don't have time to add any options, but you can set the Fillet Radius separately by running the command or by changing the system variable FILLETRAD. BTW, it is not very efficient to be constantly changing the radius, y'know. Also, it is much more efficient to ask for what you want on the front end, instead of having all sorts of edits being added. Do I sound like I get tired of pointing that out? Quote
BIGAL Posted January 28, 2014 Posted January 28, 2014 Add a IF for fillet rad (defun c:ff (/ 1stLine NewArc rad) (setq rad (getreal "\Enter new radius or <Cr> ")) (if (= rad nil) (princ) (setvar "filletrad" rad) ) (command "_.fillet" (setq 1stLine (entsel "First line: ")) (entsel "Other line: ")) (setq NewArc (entlast)) (command "_.PEdit" 1stLine "_J" NewArc "" "") (princ) ) Quote
Madruga_SP Posted January 28, 2014 Author Posted January 28, 2014 @Jdiala, The code worked great. Thank you very much, you helped me a lot! Thank you for take your time to help me out. @neophoible Thank you for interest in my task and trying to help me. I'll trying to make the complement just like you said. Thank you! @BIGAL Did you do the complement in neophoible's code? Thank you very much. I'm really happy in seeing many people trying to help me. Thank you very much. Regards 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.