From b4cab3bbf31d3f4c214210e989fe9efe40cc0911 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Sat, 28 May 2022 21:48:51 +0200
Subject: [PATCH] RotMatrix::zxzEulerAngles return array

---
 Base/Vector/RotMatrix.cpp           | 16 ++----
 Base/Vector/RotMatrix.h             |  3 +-
 Sample/Scattering/Rotations.cpp     |  5 +-
 Sim/Export/SampleToPython.cpp       | 61 ++++++++++----------
 Tests/Unit/Base/RotMatrixTest.cpp   |  9 ++-
 auto/Wrap/doxygenBase.i             |  2 +-
 auto/Wrap/libBornAgainBase.py       |  8 +--
 auto/Wrap/libBornAgainBase_wrap.cpp | 88 +++++++++++------------------
 8 files changed, 83 insertions(+), 109 deletions(-)

diff --git a/Base/Vector/RotMatrix.cpp b/Base/Vector/RotMatrix.cpp
index dfda6287c44..2dd4f744f35 100644
--- a/Base/Vector/RotMatrix.cpp
+++ b/Base/Vector/RotMatrix.cpp
@@ -52,7 +52,7 @@ RotMatrix RotMatrix::createRotateEuler(double alpha, double beta, double gamma)
     return zrot * xrot * zrot2;
 }
 
-void RotMatrix::zxzEulerAngles(double* p_alpha, double* p_beta, double* p_gamma) const
+std::array<double,3> RotMatrix::zxzEulerAngles() const
 {
     double m00 = (-1 + 2 * x * x + 2 * s * s);
     double m02 = 2 * (x * z + y * s);
@@ -62,15 +62,11 @@ void RotMatrix::zxzEulerAngles(double* p_alpha, double* p_beta, double* p_gamma)
     double m21 = 2 * (z * y + x * s);
     double m22 = (-1 + 2 * z * z + 2 * s * s);
 
-    *p_beta = std::acos(m22);
-    // First check if second angle is zero or pi
-    if (std::abs(m22) == 1.0) {
-        *p_alpha = std::atan2(m10, m00);
-        *p_gamma = 0.0;
-    } else {
-        *p_alpha = std::atan2(m02, -m12);
-        *p_gamma = std::atan2(m20, m21);
-    }
+    const double beta = std::acos(m22);
+
+    if (std::abs(m22) == 1.0) // second z angle is zero or pi
+        return {std::atan2(m10, m00), beta, 0.};
+    return {std::atan2(m02, -m12), beta, std::atan2(m20, m21)};
 }
 
 double RotMatrix::calculateRotateXAngle() const
diff --git a/Base/Vector/RotMatrix.h b/Base/Vector/RotMatrix.h
index a1918022400..2e44b75175a 100644
--- a/Base/Vector/RotMatrix.h
+++ b/Base/Vector/RotMatrix.h
@@ -16,6 +16,7 @@
 #define BORNAGAIN_BASE_VECTOR_ROTMATRIX_H
 
 #include <heinz/Vectors3D.h>
+#include <array>
 
 //! Rotation matrix in three dimensions.
 
@@ -45,7 +46,7 @@ public:
     static RotMatrix createRotateEuler(double alpha, double beta, double gamma);
 
     //! Calculates the Euler angles corresponding to the rotation
-    void zxzEulerAngles(double* p_alpha, double* p_beta, double* p_gamma) const;
+    std::array<double,3> zxzEulerAngles() const;
 
     //! Calculates the rotation angle for a rotation around the x-axis alone
     //! Only meaningfull if the actual rotation is around the x-axis
diff --git a/Sample/Scattering/Rotations.cpp b/Sample/Scattering/Rotations.cpp
index d05558413e9..8f60252e12c 100644
--- a/Sample/Scattering/Rotations.cpp
+++ b/Sample/Scattering/Rotations.cpp
@@ -42,9 +42,8 @@ IRotation* IRotation::createRotation(const RotMatrix& transform)
         return new RotationZ(angle);
     }
     case RotMatrix::EULER: {
-        double alpha, beta, gamma;
-        transform.zxzEulerAngles(&alpha, &beta, &gamma);
-        return new RotationEuler(alpha, beta, gamma);
+        auto angles = transform.zxzEulerAngles();
+        return new RotationEuler(angles[0], angles[1], angles[2]);
     }
     }
     ASSERT(0); // impossible case
