Costinbos77 Posted March 22, 2013 Posted March 22, 2013 (edited) Regards, Does anyone know how to calculate points O1, O2, O3, O4 knowing coordinates P1, P2, P3, P4 and distances d1 , d2 , d3 ? It's actually a section of pipe with different diameters. Thanks in advance Edited March 26, 2013 by Costinbos77 Quote
MSasu Posted March 22, 2013 Posted March 22, 2013 Just keep in mind that you will have to calculate the offset by moving the points perpendicular on original object. Referring to the sketch below: if you know the points P1a and P2a, then you can calculate the angle of the line - see ANGLE function; next calculate P1b, respectively P2b using POLAR function, the offset distance and the calculated angle to which you will add 90 degrees. Do the same for the other side (take care of the side of offset). To get the intersection point for the two offsets, check INTERS function and use the four points you just calculated. PS. Please check that on your sketch the point O1 cannot be obtained dirrectly by offset, it will require some extra constrains. Quote
Costinbos77 Posted March 22, 2013 Author Posted March 22, 2013 Thanks for the reply. I'm particularly interested to O2 , because it is between two different distances: d1 and d2. Quote
MSasu Posted March 22, 2013 Posted March 22, 2013 After you calculate the two offseted lines, use the INTERS function to get the O2 point. Quote
MSasu Posted March 22, 2013 Posted March 22, 2013 Maybe this will make the matter clearer: (setq dist1st 5.0 dist2nd 7.5) (setq pointP1 (getpoint) pointP2 (getpoint) pointP3 (getpoint)) (setq angle1st (angle pointP1 pointP2) angle2nd (angle pointP2 pointP3)) (setq pointO1 (polar pointP1 (+ angle1st (* 0.5 pi)) dist1st) pointO2a (polar pointP2 (+ angle1st (* 0.5 pi)) dist1st) pointO2b (polar pointP2 (+ angle2nd (* 0.5 pi)) dist2nd) pointO3 (polar pointP3 (+ angle2nd (* 0.5 pi)) dist2nd)) (setq pointO2 (inters pointO1 pointO2a pointO2b pointO3 nil)) (command "_LINE" "non" pointO1 "non" pointO2 "non" pointO3 "") Quote
Costinbos77 Posted March 23, 2013 Author Posted March 23, 2013 Thanks MSasu, I completed topic #1. The idea presented is a bit laborious because I have several points type O2, O3, but good. Quote
BIGAL Posted March 23, 2013 Posted March 23, 2013 Check out draw walls.lsp or multiline.lsp you can work out parrallel lines with out inters. I would paste code but its copyrited. It draws 2 or 4 lines. Quote
Costinbos77 Posted March 24, 2013 Author Posted March 24, 2013 I found some of what you said, thanks for the idea. Quote
Lee Mac Posted March 24, 2013 Posted March 24, 2013 I utilise the inters function (as described by MSasu above) to perform this task in my Polyline Outline program, you may find it helpful. Quote
MSasu Posted March 26, 2013 Posted March 26, 2013 Out of curiosity, is those were pipes with different diameters, how are you going to connect them at ends? Usually this is done with a diameter transition piece. The solution showed above looks good on XoY, but please pay attention that there will be a gap on Z axis. Quote
Costinbos77 Posted March 26, 2013 Author Posted March 26, 2013 (edited) Picture attached is a theoretical section (longitudinal profile) along a pipeline: Results direction planimetric (which is X in AutoCAD) and Z axis (which is Y in AutoCAD). In practice it will use a transition piece (reduction). I have attached an example. View cloud areas! Pipe Exemple.dwg Edited March 26, 2013 by Costinbos77 Quote
MSasu Posted March 26, 2013 Posted March 26, 2013 I understand now. Thank you for the explanation. 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.