Thanks it does help.

But it is not very intuitive how the rotation works, somehow need to set always a rotation to 1, to get good rotation. Quaternions is a mystery for me.

```
private void RunScript(Plane Pl0, double x, double y, double z, double vx, double vy, double vz, double rotX, double rotY, double rotZ, ref object Pl1)
{
Plane plane = new Plane(Pl0);
plane.Translate(new Vector3d(x, y, z));
plane.Translate(plane.XAxis * vx);
plane.Translate(plane.YAxis * vy);
plane.Translate(plane.ZAxis * vz);
plane.Rotate(Rhino.RhinoMath.ToRadians(rotX), plane.XAxis);
plane.Rotate(Rhino.RhinoMath.ToRadians(rotY), plane.YAxis);
plane.Rotate(Rhino.RhinoMath.ToRadians(rotZ), plane.ZAxis);
Quaternion quaternion = new Quaternion(a,b,c,d);
double angleRadians;
Vector3d axis;
if ( quaternion.GetRotation(out angleRadians, out axis))
plane.Transform(Transform.Rotation(angleRadians, axis, plane.Origin));
Pl1 = plane;
}
// <Custom additional code>
public static void ToPlane(Quaternion quat, out Plane plane)
{
Quaternion vx = new Quaternion(0, 1, 0, 0);
Quaternion vy = new Quaternion(0, 0, 1, 0);
vx = quat * vx * quat.Conjugate;
vy = quat * vy * quat.Conjugate;
plane = new Plane(Point3d.Origin, vx.Vector, vy.Vector);
}
// </Custom additional code>
}
```