Author Topic: Change Fillet Radii more quickly  (Read 2825 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Water Moccasin
  • Posts: 2026
  • I can't remeber what I already asked! I need help!
Change Fillet Radii more quickly
« on: July 21, 2015, 07:58:55 am »
Is there a quick way to change fillet radius rather than going through the command progression of (fillet;Radius;number)?

I did not know if there way a command that could be (f20; which would make it a fillet of 20; or f4.5; which would make the fillet 4.5.

Just curious as usual. Thanks
Autodesk Infrastructure Design Suite 2017

Master_Shake

  • Swamp Rat
  • Posts: 1254
Re: Change Fillet Radii more quickly
« Reply #1 on: July 21, 2015, 08:00:57 am »
There was a tip in the wayback machine

http://cadtips.cadalyst.com/content/dynamic-fillet

mjfarrell

  • Seagull
  • Posts: 14023
  • Every Student their own Lesson
Re: Change Fillet Radii more quickly
« Reply #2 on: July 21, 2015, 08:34:26 am »
one could put several 'fillets' on a tool palette


or investigate snap increment for alignment curves;  if that is what you are working with in C3D
Be your Best


Michael Farrell
http://primeservicesglobal.com/

huiz

  • Swamp Rat
  • Posts: 774
  • Certified Prof C3D
Re: Change Fillet Radii more quickly
« Reply #3 on: July 21, 2015, 08:44:43 am »
..

or investigate snap increment for alignment curves;  if that is what you are working with in C3D


Cool tip! I work with Civil3D for 8 years and didn't know of that  :?

The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

Rob...

  • King Gator
  • Posts: 3769
  • Take a little time to stop and smell the roses.
Re: Change Fillet Radii more quickly
« Reply #4 on: July 21, 2015, 08:49:42 am »
I don't see where the OP mentioned C3D. I guess you guys know something that is not apparent here.
CAD Tech

tedg

  • Swamp Rat
  • Posts: 780
Re: Change Fillet Radii more quickly
« Reply #5 on: July 21, 2015, 09:13:22 am »
Is there a quick way to change fillet radius rather than going through the command progression of (fillet;Radius;number)?

I did not know if there way a command that could be (f20; which would make it a fillet of 20; or f4.5; which would make the fillet 4.5.

Just curious as usual. Thanks
If you're into using lisp, some simple examples:

The command could be F20 and you fillet two lines with a 20 radius:
Code: [Select]

;;fillets 2 lines at "20" radius
(defun c:f20 ()
        (setq fr (getvar "filletrad"))
        (setq ob1 (entsel))
        (setq ob2 (entsel))
        (setvar "filletrad" 20)
        (command ".fillet" ob1 ob2)
        (setvar "filletrad" fr)(princ))

Or one I use allot which is just a lisp version of the command string you're trying to avoid.
You type "FR" and then the radius you want and select your lines.
Code: [Select]

;;fillet command that askes for radius first
(defun c:fr ()
(command ".fillet" "r" pause "" ".fillet")(princ)


These are basic but they work great...
Windows 7 Pro 64bit, AutoCAD 2017, REVIT 2017, Inventor Professional 2015

MSTG007

  • Water Moccasin
  • Posts: 2026
  • I can't remeber what I already asked! I need help!
Re: Change Fillet Radii more quickly
« Reply #6 on: July 21, 2015, 10:59:24 am »
Now we are talking! Thank you!
Autodesk Infrastructure Design Suite 2017

Lee Mac

  • Seagull
  • Posts: 11793
  • AutoCAD 2015 Windows 7 London, England
Re: Change Fillet Radii more quickly
« Reply #7 on: July 21, 2015, 12:26:22 pm »
The following will create custom commands for every radius listed (4.5, 10, 20, 30 etc.):

Code - Auto/Visual Lisp: [Select]
  1. (   (lambda nil
  2.        (foreach rad '(4.5 10 20 30)
  3.            (eval
  4.                (list 'defun
  5.                    (read (strcat "c:f" (vl-string-translate "." "-" (vl-princ-to-string rad))))
  6.                   '( / fil )
  7.                   '(setq fil (getvar 'filletrad))
  8.                    (list 'setvar ''filletrad rad)
  9.                   '(vl-cmdf "_.fillet")
  10.                   '(while (< 0 (getvar 'cmdactive)) (vl-cmdf "\\"))
  11.                   '(setvar 'filletrad fil)
  12.                   '(princ)
  13.                )
  14.            )
  15.        )
  16.        (princ)
  17.    )
  18. )

