angle defined by two points

angle defined by two points

Anonymous
Not applicable
1,908 Views
6 Replies
Message 1 of 7

angle defined by two points

Anonymous
Not applicable

Could someone please help/remind me how I calculate the angle defined by two points which I have 

assigned to two variables - Point1 and Point2

 

Thanks 

George

0 Likes
Accepted solutions (1)
1,909 Views
6 Replies
Replies (6)
Message 2 of 7

Ranjit_Singh
Advisor
Advisor
(angle point1 point2)

This returns the angle in radians. I believe the angle is based on current UCS but I cannot verify at the moment. Also look into angtos for other formats.

0 Likes
Message 3 of 7

Anonymous
Not applicable
Accepted solution

Great thanks - you fixed my mental block 🙂

0 Likes
Message 4 of 7

marko_ribar
Advisor
Advisor

(angle p1 p2) function don't work in UCS, but it calculates angle through specified coordinates no matter what current UCS is...

Marko Ribar, d.i.a. (graduated engineer of architecture)
0 Likes
Message 5 of 7

Anonymous
Not applicable

Thanks Mark,

Do you mean that it only works in the World UCS - not a user defined one?   How do you get around this limitation?

Regards

George from New Zealand

0 Likes
Message 6 of 7

marko_ribar
Advisor
Advisor

@Anonymous wrote:

Thanks Mark,

Do you mean that it only works in the World UCS - not a user defined one?   How do you get around this limitation?

Regards

George from New Zealand


I usually use (trans) function to obtain desired points from UCS to WCS or from WCS to UCS or alternatively to OCS or DCS - and only then, I, if I think that's correct way, use (angle) function... Note that angles obtained from (angle) are always {0.0-2pi} interval and 0.0 and 2pi radians are of those points that are left to right - vector is '(+XXX 0.0) - so (angle '(0.0 0.0) '(1.0 0.0)) = 0.0 (vector is '(+1.0 0.0))

Marko Ribar, d.i.a. (graduated engineer of architecture)
0 Likes
Message 7 of 7

john.uhden
Mentor
Mentor

If you want the angle in the WCS, then be safe...

 

(angle (trans Point1 1 0)(trans Point2 1 0))

 

If the UCS is the same as the WCS, then no transformation will take place,

so your result would be the same as

(angle Point1 Point2)

John F. Uhden

0 Likes