- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
try this LISP it the prompt name is "MLFA" it asks what radius you want for the arc, then you drawing your circuit. works for lighting and power. Side effects i have noticed is it turns your snaps off occationally.
;; MultiLineFilletAlong.lsp [command name: MLFA]
;; To draw Multiple sequential Lines and Fillet the corners Along the way.
;; User specifies non-zero Fillet radius [offers current radius as default if non-zero].
;; Turns Ortho on for right-angle corners, but can be edited to not do so, and/or
;; User can turn it off or on during routine.
;; Notifies User if any combination of Lines cannot be Filleted at current radius;
;; check designed for right angles, so may not always work if non-orthogonal.
;; Draws on the current Layer.
;; Kent Cooper, 13 June 2013
(defun C:MLFA ; = Multiple Lines, Filleted Along the way
(/ *error* *fr *len cmde orth lin1 lin2)
(defun *error* (errmsg)
(if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break"))
(prompt (strcat "\nError: " errmsg))
); if
(setvar 'orthomode orth) ;; delete or comment out if not desired
(command "_.undo" "_end")
(setvar 'cmdecho cmde)
(princ)
); defun - *error*
(defun *fr () (getvar 'filletrad))
(defun *len (lin); long enough for Fillet radius? [appropriate for right-angle corners only]
(>= (vlax-curve-getEndParam lin) (getvar 'filletrad))
); defun
(setq
cmde (getvar 'cmdecho)
orth (getvar 'orthomode) ;; delete or comment out if not desired
); setq
(setvar 'cmdecho 0)
(command "_.undo" "_begin" "_.ortho" "on") ;; delete last two words if not desired
(initget (if (= (*fr) 0) 7 6)); no 0, no negative, no Enter if FILLETRAD=0
(setvar 'filletrad
(cond
((getdist
(strcat
"\nNon-zero Fillet radius"
(if (= (*fr) 0) "" (strcat " <" (rtos (*fr)) ">")); current as option only if non-zero
": "
); strcat
); getdist
); User-specified-radius condition
((*fr)); keep current value on User Enter if non-zero
); cond
); setvar
(prompt "\nTo draw sequence of Lines to Fillet,")
(command "_.line" pause pause "")
(setq lin1 (entlast))
(while (setq pt (getpoint (getvar 'lastpoint) "\nNext point: "))
(command "_.line" "@" pt "")
(setq lin2 (entlast))
(if (and (*len lin1) (*len lin2))
(command "_.fillet" lin1 lin2); then
(prompt "\nLine(s) not long enough."); else
); if
(setq lin1 lin2); last Line becomes first for next Fillet
); while
(setvar 'orthomode orth) ;; delete or comment out if not desired
(command "_.undo" "_end")
(setvar 'cmdecho cmde)
(princ)
); defun
(vl-load-com)
(prompt "\nType MLFA to draw Multiple Lines Filleted Along the way.")