I don't/can't know why you're getting a different result from your CAD software, but I'm pretty convinced that P3_CATIA is incorrect.
One check you can do is to find the perpendicular projection of the different points onto the rotation axis, as with the code below. They should all agree, but I get a significant discrepancy for prj_CATIA
Once you've computed the perpendicular projection it's also easy to verify the angular separation between P3_old and P3new_1, as with the code below. I get 5 degrees to very high precision
thanks for the code. But I've a little problem.
I tried to use your function with this points
P1 = [33.319 -862.139 420.373]
P2 = [550.303 -721.267 667.915]
P3 = [113 -870.591 483.66]
deg = -5;
k = [P1(1,1) P2(1,1)
P1(1,3) P2(1,3) ];
x0 = [P1(1,1);P1(1,2);P1(1,3)];
x1 = [P2(1,1);P2(1,2);P3(1,3)];
u = x1 - x0;
P3_old = [P3(1,1);P3(1,2);P3(1,3)]
[P3new_1, R, t] = AxelRot(P3_old, deg, u, x0)
the result is
I'm making the same rotation in our CAD software (CATIA)-> I'll get this result
Do you have any idea about the differences?
@insa: I don't know what you mean exactly by a "circular node". Do you mean a single point in 3D space? Is each "node" defined simply by an (x,y,z) coordinate triple which you want to rotate to a different location? If so, this is a straightforward application of SYNTAX 3 of the tool and you shouldn't have any problem.