Jump to content

lisp to fillet multi lines in one click


Recommended Posts

Posted

assalam alaikum

I need help to make fillet for multiple lines like image attached, in one click to fillet them all

01-04-2013 06-59-24 م.jpg

Posted

You could create one fillet and convert it to polyline... Then you can just do multiple offset on that pline...

 

M.R.

Posted

I mean

fillet all lines when I select all lines in one click not by use offset command

Posted

Does the fillet radius increase or are you keeping the fillet radius the same?

 

If you are keeping it the same fillet radius then I would invoke the "multiple" command at the command line and then type in fillet for the command to be repeated and follow the steps from there.

Posted

A method via lisp is to drag two lines over the lines, you can then decide 1 fillet rad or a seed radius which changes depending on the spacing between the lines, basicly you can have as many lines as you like so long as they are pairs.

 

 

 

Multifillet.jpg

Posted

@BIGAL

 

Do you have the lisp coding? Please can you post it.

Posted (edited)

Please read the CODE POSTING GUIDELINES and use Code Tags.

 

;;;---------------------------------------------------------------------------
;;;
;;;   autokerb rad.LSP   Version 1.0
;;;   by Alan H
;;;   1 Aug 2011
;;;   uses fillet given inside radius for any number of lines 
;;; 
;;;---------------------------------------------------------------------------
(defun C:krad (/ CM EN EN2 NUM OLDSNAP PT1 PT2 PT3 RAD SS1 SS2 TP1 TP2 ANS NUM2 PT4 X Y)
(vl-load-com)
(setq cm (getvar "cmdecho"))
(setvar "cmdecho" 1)
(setq oldsnap (getvar "osmode"))
(setvar "osmode" 0)
(setq pt1 (getpoint "\nPick outside first kerb :"))
(setq pt2 (getpoint Pt1 "\nPick centre pt :"))
(setq pt3 (getpoint pt2 "\nPick outside second kerb :"))
(setq rad (getreal "\nEnter  radius  :"))
(setq ss1 (ssget "F" (list pt1 pt2)))
(setq ss2 (ssget "F" (list pt3 pt2)))
(setq num (sslength ss1))
(setq num2 (sslength ss2))
(if (/= num num2)
(progn
(princ "\nYou have unequal number of lines ")
(Setq ans (getstring "\Press any key when ready and try again")) 
(exit)
)
)
(repeat num
(setq en (ssname ss1 0))
(setq en2 (ssname ss2 0))
(setq tp1 (cons (vlax-curve-getClosestPointTo en pt2) tp1))
(setq tp2 (cons (vlax-curve-getClosestPointTo en2 pt2) tp2))

(ssdel en ss1)   ; Delete each measured entity from set  
(ssdel en2 ss2)   ; Delete each measured entity from set                
)   ; end repeat
(reverse tp2)
(setq pt1 (nth 0 tp1))
(setq pt2 (nth 0 tp2))
(setvar "filletrad" rad) 
(command "fillet" pt1 pt2)
(setq num (- num 1))
(setq x 0)
(repeat  num
(setq pt1d (nth x tp1))
(setq pt2d (nth (+ x 1) tp1))
(setq rad (+ rad (distance pt1d pt2d)))   ;  add distance between to rad
(setvar "filletrad" rad)
(setq pt1 (nth (+ x 1) tp1))
(setq pt2 (nth (+ x 1) tp2))
(command "fillet" pt1 pt2) 
(setq x (+ x 1))
)     ; end repeat 

(setvar "CMDECHO" cm)
(setvar "osmode" oldsnap)
)

(princ)

Edited by SLW210
Added Code Tags!!
Posted (edited)

thank you...............

Edited by mostafa badran
Posted

Recognised that code known as kerbrad.lsp the original code was done to fillet road kerbs a task we often do for car parks. You can do as many lines as you like the lines do not have to actually have same offsets on the second group but it will base its fillet rad's on the first crossing selection. A single pick is possible by using a circle only problem is how big a circle ? The original code non Vl was written 20 years ago.

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