Drawing slots
Drawing slots
(OP)
I routinely draw full-radius slots of various sizes. I typically draw a rectangle and then fillet each of the four corners to a radius half the width of the slot.
Two questions:
1) Is there a way to fillet all four corners simultaneously?
2) Does anybody have a routine to automatically draw slots?
Two questions:
1) Is there a way to fillet all four corners simultaneously?
2) Does anybody have a routine to automatically draw slots?





RE: Drawing slots
I use the following for slots, but there are others:
(defun C:SLOT (/ A B B1 B2 C D PW)
(setq PW (getvar"PLINEWID"))
(initget 1)
(setq B1 (getdist "\nLength of slot: "))
(setq B2 (/ B1 2.0))
(setq B (list B2 0.0))
(initget 1)
(setq C (list 0.0 (getdist "\nWidth of slot: ")))
(initget 1)
(while
(setq A (getpoint "\nInsertion point: "))
(setq D (list (- (car A) (/ (car B) 2)) (- (cadr A) (/ (cadr C) 2))))
(setvar "PLINEWID" 0)
(command "_.pline"
D
(mapcar '+ D B)
"_a"
(mapcar '+ D B C)
"_l"
(mapcar '+ D C)
"_a"
"_cl")
);while
(setvar "PLINEWID" PW)
(princ)
)
RE: Drawing slots
;| MSLOT, short for Milled SLOT
Copyright © 1998 Ronald W. Leigh
Requests width and two center points.
Draws a polyline with two straight and two arc segments.
Variables:
a/b Centers
a1/a2 Endpoints of arc around a
b1/b2 Endpoints of arc around b
ang Angle of slot centerline
obm Old blipmode setting, 0 or 1
r Radius of arcs
w Width of slot |;
(defun c:mslot (/ a a1 a2 ang b b1 b2 obm r w) ;line 1
(setq obm (getvar "blipmode")) ;line 2
(initget 7) ;line 3
(setq w (getreal "\nWidth of slot: ")) ;line 4
(setq r (/ w 2)) ;line 5
(setvar "blipmode" 1) ;line 6
(initget 1) ;line 7
(setq a (getpoint "\nLocate first center: ")) ;line 8
(initget 1) ;line 9
(setq b (getpoint a "\nLocate second center: ")) ;line 10
(setvar "blipmode" 0) ;line 11
(setq ang (angle a b)) ;line 12
(setq a1 (polar a (- ang (/ pi 2)) r)) ;line 13
(setq a2 (polar a (+ ang (/ pi 2)) r)) ;line 14
(setq b1 (polar b (- ang (/ pi 2)) r)) ;line 15
(setq b2 (polar b (+ ang (/ pi 2)) r)) ;line 16
(setvar "cmdecho" 0) ;line 17
(command ".pline" a1 b1 "A" b2 "L" a2 "A" "CL") ;line 18
(setvar "cmdecho" 1) ;line 19
(setvar "blipmode" obm) ;line 20
(princ) ;line 21
) ;line 22
If you need further asistance please contac me at k281969@hotmail.com
Pardal
RE: Drawing slots
There is no need to draw a rectangle and then fillet 4 times.
RE: Drawing slots