Since commands cannot contain points, radii such as 4.5 will be represented by the command "F4-5".

Lee

MSTG007

  • Water Moccasin
  • Posts: 2026
  • I can't remeber what I already asked! I need help!
Re: Change Fillet Radii more quickly
« Reply #8 on: July 21, 2015, 01:01:51 pm »
Wow lee once again... smooth and simple. Makes me wonder if that same format would work for an offset command. But way Cool.
Autodesk Infrastructure Design Suite 2017

Lee Mac

  • Seagull
  • Posts: 11793
  • AutoCAD 2015 Windows 7 London, England
Re: Change Fillet Radii more quickly
« Reply #9 on: July 21, 2015, 01:28:16 pm »
Wow lee once again... smooth and simple. Makes me wonder if that same format would work for an offset command. But way Cool.

Thanks! - The OFFSET command could be something like:

Code - Auto/Visual Lisp: [Select]
  1. (   (lambda nil
  2.        (foreach dis '(4.5 10 20 30)
  3.            (eval
  4.                (list 'defun
  5.                    (read (strcat "c:o" (vl-string-translate "." "-" (vl-princ-to-string dis)))) nil
  6.                    (list 'vl-cmdf "_.offset" dis)
  7.                   '(while (< 0 (getvar 'cmdactive)) (vl-cmdf "\\"))
  8.                   '(princ)
  9.                )
  10.            )
  11.        )
  12.        (princ)
  13.    )
  14. )

The above will created commands "O4-5", "O10", "O20" etc.

MSTG007

  • Water Moccasin
  • Posts: 2026
  • I can't remeber what I already asked! I need help!
Re: Change Fillet Radii more quickly
« Reply #10 on: July 21, 2015, 03:16:39 pm »
hehehe... way awesome.
Autodesk Infrastructure Design Suite 2017

bruno_vdh

  • Guest
Re: Change Fillet Radii more quickly
« Reply #11 on: July 24, 2015, 06:42:16 am »
Hello,
Since commands cannot contain points, radii such as 4.5 will be represented by the command "F4-5".

That's why I prefer to work with mapcar, the function list is returned to the loading
Code: [Select]
_$ (mapcar '(lambda (rad)
           (eval (list 'defun
                       (read (strcat "c:f" (vl-string-translate "." "-" (vl-princ-to-string rad))))
                       nil
                       (list 'setvar "filletrad" rad)
                       '(vl-cmdf "_.fillet")
                       '(while (< 0 (getvar 'cmdactive)) (vl-cmdf "\\"))
                       (list 'setvar "filletrad" (getvar 'filletrad))
                       '(princ)
                 )
           )
         )
        '(4.5 10 20 30 40)
)
Code: [Select]
(C:F4-5 C:F10 C:F20 C:F30 C:F40)
_$
(Ps: fil is not essential  :-D)

Regards,

Lee Mac

  • Seagull
  • Posts: 11793
  • AutoCAD 2015 Windows 7 London, England
Re: Change Fillet Radii more quickly
« Reply #12 on: July 24, 2015, 12:21:57 pm »
(Ps: fil is not essential  :-D)

But what if the user changes the FILLETRAD system variable after the function has been defined?
The system variable will then be reset to the wrong value.

bruno_vdh

  • Guest
Re: Change Fillet Radii more quickly
« Reply #13 on: July 24, 2015, 05:45:31 pm »
But what if the user changes the FILLETRAD system variable after the function has been defined?
The system variable will then be reset to the wrong value.
Yes sorry, I talk too fast and you are right. :oops:


Now I'll have a little cheat ..
Code: [Select]
(mapcar
  '(lambda (rad)
     (eval
       (list
'defun
(read (strcat "c:f" (vl-string-translate "." "-" (vl-princ-to-string rad))))
'(/ *error*)
'(eval
   (list
    'defun
    '*error*
    '(msg)
    (list 'setvar "filletrad" (getvar 'filletrad))
    '(if msg (princ msg))
    '(princ)
   )
  )
(list 'setvar "filletrad" rad)
'(vl-cmdf "_.fillet")
'(while (< 0 (getvar 'cmdactive)) (vl-cmdf "\\"))
'(*error* nil)
       )
     )
   )
  '(4.5 10 20 30 40)
)

Regards,

Lee Mac

  • Seagull
  • Posts: 11793
  • AutoCAD 2015 Windows 7 London, England