Jump to content

Recommended Posts

Posted

Hi

how can i get the coordinates of point P2' I've got P1,P2 length between them and the angle between those lines

 

przechwytywaniepz.th.jpg

Posted

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

Posted
Hi

how can i get the coordinates of point P2' I've got P1,P2 length between them and the angle between those lines

 

przechwytywaniepz.th.jpg

 

Is the length P1 P2' the same as P1 P2?

Posted

Yes the length of P1-P2 and P1-P2' is the same but SEANT has already solved my problem :D as always :D thx very much

Posted

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)));
}

Posted

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.

Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...