johnb80 Posted April 24, 2011 Share Posted April 24, 2011 Sorry about the vague title, not sure what title I should have used, I also apologise for my first post being a request for help! I have used Autocad for years, not in any great depth but I can usually knock out a drawing or two. I have recently bought a laser cutter and thus my Autocad useage has increased dramatically. I have searched the net for the answer to my question but I'm no furtehr forward so help please! I want to try and automate the DXF file production for some items that I manufacture. Imagine for example a box, 6 pieces to it left & right sides, top, bottom, front and back. I would like to be able to enter length, width and height at a prompt be it in Autocad or elsewhere and then a DXF file produced with the sizes entered for the laser cut files. The job I have in mind is more complex than this so the off the shelf box making programs wont work, I need to be able to modify dimensions in drawing from a prompt and then output it. Is this possible in Autocad? is it a function that Autolisp can do? Can anyone point me in the right direction please. Kind Regards - John Quote Link to comment Share on other sites More sharing options...
JD Mather Posted April 24, 2011 Share Posted April 24, 2011 I suspect it could be done in AutoCAD, but I would use Autodesk Inventor iLogic. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 25, 2011 Share Posted April 25, 2011 A cube would be easy to do in lisp as you say L W H can you post a dwg to show the more complex shape you want, looking at a cardboard box you need multi routines to make the complex tabs etc but it is do able. A Strart, you just need to keep track of your points just continue for the other sides. (setq L (getreal "\nEnter L")) (setq w (getreal "\nEnter W")) (setq pt1 (getpoint "\nPick point for box")) (setq pt2 (polar pt1 L 1.5708)) (setq pt3 (polar pt2 w 0.0)) (setq pt4 (polar pt3 L 3.1416)) (command "Line" pt1 pt2 pt3 "C" ) Just keep calculating points you need 12 for a cube and this would give an outside for your cutter. line pt1 pt2 pt3 pt4 pt5 etc Quote Link to comment Share on other sites More sharing options...
nicolas Posted April 25, 2011 Share Posted April 25, 2011 Hi, I believe that geometric and dimensional constraints can be helpful in your case. This will make dimensional-driven objects. You edit the dimensions and the objects are changed accordingly. You can also put relationship to the dimension for example dimension a = dimension b/2. Hope this help. Nicolas. Quote Link to comment Share on other sites More sharing options...
kencaz Posted April 25, 2011 Share Posted April 25, 2011 AutoCAD is not great at making flat patterns. I do a lot of 2D waterjet cutting and Inventor is the way to go in my opinion. We do some complex shapes from time to time and Inventors Sheet metal capabilities really helps with the calculating. I still have to clean up the .dxf output from Inventor in Autocad, however, it's really a time saver for making the patterns for me... KC Quote Link to comment Share on other sites More sharing options...
johnb80 Posted April 25, 2011 Author Share Posted April 25, 2011 Guys many thanks for your help, you've certainly given me a lot to think about. I have attached the actual drawing, it's a motor mount for a model aircraft and I want to sell it via an online shop. The main dimensions are variable i.e. the length, height, width, PCD of the mounting bolts, the dia of the mounting bolts etc. Buyers would fill out the table and place their order, I'd like to be able to transfer 10 dimensions into variables and it produce my dxf file. Well, thats the hope anyway, it seems from what you're saying it can be done. I have spent many years programming in assembler language so once I can see an example I should be OK (fingers crossed) Many thanks once again, great forum. Kind Regards - John mm.dxf Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 27, 2011 Share Posted April 27, 2011 Look more into constraints basicly a simple example a rectang L x W (draw a sq 1x1) you put in restraints in that says L=1 w=1 change L & W rectang redrawn automatically to new size. The notches can be a size also, radiuses can be a size and have a edge distance based on rad size. edge = rad/4 Definately look at Autocad help "Constraint" Quote Link to comment Share on other sites More sharing options...
johnb80 Posted April 27, 2011 Author Share Posted April 27, 2011 Thanks for that pointer, that looks like it will do what I want after an initial play, I just need to find a way to link points together eg if I have a circle in the middle of the block for the motor shaft to exit, I need it to stay centered and the the PCD of the mount holes referenced to the shaft centre. It is looking good though, many, many thanks for your help. Regards - John Quote Link to comment Share on other sites More sharing options...
johnb80 Posted April 27, 2011 Author Share Posted April 27, 2011 Well, I've been busy all day with constraints and it does exactly what I want. A huge thankyou to everyone that helped and hopefully one day I'll be able to help members on here. Now, if you need any laser cutting done, send your files for a quote! Kind Regards - John P.S. The laser cutting is plastics / wood / card / paper etc, I can't do metal. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 27, 2011 Share Posted April 27, 2011 Anchoring centre of circle maybe cen pt is L / 2 plus H / 2 you can put calculations into the constraints angles etc or maths d3=100 d3 is length d4=100 d4 is height d7=d3/2 cen pt you just double click the dim also d8=d7 you can describe the height of the notches once and just make it equal another variable so all notches are same size even on another part of the assembly. Quote Link to comment Share on other sites More sharing options...
johnb80 Posted April 28, 2011 Author Share Posted April 28, 2011 Hi Bigal, Where do I put the d8=d7 / If for example we have a four sided object (rectangle) say 100 x 50 and going round it clockwise we would have d1 to 4 so d1 and d3 would be equal and d2 and d4 would be equal, where would I enter d4=d2 and d3=d1? I tride it before and failed, I did find the '=' sign to the left of the screen which did the same job but in some ways it would be nicer to have a global system variable eg material thickness, total length etc. Thanks for your help. John Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 28, 2011 Share Posted April 28, 2011 The d8 was a figure of speech as you add constraints you get a new number if you want the new number = to another or say /2 just double click it, then it goes to edit mode like text and change to what you want d8=d3/4 + 5*d2 For the notches d4=d3 d5 =d3 etc this way change one notch d3 and the others are same size. Do for rad on corners d12=d9 d13=d9 Theres a button to the right (no cad at moment) and it brings up a table of all your constraints and you can edit in this table directly and watch shape change. Also a bit of a pain (help !) click show all to display constraints so you can remember I would scribble on a bit of paper, dont use constraints enough pretty sure you can change the name of the constraint also d3 now L d4 now W Read a bit more your post if you have a true rectang then only two constraints d1 & d2 L & W not 4 but add two more constraints the "perp corner" to left on ribbon. Your shape with one taper would be d1 d2 d3 (L1 W l2) with perp constraints on the top corners. Quote Link to comment Share on other sites More sharing options...
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.