Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drawing slots 1

Status
Not open for further replies.

Binary

Mechanical
May 16, 2003
247
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?
 
Replies continue below

Recommended for you

Fillet all four by making the rectangle a polyline and at atht fillet command use the "p" option.

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)
)
 
you can try it too:

;| 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
 
did you know you can fillet two parallel lines (join them with an arc that has a diameter equal to the distance between the lines) by just using the fillet command and picking the lines?

There is no need to draw a rectangle and then fillet 4 times.
 
I your drawing is in 3D you can create a cylinder of the size of the slot and deduct it from the object containing the slot. Then you can go either 2D or 3D wireframe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor