Announcements

Community notifications may experience intermittent interruptions between 10–12 November during scheduled maintenance. We appreciate your patience.

there is an issue with 3d rotate command

there is an issue with 3d rotate command

pv-5678
Observer Observer
946 Views
7 Replies
Message 1 of 8

there is an issue with 3d rotate command

pv-5678
Observer
Observer

Hello

I wanted to rotate point (15,15,15) around Y axis with based point (10,10,10) and rotation angle of (90D). The result must be (15,15,-15), but the output from AutoCAD is (15,15,5). Is anyone knows what is the issue?

Regards

ASH

0 Likes
Accepted solutions (1)
947 Views
7 Replies
Replies (7)
Message 2 of 8

cadffm
Consultant
Consultant

Hi,

 

>>"there is an issue with 3d rotate command"
 
Which command? There are two of them!
 
>>point (15,15,15)
>>around Y axis
>>based point (10,10,10)
>>rotation angle of (90D).
 
Will be 5,15,15 (3drotate)  or 15,15,5 (rotate3d)
 
>>The result must be (15,15,-15)
No!? I don't know what you doing exactly, but 15,15,-15 doesn't make sense.
Please share your inputs in details, step by step, starting with the command name (you can see the name after starting in your textlog [F2])
 
Your orientation / rotation setting in Acad are standard settings?
It sounds it is not, we have to know your settings.
 
 

 

 

Sebastian

0 Likes
Message 3 of 8

tramber
Advisor
Advisor

Depending on ANGDIR, you will find 5,15,15 or 15,15,5


EESignature

0 Likes
Message 4 of 8

pv-5678
Observer
Observer

Hello

Thank you for your responds.

It is very simple, I want to rotate a point with coordinates of (15,15,15) around Y axis. The angle of rotation is 90 degrees, and the coordinates of base point are (10,10,10). The result from AutoCAD is different with the mathematical calculation.

I am lucky to pick up this issue before uploading thousands of thousands points into AutoCAD for processing. 

 

0 Likes
Message 5 of 8

Michiel.Valcke
Advisor
Advisor
Accepted solution

there is no issue, this is the mathematical calculation:

To rotate a point around the Y-axis, you can use the following rotation matrix for a 3D rotation:

MichielValcke_0-1709800115079.png

In this case, since you want to rotate around the Y-axis by 90 degrees, the rotation matrix becomes:

MichielValcke_1-1709800156730.png

To apply this rotation matrix to the point (15, 15, 15) with a base point of (10, 10, 10), you subtract the base point from the point you want to rotate, apply the rotation, and then add the base point back:

New point=Ry(90∘)⋅(Point−Base point)+Base point

MichielValcke_2-1709800257945.png

First, calculate the vector difference:

MichielValcke_3-1709800306300.png

Now, apply the rotation matrix:

MichielValcke_4-1709800339191.png

Finally, add the base point:

 

MichielValcke_5-1709800373726.png

Therefore, the new coordinates after rotating the point (15, 15, 15) around the Y-axis by 90 degrees with a base point of (10, 10, 10) are (15, 15, 5).

If you rotate by an angle of -90 the new transformation matrix becomes:

MichielValcke_6-1709800461615.png

From there you can easily see that the new coördinate is either (15,15,5) or (5,15,15) depending on the direction of your rotation.

There is no issue, your math was wrong.



Message 6 of 8

cadffm
Consultant
Consultant

Hi,

1. You still not said what command you are talking about. As stated above, there are two of them.

    It sounds you are talking command "ROTATE3d", not 3Drotate.

 

2. >>It is very simple, I want to rotate a point with coordinates of (15,15,15) around Y axis.

        The angle of rotation is 90 degrees, and the coordinates of base point are (10,10,10).

         >>The result must be (15,15,-15),

        If you have a point at z=15 and you want a result of z=-15 after "90"rotation, your basepoint

         has to be on Z=0, but you want to rotate around Z=10, this will never work this way.

 

3. >>The result from AutoCAD is different with the mathematical calculation.

         The fail is your math and the three-dimensional imagination

         Also: You still not talking about your rotation direction, what is default anti-clockwise, how is it in your case?

 

4. >>I am lucky to pick up this issue before uploading thousands of thousands points into AutoCAD for processing.

         Right, you have to learn a tool before using in in the productive system, especially when it comes to mass processing

 

 

 

cadffm_0-1709803999998.png

 

We don't know where you stumble, but something is wrong between your imagination and your applied mathematical path.

Often it is just a wording, but your sample data (15,15,15, 90°around 10,10,10 => 15,15,-15 will never true.

 

 

 

 

 

Sebastian

Message 7 of 8

pv-5678
Observer
Observer
I calculated manually something that I had to do at the first time before bringing it out and I believe you are correct, and I made a mistake.
Thank you for you respond and apologizing everyone.
0 Likes
Message 8 of 8

Michiel.Valcke
Advisor
Advisor

There's no need to apologize, mistakes happen to us all. It looks like you did the calculation starting from z=0 instead of z=10.  Usually when it comes to matters of calculations, the kernel (mathematical engine) used by AutoCAD is quite strong. And such a mistake would have been noticed very fast because any cause for that error would also have implications in other calculations. 

0 Likes