Crystallize123 Posted Saturday at 04:51 AM Posted Saturday at 04:51 AM (edited) Hello, I am currently writing a Lisp routine to draw a spur gear with root fillets. After using ARRAY, I realized there is this tiny imperfection between the teeth which makes it impossible to REGION. I wonder if anyone has any solutions for this. Here is the code for the fillet arcs. The full program is a research project so I am quite hesitant to share. (command "_ARC" "C" (list (- fillet_r) base_r) (list (- fillet_r) root_r) "a" 90) (setq fillet (entlast)) (command "_ROTATE" fillet "" (list 0 0) (rtd half_angle_base)) (setq cos_fillet_num (+ (expt (- base_r fillet_r) 2) (expt base_r 2) (- (* 2 (expt fillet_r 2))))) (setq cos_fillet_dem (* 2 (- base_r fillet_r) base_r)) (setq fillet_angle (acos (/ cos_fillet_num cos_fillet_dem))) (command "_ARC" "C" (list 0 0) (list (- fillet_r) root_r) "A" (rtd (- fillet_half_angle_base fillet_angle))) (setq unfilleted_base (entlast)) (command "_ROTATE" unfilleted_base "" (list 0 0) (rtd half_angle_base)) Apologies for not formatting the code. If you need details on the math then just ask me. Edited 11 hours ago by SLW210 Added Code Tags! Quote
SLW210 Posted 10 hours ago Posted 10 hours ago To place code in tags you simply use the <> in the editor toolbar, then place your code in the text area and insert. There are several gear LISP around. LISP routine for 2D internal involute gears. - AutoLISP, Visual LISP & DCL - AutoCAD Forums A pretty good thread on drawing gears by hand, it will give steps needed to be accurate. How to 2D Draw A Tooth of Gear? - AutoCAD Beginners' Area - AutoCAD Forums Though in your case, you might just need a LISP, etc. to Trim and or Join the imperfections, maybe FILLET>R=0. In reality, you have something slightly off with the math and could just be rounding errors and/or just a very slight imperfection somewhere. You might want to post a .dwg and your math. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.