Jump to content

Recommended Posts

Posted

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

Posted

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!

Posted

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?

Posted

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.

Posted

(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.

Posted

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.

:)

Posted
(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)

Posted

Hi jdiala,

Thank you for the code, just need to specify fillet radius.

 

Could you help me, please?

 

Regards

Posted
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)
)

Posted

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?;)

Posted

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)
)

Posted

@Jdiala,

The code worked great. Thank you very much, you helped me a lot!

 

Thank you for take your time to help me out.

:D

 

@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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...