明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1101|回复: 2

请问哪里有VLISP编的标准齿轮的程序吗,万分万分感谢!

[复制链接]
发表于 2008-5-7 23:18 | 显示全部楼层 |阅读模式
小弟做毕业设计急用,不知道贵网站有无,如果知道的学长请给个连接好吗?万分感谢您的帮助!
发表于 2008-5-8 06:51 | 显示全部楼层
搜索下,就能找到你要的东西
发表于 2008-5-11 17:59 | 显示全部楼层

转::::

(defun grinfo ()
   (setq c (getpoint "\n齿轮中心: "))
   (setq r (getreal "\n节距圆半径: "))
   (setq teeth (getint "\n齿数: "))
   (while (< teeth 14) (setq teeth (getint "\n必须至少14个齿: ")))
   (while (> teeth 50) (setq teeth (getint "\n必须不超过50个齿: ")))
   (while (< teeth 14) (setq teeth (getint "\n必须至少14个齿: ")))
   (while (> teeth 50) (setq teeth (getint "\n必须不超过50个齿: ")))
)

(defun calgear ()
   (setq pc (polar c 0 r))
   (setq d (* 2 r)) (setq pc (polar c 0 (/ d 2)))
   (setq ang3 2.79248)
   (setq ang5 (/ 360.000000 teeth))
   (setq wang -0.785385)
   (setq wang2 0.785385)
   (setq dp (/ teeth d))
   (setq ht (/ 0.32 dp))
   (setq adm (/ 1.0 dp))
   (setq y (* (/ 2.257 dp) 1.0642))
)

(defun drawgear ()
   (command "PLINE"
      (setq p (polar pc 0 adm))
      "a"
      "ce"
      c
      "l"
      ht
      "l"
      (setq p (polar (getvar "lastpoint") ang3 y))
      "a"
      "ce"
      c
      "l"
      ht
      ""
   )
   (SETQ TOP (GETVAR "LASTPOINT"))
   (command "MIRROR"
      "L"
      ""
      (setq p (polar pc 0 adm))
      c
      "n"
   )
   (command "ARRAY"
       "w"
       (POLAR TOP 4.712389 (* Y 1.5))
       (polar TOP 0 Y)
       ""
       "c"
       c
       ang5
       "-360"
       "Y"
   )
)

(defun C:2dc ()
    (grinfo)
    (setq stdots (getvar "blipmode"))
    (setq stech (getvar "cmdecho"))
    (setvar "blipmode" 0)
    (setvar "cmdecho" 0)
    (calgear)
    (drawgear)
    (setvar "blipmode" stdots)
    (setvar "cmdecho" stech))

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-10 13:50 , Processed in 0.153680 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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