garlictaste Posted January 11, 2010 Posted January 11, 2010 Hallo from Germany, I work with 3d piping apps on acad2008. And there is until today no way to draw 3d-pipe-ends or a part of insulation on a pipe. It has to look like the ying yang symbol - but in 3d: Example1: pipe diameter 114,3 mm + insulation 80mm Example2: pipe outer diameter is 168,3 mm with wall thickness 8mm The way I use with solids is allways the same. But it could be very helpfull to have a prog, which draw this automaticly, after giving clicking on the pipe-solid`s end and give the data in. My english is not the best, sorry for that. Hope the pictures are helpfull. - garlic- Iso.dwg Quote
garlictaste Posted January 11, 2010 Author Posted January 11, 2010 ...as shown on the pictures/dwg. With "data" I meant the diameters and the thickness = +Insulation or -Wallthickness. The result should be like a pipe with these "special ends" acad2008 and acad2010 ...did you mean that? -garlic- Quote
fixo Posted January 11, 2010 Posted January 11, 2010 ...as shown on the pictures/dwg. With "data" I meant the diameters and the thickness = +Insulation or -Wallthickness. The result should be like a pipe with these "special ends"acad2008 and acad2010 ...did you mean that? -garlic- This will get you started I have misundersood with your diameters change all sizes to suit (defun C:SS (/ cpt dia1 dia2 dist dpt ept hgt1 thk2 sol1 sol2 sol3 sol4 spt subsol1 subsol2 thk1) (setvar "cmdecho" 0) (command "._-view" "_swiso") (command "._vscurrent" "_2") (setq dia1 (getdist "\nEnter big pipe diameter <168.3> : ")) (if (not dia1)(setq dia1 168.3)) (setq hgt1 (getdist "\nEnter pipe height <1000> : ")) (if (not hgt1)(setq hgt1 150.)) (setq thk1 (getdist "\nEnter pipe thickness <8> : ")) (if (not thk1)(setq thk1 8.)) (setq dia2 (getdist "\nEnter the conjunction pipe diameter <114.3> : ")) (if (not dia2)(setq dia2 114.3)) (setq thk2 (getdist "\nEnter thickness of insulation <40.0> : ")) (if (not thk2)(setq thk2 40.)) (setq dist (getdist "\nEnter distance between pipe axises <1000>: ")) (if (not dist)(setq dist 1000.)) (setq cpt (getpoint "\nPick center point of the big pipe: ") spt (list (car cpt)(+ (cadr cpt) hgt1)(caddr cpt)) ept (list (car cpt)(- (cadr cpt) hgt1)(caddr cpt)) ) (command "._cylinder" "_non" spt dia1 "_A" ept) (setq sol1 (entlast)) (command "._cylinder" "_non" spt (- dia1 (* 2 thk1)) "_A" ept) (setq subsol1 (entlast)) (command "._rotate3d" sol1 "" "_X" "_non" cpt -45.) (setq sol1 (entlast)) (command "._rotate3d" subsol1 "" "_X" "_non" cpt -45.) (setq subsol1 (entlast)) (setq dpt (list (+ (car cpt) dist) (cadr cpt)(caddr cpt))) (command "._copy" sol1 "" "_non" cpt "_non" dpt) (setq sol2 (entlast)) (command "._rotate3d" sol2 "" "_X" "_non" cpt 90.) (setq sol2 (entlast)) (command "._copy" subsol1 "" "_non" cpt "_non" dpt) (setq subsol2 (entlast)) (command "._rotate3d" subsol2 "" "_X" "_non" cpt 90.) (setq subsol2 (entlast)) (command "._cylinder" "_non" cpt dia2 "_A" dpt) (setq sol3 (entlast)) (command "._cylinder" "_non" cpt (+ dia2 (/ thk2 2.)) "_A" dpt) (setq sol4 (entlast)) (command "._subtract" sol4 "" sol3 "") (setq sol4 (entlast)) (command "._subtract" sol4 "" subsol1 "") (setq sol4 (entlast)) (command "._subtract" sol4 "" subsol2 "") (setq sol4 (entlast)) (command "._subtract" sol4 "" sol1 "") (setq sol4 (entlast)) (command "._subtract" sol4 "" sol2 "") (command "._vscurrent" "_C") (setvar "cmdecho" 1) (princ) ) ~'J'~ Quote
garlictaste Posted January 11, 2010 Author Posted January 11, 2010 ..I think, I tried to explain it wrong...start only with this: (setq dia1 (getdist "\nEnter pipe diameter : ")) ...is the outer diameter (setq hgt1 (getdist "\nEnter pipe height : ")) ...is the length of the pipe (setq thk2 (getdist "\nEnter thickness of insulation : ")) ...ok The outer diameter of the complete pipe will be then 168,3+40+40 mm. The diameter of the cylinders to subtract is always 2,5 x outer diameter of the pipe, means 168,3 x 2.5 = 420,75mm The height of the cylinders can always be 1,1 x outer diameter of the pipe, thats ok. That should be enough to draw a part like on the picture - I think:unsure:. -garlic- Quote
fixo Posted January 12, 2010 Posted January 12, 2010 ..I think, I tried to explain it wrong...start only with this: (setq dia1 (getdist "\nEnter pipe diameter : ")) ...is the outer diameter (setq hgt1 (getdist "\nEnter pipe height : ")) ...is the length of the pipe (setq thk2 (getdist "\nEnter thickness of insulation : ")) ...ok The outer diameter of the complete pipe will be then 168,3+40+40 mm. The diameter of the cylinders to subtract is always 2,5 x outer diameter of the pipe, means 168,3 x 2.5 = 420,75mm The height of the cylinders can always be 1,1 x outer diameter of the pipe, thats ok. That should be enough to draw a part like on the picture - I think:unsure:. -garlic- Sorry, I don't understand ~'J'~ Quote
garlictaste Posted January 12, 2010 Author Posted January 12, 2010 well, I am confused myself: I think too complicated:? I tested your code and made some dirty changes. It workes now ok, but "Enter pipe radius" has to be "Enter pipe diameter", if you test in in acad, you will see... Your code is very fine:D, so I can work with it. ******* (defun C:SS (/ cpt dia1 dia2 dist dpt ept hgt1 thk2 sol1 sol2 sol3 sol4 spt subsol1 subsol2 thk1) ; (setvar "cmdecho" 0) ; (command "._-view" "_swiso") ; (command "._vscurrent" "_2") (setq dia1 (getdist "\nEnter subtract-pipe radius : ")) (if (not dia1)(setq dia1 300.0)) (setq hgt1 (getdist "\nEnter subtract-pipe half length : ")) (if (not hgt1)(setq hgt1 300.)) (setq dia2 (getdist "\nEnter pipe radius : ")) (if (not dia2)(setq dia2 175.0)) (setq thk2 (getdist "\nEnter thickness of insulation : ")) (if (not thk2)(setq thk2 50.)) (setq dist (getdist "\nEnter pipe-length max: ")) (if (not dist)(setq dist 1000.)) (setq cpt (getpoint "\nPick center point of subtract-pipe: ") spt (list (car cpt)(+ (cadr cpt) hgt1)(caddr cpt)) ept (list (car cpt)(- (cadr cpt) hgt1)(caddr cpt)) ) (command "._cylinder" "_non" spt dia1 "_A" ept) (setq sol1 (entlast)) (command "._rotate3d" sol1 "" "_X" "_non" cpt -45.) (setq sol1 (entlast)) (setq dpt (list (+ (car cpt) dist) (cadr cpt)(caddr cpt))) (command "._copy" sol1 "" "_non" cpt "_non" dpt) (setq sol2 (entlast)) (command "._rotate3d" sol2 "" "_X" "_non" cpt 90.) (setq sol2 (entlast)) (command "._cylinder" "_non" cpt dia2 "_A" dpt) (setq sol3 (entlast)) (command "._cylinder" "_non" cpt (+ dia2 (/ thk2 1.)) "_A" dpt) (setq sol4 (entlast)) (command "._subtract" sol4 "" sol3 "") (setq sol4 (entlast)) (command "._subtract" sol4 "" sol1 "") (setq sol4 (entlast)) (command "._subtract" sol4 "" sol2 "") (command "._vscurrent" "_2") ; (setvar "cmdecho" 1) (princ) ) ********* I hope, it is easier now. -garlic- Quote
fixo Posted January 13, 2010 Posted January 13, 2010 well, I am confused myself: I think too complicated:? I tested your code and made some dirty changes. It workes now ok, but "Enter pipe radius" has to be "Enter pipe diameter", if you test in in acad, you will see... Your code is very fine:D, so I can work with it. ******* (defun C:SS (/ cpt dia1 dia2 dist dpt ept hgt1 thk2 sol1 sol2 sol3 sol4 spt subsol1 subsol2 thk1) ; (setvar "cmdecho" 0) ; (command "._-view" "_swiso") ; (command "._vscurrent" "_2") (setq dia1 (getdist "\nEnter subtract-pipe radius : ")) (if (not dia1)(setq dia1 300.0)) (setq hgt1 (getdist "\nEnter subtract-pipe half length : ")) (if (not hgt1)(setq hgt1 300.)) (setq dia2 (getdist "\nEnter pipe radius : ")) (if (not dia2)(setq dia2 175.0)) (setq thk2 (getdist "\nEnter thickness of insulation : ")) (if (not thk2)(setq thk2 50.)) (setq dist (getdist "\nEnter pipe-length max: ")) (if (not dist)(setq dist 1000.)) (setq cpt (getpoint "\nPick center point of subtract-pipe: ") spt (list (car cpt)(+ (cadr cpt) hgt1)(caddr cpt)) ept (list (car cpt)(- (cadr cpt) hgt1)(caddr cpt)) ) (command "._cylinder" "_non" spt dia1 "_A" ept) (setq sol1 (entlast)) (command "._rotate3d" sol1 "" "_X" "_non" cpt -45.) (setq sol1 (entlast)) (setq dpt (list (+ (car cpt) dist) (cadr cpt)(caddr cpt))) (command "._copy" sol1 "" "_non" cpt "_non" dpt) (setq sol2 (entlast)) (command "._rotate3d" sol2 "" "_X" "_non" cpt 90.) (setq sol2 (entlast)) (command "._cylinder" "_non" cpt dia2 "_A" dpt) (setq sol3 (entlast)) (command "._cylinder" "_non" cpt (+ dia2 (/ thk2 1.)) "_A" dpt) (setq sol4 (entlast)) (command "._subtract" sol4 "" sol3 "") (setq sol4 (entlast)) (command "._subtract" sol4 "" sol1 "") (setq sol4 (entlast)) (command "._subtract" sol4 "" sol2 "") (command "._vscurrent" "_2") ; (setvar "cmdecho" 1) (princ) ) ********* I hope, it is easier now. -garlic- Ok What I need Draw the sample drawing again with exact sizes of all your solids and then upload it here It will be much easier for me ~'J'~ Quote
garlictaste Posted January 13, 2010 Author Posted January 13, 2010 Hallo, I just made the drawing with the attached code. Hope this helps. -garlic- Thanks a lot:D SS4.dwg SS4.lsp Quote
garlictaste Posted January 13, 2010 Author Posted January 13, 2010 Is it possible, to give dia1 "Subtract-pipe radius" and hgt1 "Subtract-pipe half length" the same formula: (pipe-diameter + insulation) x 2.5 ? That will give always a nice look of the break on the pipe. Is it possible, to give dist "pipe length max" always the same formula: dia1 x 5 ? After that ther are only the questions for "pipe-diameter" and "insulation thickness" left. That should be really perfect ! (...and complicated ?) - garlic- Quote
fixo Posted January 13, 2010 Posted January 13, 2010 Hallo,I just made the drawing with the attached code. Hope this helps. -garlic- Thanks a lot:D Grhhh... Why you have deleted all solids You attached just with final part Please, draw all as on your first picture but with exact sizes and upload again Or you could to solve it by yourself? ~'J'~ Quote
Lee Mac Posted January 13, 2010 Posted January 13, 2010 Grhhh... Why you have deleted all solids You attached just with final part Please, draw all as on your first picture but with exact sizes and upload again Or you could to solve it by yourself? Agitated much...? lol Quote
garlictaste Posted January 13, 2010 Author Posted January 13, 2010 ...I deleted nothing. I took the code and this come out - very good:). Please have a look on my 2 postings before, I just edited. Sometimes its not easy to write - speaking shold be better, sorry. - garlic- Quote
ReMark Posted January 13, 2010 Posted January 13, 2010 This seems like one of those instances where the level of detail far, far exceeds what needs to be depicted. Insulation on our 3D piping runs is shown as a single 12" long piece centered on the pipe with no fancy end treatment. About the only time it becomes critical is when we're running multiple pipes in a limited space with bends. Then we show the entire pipe run as insulated. Few will appreciate your efforts and even fewer will notice sad to say. Quote
garlictaste Posted January 13, 2010 Author Posted January 13, 2010 Hi, I made a quick picture of an example for what this lisp is good. The pipe drawings are made to high quality rendered pictures for the clients - and they want it exact. So every time, I have to show a part of insulation (and this is very often), I draw it extra -much work ! So I am very thankfull for this code - it makes my work much easier and the clients are happy about that - no piping application can do that, and now it looks very good and is much quicker ! Sorry again for my english - not enough experience, but with 3d-pipe:wink: -garlic- Quote
ReMark Posted January 13, 2010 Posted January 13, 2010 What you have shown above is exactly what we show to the President of our company. Maybe he isn't such a stickler for "detail" as your clients. Keep in mind, it is only insulation. Some people can't see the forest for the trees. I thought you were looking for a Ying-Yang type of effect? The lisp routine doesn't appear to do that. Quote
garlictaste Posted January 14, 2010 Author Posted January 14, 2010 it was an old one. Here is the new result, and it`s super. In finished rendrings it show different materials for rockwool isolation material an aluminium covers. yes, I am very happy with this. The only thing that could be made better, is to input the diameter instead of radius. Quote
iskalipsi Posted January 14, 2010 Posted January 14, 2010 Very nice. I should start practicing LISP. Quote
ReMark Posted January 14, 2010 Posted January 14, 2010 I see you achieved the desired results. Nicely done. It still begs the question as to what value it adds to the drawing? The word superfluous comes to mind. A lot of effort has gone into making the insulation appear "just so" yet the pipes are shown as completely solid. What's up with that? How is the insulation fitted around the pipe clamps? 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.