kramerO Posted January 6, 2011 Posted January 6, 2011 I am drawing blocks of threaded and socket weld pipe fittings in all normally used views and because the O.D. of the ends of the fittings varies with material and pressure class, for rotated views I create ellipses using the center ellipse command, then enter "R" for rotation then enter the rotation angle. Does anyone have a lisp that will allow me to pick the diameter (or center and long axis) with 2 points and have the routine to initiate the rotation at 45 and finish the ellipse. thanks, kramerO Quote
pBe Posted January 6, 2011 Posted January 6, 2011 ....., for rotated views ...thanks, kramerO what do you mean by that? Quote
kramerO Posted January 6, 2011 Author Posted January 6, 2011 pBe, The image shows 3"-300# Malleable Iron 90 Degree Elbow and 3"-300# Malleable Iron Straight Tee in both the rolled up and rolled down positions. karmerO Quote
Lee Mac Posted January 6, 2011 Posted January 6, 2011 This? (defun c:e45 ( / p1 p2 ) (if (and (setq p1 (getpoint "\nAxis Endpoint: ")) (setq p2 (getpoint "\nOther Endpoint: " p1)) ) (command "_.ellipse" "_non" p1 "_non" p2 "_R" 45.0) ) (princ) ) Quote
David Bethel Posted January 6, 2011 Posted January 6, 2011 kramer0 Have you thought about 3D modeling? That would make life a lot easier with that type of work. -David Quote
Lee Mac Posted January 6, 2011 Posted January 6, 2011 Or, as an improvement on the previous code: (defun c:e45 ( / *error* p1 p2 cmd ) (defun *error* ( msg ) (if cmd (setvar 'CMDECHO cmd)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ) ) (setq cmd (getvar 'CMDECHO)) (setvar 'CMDECHO 0) (if (progn (initget "Center") (setq p1 (getpoint "\nSpecify Axis Endpoint [Center]: ")) ) (cond ( (eq "Center" p1) (if (and (setq p1 (getpoint "\nSpecify Center of Ellipse: ")) (setq p2 (getpoint "\nSpecify Endpoint of Axis: " p1)) ) (command "_.ellipse" "_C" "_non" p1 "_non" p2 "_R" 45.0) ) ) ( (setq p2 (getpoint "\nSpecify Other Endpoint of Axis: " p1)) (command "_.ellipse" "_non" p1 "_non" p2 "_R" 45.0) ) ) ) (setvar 'CMDECHO cmd) (princ) ) Quote
alanjt Posted January 6, 2011 Posted January 6, 2011 Why not use a dynamic block with visibility states and just set scale for size? Quote
Lee Mac Posted January 6, 2011 Posted January 6, 2011 Why not use a dynamic block with visibility states and just set scale for size? Surely pipe fitting dimensions aren't linearly scaled though? Quote
alanjt Posted January 6, 2011 Posted January 6, 2011 Surely pipe fitting dimensions aren't linearly scaled though? I have a few pipe fitting blocks I use for details that I scale to match the pipe diameter. Quote
Lee Mac Posted January 6, 2011 Posted January 6, 2011 I have a few pipe fitting blocks I use for details that I scale to match the pipe diameter. Surely that doesn't fit with spec though? I don't believe pipe fitting dimensions are scaled linearly as the diameter increases - surely one would need a block for each size? Quote
alanjt Posted January 6, 2011 Posted January 6, 2011 Surely that doesn't fit with spec though? I don't believe pipe fitting dimensions are scaled linearly as the diameter increases - surely one would need a block for each size? Not sure. These are pretty generic. Remember, I'm only Civil, so if I've spoken out of place, I apologize. Quote
David Bethel Posted January 6, 2011 Posted January 6, 2011 Maybe not linear but definitely programable. I'd still recommend a 3D route if you are doing a lot of this kind of stuff. 3d-amp.dwg P-SAMP.DWG Quote
kramerO Posted January 7, 2011 Author Posted January 7, 2011 kramer0 Have you thought about 3D modeling? That would make life a lot easier with that type of work. -David David, That stuff is way over my head. I can barely draw lines and circles in 2D. That for the suggestion though. kramerO Quote
kramerO Posted January 7, 2011 Author Posted January 7, 2011 Lee Mac, Thanks, man. I'll try the lisp as soon as I go offline. Are you from another planet? Does Kryptonite bother you? thanks again, kramerO Quote
kramerO Posted January 7, 2011 Author Posted January 7, 2011 Why not use a dynamic block with visibility states and just set scale for size? alanjt, My ACAD version is pre dynamic blocks, and like Lee Mac says, I don't think they would work for threaded and socketweld pipe fittings. I tried doing some scaling and it doesn't give required results. The malleable iron fittings are per ASME B16.3 if you want to see all the crazy dimensions. The reason I am drawing these fittings is to share with the world. I have searched high and low and can find some welded fittings but not Mallleable Iron, Cast Iron and Forged Steel threaded and socketweld. Where I worked they had a third party piping software for both MicroCrap and AutoCAD. Neither produces these fitting dimensioned correctly. I will be doing ALL pipe fittings that I can find dimensions for. Thanks to all you guys for just being available for answers/suggestions. kramerO Quote
kramerO Posted January 7, 2011 Author Posted January 7, 2011 Or, as an improvement on the previous code: (defun c:e45 ( / *error* p1 p2 cmd ) (defun *error* ( msg ) (if cmd (setvar 'CMDECHO cmd)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ) ) (setq cmd (getvar 'CMDECHO)) (setvar 'CMDECHO 0) (if (progn (initget "Center") (setq p1 (getpoint "\nSpecify Axis Endpoint [Center]: ")) ) (cond ( (eq "Center" p1) (if (and (setq p1 (getpoint "\nSpecify Center of Ellipse: ")) (setq p2 (getpoint "\nSpecify Endpoint of Axis: " p1)) ) (command "_.ellipse" "_C" "_non" p1 "_non" p2 "_R" 45.0) ) ) ( (setq p2 (getpoint "\nSpecify Other Endpoint of Axis: " p1)) (command "_.ellipse" "_non" p1 "_non" p2 "_R" 45.0) ) ) ) (setvar 'CMDECHO cmd) (princ) ) Lee Mac, I've been offline playing with this new toy (tool). Works perfectly. I really appreciate you taking your valuable time to write this for me. thanks, kramerO Quote
Lee Mac Posted January 7, 2011 Posted January 7, 2011 Lee Mac,I've been offline playing with this new toy (tool). Works perfectly. I really appreciate you taking your valuable time to write this for me. thanks, kramerO You're very welcome KramerO - happy I could be of help 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.