private static Shift GetRotation(Direction normal) { if (normal.IsParallelTo(Direction.Out)) { return Rotation.Identity; } var angle = normal.AngleBetween(Direction.Out); var axis = new Line(normal.CrossProduct(Direction.Out)); var rotation = new Shift(new Rotation(axis, angle)); return rotation; }