PanHasan Posted September 26, 2009 Posted September 26, 2009 Hi how can i get the coordinates of point P2' I've got P1,P2 length between them and the angle between those lines Quote
rkmcswain Posted September 26, 2009 Posted September 26, 2009 Using lisp, the POLAR function should do it. Quote
SEANT Posted September 26, 2009 Posted September 26, 2009 I suspect this is a .Net question. If that is true then there is an option to Interop ThisDrawing.Utility.PolarPoint. or Create a .AutoCAD.Geometry Vector3d by: Vector = P1.GetVectorTo(P2) P2’ = P1.Add(Vector.RotatedBy(ang, new Vector3d(0,0,1)) If you want to do the calculations directly, The Math/Trigonometry is shown in the attached spreadsheet. PolarPoint.zip Quote
paulmcz Posted September 27, 2009 Posted September 27, 2009 Hi how can i get the coordinates of point P2' I've got P1,P2 length between them and the angle between those lines Is the length P1 P2' the same as P1 P2? Quote
PanHasan Posted September 27, 2009 Author Posted September 27, 2009 Yes the length of P1-P2 and P1-P2' is the same but SEANT has already solved my problem as always thx very much Quote
gile Posted September 27, 2009 Posted September 27, 2009 Hi, Here're are two Polar extension methods for the Point2d and Point3d classes which work as the polar LISP function: 3 arguments: - a 2d or 3d point - an angle expressed in radians relative to the world X axis - the distance from the point public static Point2d Polar(this Point2d org, double angle, double distance) { return new Point2d(org.X + (distance * Math.Cos(angle)), org.Y + (distance * Math.Sin(angle))); } public static Point3d Polar(this Point3d pt, double angle, double distance) { return pt.Add(new Vector3d(distance, 0.0, 0.0).RotateBy(angle, new Vector3d(0.0, 0.0, 1.0))); } Quote
Bill Tillman Posted September 27, 2009 Posted September 27, 2009 Wrap a chainsaw around my neck and call me the missing link, but wouldn't it be simpler to just right click on the line from P1 to P2' and view it's properties....? Unless you're doing this for many points, I can't see the advantage of coding. Quote
PanHasan Posted September 27, 2009 Author Posted September 27, 2009 Exactly I'm doing it for many points and the angle is changing for each of it i used the SEANTS solution and its work for me ;p 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.