diff --git a/Sim/Export/SampleToPython.cpp b/Sim/Export/SampleToPython.cpp
index 2db2fedd5b1..cf492590ec6 100644
--- a/Sim/Export/SampleToPython.cpp
+++ b/Sim/Export/SampleToPython.cpp
@@ -43,37 +43,38 @@ namespace {
 
 void setRotationInformation(const IParticle* particle, std::string name, std::ostringstream& result)
 {
-    if (particle->rotation()) {
-        switch (particle->rotation()->rotMatrix().getRotationType()) {
-        case RotMatrix::EULER: {
-            double alpha, beta, gamma;
-            particle->rotation()->rotMatrix().zxzEulerAngles(&alpha, &beta, &gamma);
-            result << indent() << name << "_rotation = ba.RotationEuler("
-                   << Py::Fmt::printDegrees(alpha) << ", " << Py::Fmt::printDegrees(beta) << ", "
-                   << Py::Fmt::printDegrees(gamma) << ")\n";
-            break;
-        }
-        case RotMatrix::XAXIS: {
-            double alpha = particle->rotation()->rotMatrix().calculateRotateXAngle();
-            result << indent() << name << "_rotation = ba.RotationX("
-                   << Py::Fmt::printDegrees(alpha) << ")\n";
-            break;
-        }
-        case RotMatrix::YAXIS: {
-            double alpha = particle->rotation()->rotMatrix().calculateRotateYAngle();
-            result << indent() << name << "_rotation = ba.RotationY("
-                   << Py::Fmt::printDegrees(alpha) << ")\n";
-            break;
-        }
-        case RotMatrix::ZAXIS: {
-            double alpha = particle->rotation()->rotMatrix().calculateRotateZAngle();
-            result << indent() << name << "_rotation = ba.RotationZ("
-                   << Py::Fmt::printDegrees(alpha) << ")\n";
-            break;
-        }
-        }
-        result << indent() << name << ".setRotation(" << name << "_rotation)\n";
+    if (!particle->rotation())
+        return;
+    const RotMatrix matrix = particle->rotation()->rotMatrix();
+    switch (matrix.getRotationType()) {
+    case RotMatrix::EULER: {
+        auto angles = matrix.zxzEulerAngles();
+        result << indent() << name << "_rotation = ba.RotationEuler("
+               << Py::Fmt::printDegrees(angles[0]) << ", "
+               << Py::Fmt::printDegrees(angles[1]) << ", "
+               << Py::Fmt::printDegrees(angles[2]) << ")\n";
+        break;
+    }
+    case RotMatrix::XAXIS: {
+        double alpha = matrix.calculateRotateXAngle();
+        result << indent() << name << "_rotation = ba.RotationX("
+               << Py::Fmt::printDegrees(alpha) << ")\n";
+        break;
+    }
+    case RotMatrix::YAXIS: {
+        double alpha = matrix.calculateRotateYAngle();
+        result << indent() << name << "_rotation = ba.RotationY("
+               << Py::Fmt::printDegrees(alpha) << ")\n";
+        break;
+    }
+    case RotMatrix::ZAXIS: {
+        double alpha = matrix.calculateRotateZAngle();
+        result << indent() << name << "_rotation = ba.RotationZ("
+               << Py::Fmt::printDegrees(alpha) << ")\n";
+        break;
+    }
     }
+    result << indent() << name << ".setRotation(" << name << "_rotation)\n";
 }
 
 void setPositionInformation(const IParticle* particle, std::string name, std::ostringstream& result)
diff --git a/Tests/Unit/Base/RotMatrixTest.cpp b/Tests/Unit/Base/RotMatrixTest.cpp
index 640eda4209d..9a393985b33 100644
--- a/Tests/Unit/Base/RotMatrixTest.cpp
+++ b/Tests/Unit/Base/RotMatrixTest.cpp
@@ -57,12 +57,11 @@ TEST_F(RotMatrixTest, RotateZ)
 
 TEST_F(RotMatrixTest, RecoverEulerAngles)
 {
-    double p0, p1, p2;
-    mEul.zxzEulerAngles(&p0, &p1, &p2);
+    auto angles = mEul.zxzEulerAngles();
 
-    EXPECT_NEAR(p0, w0, epsilon);
-    EXPECT_NEAR(p1, w1, epsilon);
-    EXPECT_NEAR(p2, w2, epsilon);
+    EXPECT_NEAR(angles[0], w0, epsilon);
+    EXPECT_NEAR(angles[1], w1, epsilon);
+    EXPECT_NEAR(angles[2], w2, epsilon);
 }
 
 TEST_F(RotMatrixTest, InvertXMatrix)
diff --git a/auto/Wrap/doxygenBase.i b/auto/Wrap/doxygenBase.i
index e6e34a9e537..b7b0d2443a9 100644
--- a/auto/Wrap/doxygenBase.i
+++ b/auto/Wrap/doxygenBase.i
@@ -1013,7 +1013,7 @@ Destructor.
 Clones the transformation. 
 ";
 
-%feature("docstring")  RotMatrix::zxzEulerAngles "void RotMatrix::zxzEulerAngles(double *p_alpha, double *p_beta, double *p_gamma) const
+%feature("docstring")  RotMatrix::zxzEulerAngles "std::array< double, 3 > RotMatrix::zxzEulerAngles() const
 
 Calculates the Euler angles corresponding to the rotation. 
 ";
diff --git a/auto/Wrap/libBornAgainBase.py b/auto/Wrap/libBornAgainBase.py
index 8465b4415d5..90136aa54d0 100644
--- a/auto/Wrap/libBornAgainBase.py
+++ b/auto/Wrap/libBornAgainBase.py
@@ -1936,15 +1936,15 @@ class RotMatrix(object):
         r"""createRotateEuler(double alpha, double beta, double gamma) -> RotMatrix"""
         return _libBornAgainBase.RotMatrix_createRotateEuler(alpha, beta, gamma)
 
-    def zxzEulerAngles(self, p_alpha, p_beta, p_gamma):
+    def zxzEulerAngles(self):
         r"""
-        zxzEulerAngles(RotMatrix self, double * p_alpha, double * p_beta, double * p_gamma)
-        void RotMatrix::zxzEulerAngles(double *p_alpha, double *p_beta, double *p_gamma) const
+        zxzEulerAngles(RotMatrix self) -> std::array< double,3 >
+        std::array< double, 3 > RotMatrix::zxzEulerAngles() const
 
         Calculates the Euler angles corresponding to the rotation. 
 
         """
-        return _libBornAgainBase.RotMatrix_zxzEulerAngles(self, p_alpha, p_beta, p_gamma)
+        return _libBornAgainBase.RotMatrix_zxzEulerAngles(self)
 
     def calculateRotateXAngle(self):
         r"""
diff --git a/auto/Wrap/libBornAgainBase_wrap.cpp b/auto/Wrap/libBornAgainBase_wrap.cpp
index 61b66fbf2b4..87c9cc88a22 100644
--- a/auto/Wrap/libBornAgainBase_wrap.cpp
+++ b/auto/Wrap/libBornAgainBase_wrap.cpp
@@ -3115,26 +3115,26 @@ namespace Swig {
 #define SWIGTYPE_p_allocator_type swig_types[15]
 #define SWIGTYPE_p_char swig_types[16]
 #define SWIGTYPE_p_difference_type swig_types[17]
-#define SWIGTYPE_p_double swig_types[18]
-#define SWIGTYPE_p_first_type swig_types[19]
-#define SWIGTYPE_p_int swig_types[20]
-#define SWIGTYPE_p_key_type swig_types[21]
-#define SWIGTYPE_p_long_long swig_types[22]
-#define SWIGTYPE_p_mapped_type swig_types[23]
-#define SWIGTYPE_p_p_PyObject swig_types[24]
-#define SWIGTYPE_p_second_type swig_types[25]
-#define SWIGTYPE_p_short swig_types[26]
-#define SWIGTYPE_p_signed_char swig_types[27]
-#define SWIGTYPE_p_size_type swig_types[28]
-#define SWIGTYPE_p_std__allocatorT_double_t swig_types[29]
-#define SWIGTYPE_p_std__allocatorT_int_t swig_types[30]
-#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[31]
-#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[32]
-#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[33]
-#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[34]
-#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[35]
-#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[36]
-#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[37]
+#define SWIGTYPE_p_first_type swig_types[18]
+#define SWIGTYPE_p_int swig_types[19]
+#define SWIGTYPE_p_key_type swig_types[20]
+#define SWIGTYPE_p_long_long swig_types[21]
+#define SWIGTYPE_p_mapped_type swig_types[22]
+#define SWIGTYPE_p_p_PyObject swig_types[23]
+#define SWIGTYPE_p_second_type swig_types[24]
+#define SWIGTYPE_p_short swig_types[25]
+#define SWIGTYPE_p_signed_char swig_types[26]
+#define SWIGTYPE_p_size_type swig_types[27]
+#define SWIGTYPE_p_std__allocatorT_double_t swig_types[28]
+#define SWIGTYPE_p_std__allocatorT_int_t swig_types[29]
+#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[30]
+#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[31]
+#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[32]
+#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[33]
+#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[34]
+#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[35]
+#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[36]
+#define SWIGTYPE_p_std__arrayT_double_3_t swig_types[37]
 #define SWIGTYPE_p_std__complexT_double_t swig_types[38]
 #define SWIGTYPE_p_std__invalid_argument swig_types[39]
 #define SWIGTYPE_p_std__lessT_std__string_t swig_types[40]
@@ -24776,42 +24776,20 @@ fail:
 SWIGINTERN PyObject *_wrap_RotMatrix_zxzEulerAngles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   RotMatrix *arg1 = (RotMatrix *) 0 ;
-  double *arg2 = (double *) 0 ;
-  double *arg3 = (double *) 0 ;
-  double *arg4 = (double *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  void *argp3 = 0 ;
-  int res3 = 0 ;
-  void *argp4 = 0 ;
-  int res4 = 0 ;
-  PyObject *swig_obj[4] ;
+  PyObject *swig_obj[1] ;
+  std::array< double,3 > result;
   
-  if (!SWIG_Python_UnpackTuple(args, "RotMatrix_zxzEulerAngles", 4, 4, swig_obj)) SWIG_fail;
+  if (!args) SWIG_fail;
+  swig_obj[0] = args;
   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RotMatrix, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotMatrix_zxzEulerAngles" "', argument " "1"" of type '" "RotMatrix const *""'"); 
   }
   arg1 = reinterpret_cast< RotMatrix * >(argp1);
-  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RotMatrix_zxzEulerAngles" "', argument " "2"" of type '" "double *""'"); 
-  }
-  arg2 = reinterpret_cast< double * >(argp2);
-  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
-  if (!SWIG_IsOK(res3)) {
-    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RotMatrix_zxzEulerAngles" "', argument " "3"" of type '" "double *""'"); 
-  }
-  arg3 = reinterpret_cast< double * >(argp3);
-  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
-  if (!SWIG_IsOK(res4)) {
-    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RotMatrix_zxzEulerAngles" "', argument " "4"" of type '" "double *""'"); 
-  }
-  arg4 = reinterpret_cast< double * >(argp4);
-  ((RotMatrix const *)arg1)->zxzEulerAngles(arg2,arg3,arg4);
-  resultobj = SWIG_Py_Void();
+  result = ((RotMatrix const *)arg1)->zxzEulerAngles();
+  resultobj = SWIG_NewPointerObj((new std::array< double,3 >(static_cast< const std::array< double,3 >& >(result))), SWIGTYPE_p_std__arrayT_double_3_t, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -30133,9 +30111,9 @@ static PyMethodDef SwigMethods[] = {
 	 { "RotMatrix_createRotateY", _wrap_RotMatrix_createRotateY, METH_O, "RotMatrix_createRotateY(double phi) -> RotMatrix"},
 	 { "RotMatrix_createRotateZ", _wrap_RotMatrix_createRotateZ, METH_O, "RotMatrix_createRotateZ(double phi) -> RotMatrix"},
 	 { "RotMatrix_createRotateEuler", _wrap_RotMatrix_createRotateEuler, METH_VARARGS, "RotMatrix_createRotateEuler(double alpha, double beta, double gamma) -> RotMatrix"},
-	 { "RotMatrix_zxzEulerAngles", _wrap_RotMatrix_zxzEulerAngles, METH_VARARGS, "\n"
-		"RotMatrix_zxzEulerAngles(RotMatrix self, double * p_alpha, double * p_beta, double * p_gamma)\n"
-		"void RotMatrix::zxzEulerAngles(double *p_alpha, double *p_beta, double *p_gamma) const\n"
+	 { "RotMatrix_zxzEulerAngles", _wrap_RotMatrix_zxzEulerAngles, METH_O, "\n"
+		"RotMatrix_zxzEulerAngles(RotMatrix self) -> std::array< double,3 >\n"
+		"std::array< double, 3 > RotMatrix::zxzEulerAngles() const\n"
 		"\n"
 		"Calculates the Euler angles corresponding to the rotation. \n"
 		"\n"
@@ -30943,7 +30921,6 @@ static swig_type_info _swigt__p_Vec3T_std__complexT_double_t_t = {"_p_Vec3T_std_
 static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_first_type = {"_p_first_type", "first_type *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_int = {"_p_int", "intptr_t *|int *|int_least32_t *|int_fast32_t *|int32_t *|int_fast16_t *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_key_type = {"_p_key_type", "key_type *", 0, 0, (void*)0, 0};
@@ -30963,6 +30940,7 @@ static swig_type_info _swigt__p_std__allocatorT_std__string_t = {"_p_std__alloca
 static swig_type_info _swigt__p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t = {"_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t", "std::vector< std::vector< double > >::allocator_type *|std::allocator< std::vector< double,std::allocator< double > > > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t = {"_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t", "std::vector< std::vector< int > >::allocator_type *|std::allocator< std::vector< int,std::allocator< int > > > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__allocatorT_unsigned_long_t = {"_p_std__allocatorT_unsigned_long_t", "std::vector< unsigned long >::allocator_type *|std::allocator< unsigned long > *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_std__arrayT_double_3_t = {"_p_std__arrayT_double_3_t", "std::array< double,3 > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__complexT_double_t = {"_p_std__complexT_double_t", "complex_t *|std::complex< double > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__lessT_std__string_t = {"_p_std__lessT_std__string_t", "std::less< std::string > *", 0, 0, (void*)0, 0};
@@ -31005,7 +30983,6 @@ static swig_type_info *swig_type_initial[] = {
   &_swigt__p_allocator_type,
   &_swigt__p_char,
   &_swigt__p_difference_type,
-  &_swigt__p_double,
   &_swigt__p_first_type,
   &_swigt__p_int,
   &_swigt__p_key_type,
@@ -31025,6 +31002,7 @@ static swig_type_info *swig_type_initial[] = {
   &_swigt__p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t,
   &_swigt__p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t,
   &_swigt__p_std__allocatorT_unsigned_long_t,
+  &_swigt__p_std__arrayT_double_3_t,
   &_swigt__p_std__complexT_double_t,
   &_swigt__p_std__invalid_argument,
   &_swigt__p_std__lessT_std__string_t,
@@ -31067,7 +31045,6 @@ static swig_cast_info _swigc__p_Vec3T_std__complexT_double_t_t[] = {  {&_swigt__
 static swig_cast_info _swigc__p_allocator_type[] = {  {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_difference_type[] = {  {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_first_type[] = {  {&_swigt__p_first_type, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_key_type[] = {  {&_swigt__p_key_type, 0, 0, 0},{0, 0, 0, 0}};
@@ -31087,6 +31064,7 @@ static swig_cast_info _swigc__p_std__allocatorT_std__string_t[] = {  {&_swigt__p
 static swig_cast_info _swigc__p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t[] = {  {&_swigt__p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t[] = {  {&_swigt__p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__allocatorT_unsigned_long_t[] = {  {&_swigt__p_std__allocatorT_unsigned_long_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_std__arrayT_double_3_t[] = {  {&_swigt__p_std__arrayT_double_3_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__complexT_double_t[] = {  {&_swigt__p_std__complexT_double_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__invalid_argument[] = {  {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__lessT_std__string_t[] = {  {&_swigt__p_std__lessT_std__string_t, 0, 0, 0},{0, 0, 0, 0}};
@@ -31129,7 +31107,6 @@ static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_allocator_type,
   _swigc__p_char,
   _swigc__p_difference_type,
-  _swigc__p_double,
   _swigc__p_first_type,
   _swigc__p_int,
   _swigc__p_key_type,
@@ -31149,6 +31126,7 @@ static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t,
   _swigc__p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t,
   _swigc__p_std__allocatorT_unsigned_long_t,
+  _swigc__p_std__arrayT_double_3_t,
   _swigc__p_std__complexT_double_t,
   _swigc__p_std__invalid_argument,
   _swigc__p_std__lessT_std__string_t,
-- 
GitLab