TheSwamp
CAD Forums => CAD General => Topic started by: MSTG007 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
-
There was a tip in the wayback machine
http://cadtips.cadalyst.com/content/dynamic-fillet
-
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
-
..
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 :?
-
I don't see where the OP mentioned C3D. I guess you guys know something that is not apparent here.
-
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:
;;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.
;;fillet command that askes for radius first
(defun c:fr ()
(command ".fillet" "r" pause "" ".fillet")(princ)
These are basic but they work great...
-
Now we are talking! Thank you!
-
The following will create custom commands for every radius listed (4.5, 10, 20, 30 etc.):
Since commands cannot contain points, radii such as 4.5 will be represented by the command "F4-5".
Lee
-
Wow lee once again... smooth and simple. Makes me wonder if that same format would work for an offset command. But way Cool.
-
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:
The above will created commands "O4-5", "O10", "O20" etc.
-
hehehe... way awesome.
-
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
_$ (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)
)
(C:F4-5 C:F10 C:F20 C:F30 C:F40)
_$
(Ps: fil is not essential :-D)
Regards,
-
(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.
-
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 ..
(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,
-
As an extension of this idea: using a Command Reactor to automatically interpret unknown commands as custom FILLET commands. (http://bit.ly/1LsRWQR)
-
that is pretty clever. Thanks for pointing that out! Great stuff.
-
that is pretty clever. Thanks for pointing that out! Great stuff.
Thanks! - All credit to BIGAL over at CADTutor for the original idea :-)