MattWin Posted June 17, 2009 Posted June 17, 2009 Hi all, slightly stumped with this one. I'm basically not new to AutoCAD, I have had several years experience with the program as I work with it all day at work! However I have a huge lack of experience when it comes to writing Lisp Routines (Don't know if there is a tutorial or a course I could do to learn how to write them?) The last couple of weeks I have been drawing plentiful amouints of gears as I have not found a solution to be able to draw gears (accurately) with a lisp routine. My problem is I have a lisp routine for being able to draw gears in DP but not in the (more commonly used now) MOD style of gears. I would like a lisp routine as it would basically save me a lot of time drawing (as I have around 20-30 different drawings to produce with all styles of gears all in MOD) Apoligies if I have posted in the wrong place too! Quote
BIGAL Posted June 18, 2009 Posted June 18, 2009 All gears and sprokets are based around the pitch centre diameter so you would need to draw 1 gear tooth and then use array circular to fill 360degs I would expect if you search you may find a lisp program to draw a tooth else its out with pen and paper to work out the maths the program method would use the polar command a lot ie calculate a point a angle and distance away from a known point. look into "help contents customization guide lisp" their is tutorials available thier. Quote
BIGAL Posted June 18, 2009 Posted June 18, 2009 Search the web for 2dgear.lsp its mentioned in other posts here. Quote
ReMark Posted June 18, 2009 Posted June 18, 2009 2Dgear.lsp is mentioned here: http://www.cadtutor.net/forum/showthread.php?t=8750 Quote
MattWin Posted June 19, 2009 Author Posted June 19, 2009 I have tried the 2Dgear.lsp and found that it is similar to the gear lisp routine I already had which only projects a gear in DP not MOD. However thankyou very much for the help, however my search still continues! I know how to draw a gear no problem but as mentioned in my previous post this will become very time consuming with all the drawings I am going to be doing over the next few weeks. I feel if I had the ability to write lisp routines I wouldnt have the problem I am in! Is there any literature on how to do this? Quote
ReMark Posted June 19, 2009 Posted June 19, 2009 Please educate me because drawing gears is not what I do for a living. Drawing a gear in DP versus MOD. The difference? Quote
The Buzzard Posted June 19, 2009 Posted June 19, 2009 Here is a PDF with formulas for creating spur gears that could be set up in your lisp routine to help you or help someone else to help you. Spur Gear PDF.zip Quote
The Buzzard Posted June 19, 2009 Posted June 19, 2009 I have tried the 2Dgear.lsp and found that it is similar to the gear lisp routine I already had which only projects a gear in DP not MOD. However thankyou very much for the help, however my search still continues! I know how to draw a gear no problem but as mentioned in my previous post this will become very time consuming with all the drawings I am going to be doing over the next few weeks. I feel if I had the ability to write lisp routines I wouldnt have the problem I am in! Is there any literature on how to do this? MattWin Please understand that writing a lisp routine for something such as this is not an overnight thing either. Many of us in this forum had to develope our skills over a given period of time, Some faster than others. I doubt you will learn how to do this over the next few weeks. If you are really interested in learning lisp check out this site: http://www.afralisp.net/ Or you may have to wait until someone has the time to walk you thru this. If you have a genuine interest in writing lisp, It would pay for you to get something started at this point by making an honest attempt at it. example: (defun C: GEAR () and take it step by step. You may find many people contributing to your thread with ideas to help send you in the right direction. If you are just looking for a lisp already written for you to your exact specifications, It may be a wait. There are many sites with free code, But most if not all are going to do things exactly the way you want. Finally the code 2DGEAR.lsp, Could this be modified to suit you? This could be a starting point. I wanted to mention all these options to you. Quote
The Buzzard Posted June 19, 2009 Posted June 19, 2009 I have tried the 2Dgear.lsp and found that it is similar to the gear lisp routine I already had which only projects a gear in DP not MOD. Can you explain the difference between DP and MOD for starters? I think this can make a difference on how complex the program needs to be. It would also be nice if you could provide a drawing of the gear. Quote
The Buzzard Posted June 19, 2009 Posted June 19, 2009 Can you explain the difference between DP and MOD for starters?I think this can make a difference on how complex the program needs to be. It would also be nice if you could provide a drawing of the gear. Ok, I found that DP is an Imperial system and MOD or Module is a metric system gear. Now I have some formulas for the calculations for MOD gears. Its a start anyway. See Attached. Module.doc Quote
The Buzzard Posted June 19, 2009 Posted June 19, 2009 Ok, I found that DP is an Imperial system and MOD or Module is a metric system gear. Now I have some formulas for the calculations for MOD gears. Its a start anyway. See Attached. And here is some more information explaining the difference. TO FIND METRIC IMPERIAL PCD Number of teeth x Mod No of teeth / DP O/D [No of teeth + 2] x Mod [No of teeth + 2] / DP DP 25.4 / Mod Pi [3.1416] / CP MODULE mm CP / Pi 25.4 / CP NO TEETH PCD [mm] - Mod PCD x DP CP Mod x Pi Pi / DP Pi can be taken as 3.1412. A quick note here on the difference between DP CP and module. DP which stands for Diametrical pitch is the number of teeth per inch measured on the pitch diameter. CP which stands for Circular Pitch is the distance measured between two teeth measured on the pitch diameter. The module is the metric equivalent of the circular pitch and is the distance between two teeth measured on the pitch diameter in millimeters. DP gear data is found by dividing the figures in Table 2 by the DP and the results will be in inches. Module gear data is found by multiplying the figures by the module and the results will be in millimeters. Now we have some info to work with. Quote
MattWin Posted June 19, 2009 Author Posted June 19, 2009 Please educate me because drawing gears is not what I do for a living. Drawing a gear in DP versus MOD. The difference? Can you explain the difference between DP and MOD for starters?I think this can make a difference on how complex the program needs to be. It would also be nice if you could provide a drawing of the gear. Apoligies, basically DP is an imperial system for gear cutting whereas MOD is (not necessarily a "modern" style) but is the metric alternative, MOD and DP do not translate and cannot "bind" with each other, a gear is either in DP or MOD. My engineering understanding exceeds my lisp creating knowledge! But I fully intend to read up on and try my best to start writing my own lisp routines. I don't think a "quick fix" is going to help me this time round! Quote
The Buzzard Posted June 19, 2009 Posted June 19, 2009 Apoligies, basically DP is an imperial system for gear cutting whereas MOD is (not necessarily a "modern" style) but is the metric alternative, MOD and DP do not translate and cannot "bind" with each other, a gear is either in DP or MOD. My engineering understanding exceeds my lisp creating knowledge! But I fully intend to read up on and try my best to start writing my own lisp routines. I don't think a "quick fix" is going to help me this time round! From viewing the 2DGEAR.lsp I can see the dialog was combined into the lisp making the program look alot larger than what its doing. I still feel at least on my end of it that this is not an easy program to do since it requires calculating many points of intersections. I can say that placing the given calculations to their respected functions would need to be done and would require many variables assigned to the points. Once the calculations are done and the values are assigned to the variables, You can then invoke command with this given information to draw the gear. There are other ways I sure to do this. Please forgive me for I am not an engineer and while I have some lisp experience a project such as this would take me a very long time to complete and I would require alot of help with it. What I have previously outlined in terms of the functions would be a good start. You would need to learn how to write basic functions just to get the feel for it. I realize that this is not going to help you in terms of your project, But at least you will know what you are in for if you should decide to go this route. There may be others on this site that can offer a more practical approach, But you will just have to wait it out and see. This is one of the best sites for help if not The Best Site and I doubt you will get an answer anywhere else. The site I pointed out to you for learning is a wonderful place to learn lisp and they show many types of examples. You would need to get yourself into a programming mood, But you will start to learn things quickly. Anyway Good Luck, I will try to do a search around for what you need and get back to you here if I should find something useful to you. The Buzzard Quote
The Buzzard Posted June 19, 2009 Posted June 19, 2009 MattWin Check out this site. http://www.kisssoft.ch/english/products/kisssoft.php Quote
MattWin Posted June 24, 2009 Author Posted June 24, 2009 Apoligies for my late reply i've been "out the office" the last few days and things have been a little hectic! That software package you suggested I am just downloading the demo version now, I will be requesting the 30 day trial of it and also notice there are several other features in that software that (if it interfaces with my AutoCAD seemlessly) will save me a LOT of time. Thanks all to all your help - Will post up a few comments about the software suggested in the next few days to show how I am getting on with it. 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.