齿轮论坛 www.gearbbs.com

 找回密码
 注册
搜索
查看: 3531|回复: 2
收起左侧

渐开线的公式和画法

[复制链接]
发表于 2007-4-15 18:37 | 显示全部楼层 |阅读模式

本帖子中包含更多资源。

您需要 登录 才可以下载或查看,没有账号?注册

x
感谢:阿松

渐开线的公式是
x=r(cos(theta)+theta*sin(theta))
y=r(sin(theta)-theta*cos(theta))
r - 基圆半径
theta - 成形角,弧度值
在不同theta时算出x和y即可。

Autolisp做了个程序,希望对大家有用。欢迎大家讨论。这里用的极坐标。
;*************************************************************************************
;This program is to draw a involute in AutoCAD, anyone can use it freely without permission.
;Take the risk youself, suggest you to open a new drawing and run this program first, then
;copy it to your drawing.
;Chen Xiangsong
;
;Distance Offset: means when you draw a curve rather than a standard involute.
;   it starts to draw the curve not from the base circle.
;   it is curtate or prolate involute. it is useful as you draw gear root.
;   standard involute, enter 0
;
;Radius of Base Circle: You have to know the meaning, or the program is useless to you
;
;Angle to go:  means the length of involute you want. in degrees. it is not pressure
;   angle, it is the pressure angle add involute Phi.
;
;Accurancy:  the density of points you want on the curve, the smaller the more accurate.
;   but will slow down your pc's speed. I normally enter 0.01
;
;Center of Curve: PLEASE PICK A POINT ON THE SCREEN RANDOMLY, IT IS VERY IMPORTANT.
;   DON'T PICK A SPECIAL POINT. That's the disadvantage of my program.

(defun c:involute ()
(command "_undo" "be")
(setq os (getvar "osmode"))
(setvar "osmode" 0)
(setq q 0)
(setq f 0)
(setq h (getreal "\nDistance Offset:"))
(setq r (getreal "\nRadius of Base Circle:"))
(setq t (getreal "\nAngle to go:"))
(setq n (getreal "\nAccurancy:"))
(setq cent (getpoint "\nCenter of Curve:"))
(if (= h 0)  (command "pline"  (list (+ 0       (car cent)) (cadr cent))
     (list (+ (/ r 2) (car cent)) (cadr cent)) ""
  )
  (command "pline" (setq trimpoint (list (+ h r (car cent)) ((if (> h 0) - +) (cadr cent) (/ r 1))))
     (list (+ h r (car cent)) ((if (> h 0) - +) (cadr cent) (/ r 2))) ""
  )
)
(while (< f (* t (/ pi 180)))
(setq a (atan (* r f) (+ r h)))
(setq ri (/ (+ r h) (cos a)))
(setq q (- f a))
(setq pt0 (polar cent q ri))
(command "pline" "" pt0 "")
(setq f (+ f n))
)
(command "pedit" (entlast) "j" "all" "" "f" "")
(command "circle" cent r)
(setq bs (entlast))
(command "line" cent (list (+ 1 r h (car cent)) (cadr cent)) "")
(setq lt (entlast))
(if (= h 0) (command "trim" bs "" cent "")
  (command "trim" lt "" trimpoint "")
)
(command "erase" lt "")
(setvar "osmode" os)
(command "_undo" "e")
(princ)
)
发表于 2007-5-19 22:52 | 显示全部楼层

很荣幸

我的帖子被坛主看中,荣幸直至!
发表于 2012-7-27 00:10 | 显示全部楼层
谢谢分享
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|手机版|Archiver|齿轮论坛 www.gearbbs.com

GMT+8, 2025-5-10 13:43 , Processed in 0.159864 second(s), 8 queries , MemCache On.

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表