Jump to content

Recommended Posts

Posted (edited)

Hello, I am currently writing a Lisp routine to draw a spur gear with root fillets.

Untitled1.thumb.png.c8bf0c81cce17cbcc1e52bd2da553c1f.png

After using ARRAY, I realized there is this tiny imperfection between the teeth which makes it impossible to REGION.

Screenshot_1.thumb.png.1656f92b3adf3777c94efa04dd739038.png

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 by SLW210
Added Code Tags!
Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...