[freecad] 01/02: Remove EIGEN2_SUPPORT. (Closes: #786356)

Anton Gladky gladk at moszumanska.debian.org
Mon Oct 26 17:30:03 UTC 2015


This is an automated email from the git hooks/post-receive script.

gladk pushed a commit to annotated tag debian/0.15.4671+dfsg1-2
in repository freecad.

commit 0c78ef55118153d5de00f6d97cfe7ae3678ddaf3
Author: Anton Gladky <gladk at debian.org>
Date:   Sun Sep 20 13:09:15 2015 +0200

    Remove EIGEN2_SUPPORT. (Closes: #786356)
---
 debian/patches/eigen3.patch | 376 ++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series       |   1 +
 2 files changed, 377 insertions(+)

diff --git a/debian/patches/eigen3.patch b/debian/patches/eigen3.patch
new file mode 100644
index 0000000..5f68c36
--- /dev/null
+++ b/debian/patches/eigen3.patch
@@ -0,0 +1,376 @@
+Description: Drop EIGEN2_SUPPORT
+Author: Anton Gladky <gladk at debian.org>
+Bug-Debian: https://bugs.debian.org/786356
+Last-Update: 2015-09-20
+
+Index: freecad-0.15.4671/src/Mod/Mesh/App/Core/Approximation.cpp
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Mesh/App/Core/Approximation.cpp
++++ freecad-0.15.4671/src/Mod/Mesh/App/Core/Approximation.cpp
+@@ -26,6 +26,7 @@
+ #ifndef _PreComp_
+ # include <algorithm>
+ #endif
++#include <Eigen/Dense>
+ 
+ #include "Approximation.h"
+ 
+@@ -56,8 +57,6 @@ extern "C" void LAPACK_DGESV (int const*
+ 
+ #endif
+ 
+-# include <Eigen/LeastSquares>
+-
+ using namespace MeshCore;
+ 
+ 
+@@ -700,7 +699,7 @@ double SurfaceFit::PolynomFit()
+     //std::clog << b << std::endl;
+ #else
+     // A.llt().solve(b,&x); // not sure if always positive definite
+-    A.qr().solve(b,&x);
++    x = A.colPivHouseholderQr().solve(b);
+ #endif
+ 
+     _fCoeff[0] = (float)(-x(5));
+Index: freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/articulatedbodyinertia.cpp
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Robot/App/kdl_cp/articulatedbodyinertia.cpp
++++ freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/articulatedbodyinertia.cpp
+@@ -29,8 +29,8 @@ namespace KDL{
+     
+     ArticulatedBodyInertia::ArticulatedBodyInertia(const RigidBodyInertia& rbi)
+     {
+-        this->M.part<SelfAdjoint>()=Matrix3d::Identity()*rbi.m;
+-        this->I.part<SelfAdjoint>()=Map<Matrix3d>(rbi.I.data);
++        this->M=Matrix3d::Identity()*rbi.m;
++        this->I=Map<Matrix3d>(rbi.I.data);
+         this->H << 0,-rbi.h[2],rbi.h[1],
+             rbi.h[2],0,-rbi.h[0],
+             -rbi.h[1],rbi.h[0],0;
+@@ -43,8 +43,8 @@ namespace KDL{
+ 
+     ArticulatedBodyInertia::ArticulatedBodyInertia(const Eigen::Matrix3d& M, const Eigen::Matrix3d& H, const Eigen::Matrix3d& I)
+     {
+-        this->M.part<SelfAdjoint>()=M;
+-        this->I.part<SelfAdjoint>()=I;
++        this->M=M;
++        this->I=I;
+         this->H=H;
+     }
+     
+Index: freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/chainiksolvervel_pinv_givens.cpp
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Robot/App/kdl_cp/chainiksolvervel_pinv_givens.cpp
++++ freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/chainiksolvervel_pinv_givens.cpp
+@@ -68,9 +68,9 @@ namespace KDL
+         //std::cout<<"# sweeps: "<<ret<<std::endl;
+ 
+         if(transpose)
+-            UY = (V.transpose() * v_in_eigen).lazy();
++            UY = (V.transpose() * v_in_eigen);
+         else
+-            UY = (U.transpose() * v_in_eigen).lazy();
++            UY = (U.transpose() * v_in_eigen);
+ 
+         for (unsigned int i = 0; i < n; i++){
+             double wi = UY(i);
+@@ -83,9 +83,9 @@ namespace KDL
+             SUY(i)= alpha * wi;
+         }
+         if(transpose)
+-            qdot_eigen = (U * SUY).lazy();
++            qdot_eigen = (U * SUY);
+         else
+-            qdot_eigen = (V * SUY).lazy();
++            qdot_eigen = (V * SUY);
+ 
+         for (unsigned int j=0;j<chain.getNrOfJoints();j++)
+             qdot_out(j)=qdot_eigen(j);
+Index: freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/chainiksolvervel_pinv_givens.hpp
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Robot/App/kdl_cp/chainiksolvervel_pinv_givens.hpp
++++ freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/chainiksolvervel_pinv_givens.hpp
+@@ -8,7 +8,7 @@
+ 
+ #include <Eigen/Core>
+ 
+-USING_PART_OF_NAMESPACE_EIGEN;
++using namespace Eigen;
+ 
+ namespace KDL
+ {
+Index: freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/chainiksolvervel_wdls.cpp
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Robot/App/kdl_cp/chainiksolvervel_wdls.cpp
++++ freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/chainiksolvervel_wdls.cpp
+@@ -78,15 +78,15 @@ namespace KDL
+         */
+         
+         // Create the Weighted jacobian
+-        tmp_jac_weight1 = (jac.data*weight_js).lazy();
+-        tmp_jac_weight2 = (weight_ts*tmp_jac_weight1).lazy();
++        tmp_jac_weight1 = (jac.data*weight_js);
++        tmp_jac_weight2 = (weight_ts*tmp_jac_weight1);
+    
+         // Compute the SVD of the weighted jacobian
+         int ret = svd_eigen_HH(tmp_jac_weight2,U,S,V,tmp,maxiter);
+                 
+         //Pre-multiply U and V by the task space and joint space weighting matrix respectively
+-        tmp_ts = (weight_ts*U.corner(Eigen::TopLeft,6,6)).lazy();
+-        tmp_js = (weight_js*V).lazy(); 
++        tmp_ts = (weight_ts*U.topLeftCorner(6,6));
++        tmp_js = (weight_js*V); 
+         
+         // tmp = (Si*U'*Ly*y), 
+         for (i=0;i<jac.columns();i++) {
+@@ -112,7 +112,7 @@ namespace KDL
+             qdot_out(i)=sum;
+         }
+         */
+-        qdot_out.data=(tmp_js*tmp).lazy();
++        qdot_out.data=(tmp_js*tmp);
+         return ret;
+     }
+     
+Index: freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/jacobian.cpp
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Robot/App/kdl_cp/jacobian.cpp
++++ freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/jacobian.cpp
+@@ -23,7 +23,7 @@
+ 
+ namespace KDL
+ {
+-    USING_PART_OF_NAMESPACE_EIGEN
++    using namespace Eigen;
+ 
+     Jacobian::Jacobian()
+     {
+@@ -147,8 +147,8 @@ namespace KDL
+     }
+     
+     void Jacobian::setColumn(unsigned int i,const Twist& t){
+-        data.col(i).start<3>()=Eigen::Map<Vector3d>(t.vel.data);
+-        data.col(i).end<3>()=Eigen::Map<Vector3d>(t.rot.data);
++        data.col(i).head<3>()=Eigen::Map<Vector3d>(t.vel.data);
++        data.col(i).tail<3>()=Eigen::Map<Vector3d>(t.rot.data);
+     }
+ 
+ }
+Index: freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/jntarray.cpp
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Robot/App/kdl_cp/jntarray.cpp
++++ freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/jntarray.cpp
+@@ -23,7 +23,7 @@
+ 
+ namespace KDL
+ {
+-    USING_PART_OF_NAMESPACE_EIGEN
++    using namespace Eigen;
+ 
+     JntArray::JntArray()
+     {
+@@ -101,7 +101,7 @@ namespace KDL
+ 
+     void MultiplyJacobian(const Jacobian& jac, const JntArray& src, Twist& dest)
+     {
+-        Eigen::Matrix<double,6,1> t=(jac.data*src.data).lazy();
++        Eigen::Matrix<double,6,1> t=(jac.data*src.data);
+         dest=Twist(Vector(t(0),t(1),t(2)),Vector(t(3),t(4),t(5)));
+     }
+     
+Index: freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/jntspaceinertiamatrix.cpp
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Robot/App/kdl_cp/jntspaceinertiamatrix.cpp
++++ freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/jntspaceinertiamatrix.cpp
+@@ -23,7 +23,7 @@
+ 
+ namespace KDL
+ {
+-    USING_PART_OF_NAMESPACE_EIGEN
++    using namespace Eigen;
+ 
+     JntSpaceInertiaMatrix::JntSpaceInertiaMatrix()
+     {
+@@ -100,7 +100,7 @@ namespace KDL
+ 
+     void Multiply(const JntSpaceInertiaMatrix& src, const JntArray& vec, JntArray& dest)
+     {
+-        dest.data=(src.data*vec.data).lazy();
++        dest.data=(src.data*vec.data);
+     }
+     
+     void SetToZero(JntSpaceInertiaMatrix& mat)
+Index: freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/treeiksolvervel_wdls.cpp
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Robot/App/kdl_cp/treeiksolvervel_wdls.cpp
++++ freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/treeiksolvervel_wdls.cpp
+@@ -76,15 +76,15 @@ namespace KDL {
+         
+         //Lets use the wdls algorithm to find the qdot:
+         // Create the Weighted jacobian
+-        J_Wq = (J * Wq).lazy();
+-        Wy_J_Wq = (Wy * J_Wq).lazy();
++        J_Wq = (J * Wq);
++        Wy_J_Wq = (Wy * J_Wq);
+         
+         // Compute the SVD of the weighted jacobian
+         int ret = svd_eigen_HH(Wy_J_Wq, U, S, V, tmp);
+         
+         //Pre-multiply U and V by the task space and joint space weighting matrix respectively
+-        Wy_t = (Wy * t).lazy();
+-        Wq_V = (Wq * V).lazy();
++        Wy_t = (Wy * t);
++        Wq_V = (Wq * V);
+         
+         // tmp = (Si*Wy*U'*y),
+         for (unsigned int i = 0; i < J.cols(); i++) {
+@@ -99,7 +99,7 @@ namespace KDL {
+         }
+         
+         // x = Lx^-1*V*tmp + x
+-        qdot_out.data = (Wq_V * tmp).lazy();
++        qdot_out.data = (Wq_V * tmp);
+         
+         return Wy_t.norm();
+     }
+Index: freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/treeiksolvervel_wdls.hpp
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Robot/App/kdl_cp/treeiksolvervel_wdls.hpp
++++ freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/treeiksolvervel_wdls.hpp
+@@ -14,7 +14,7 @@
+ 
+ namespace KDL {
+ 
+-    USING_PART_OF_NAMESPACE_EIGEN;
++    using namespace Eigen;
+ 
+     class TreeIkSolverVel_wdls: public TreeIkSolverVel {
+     public:
+Index: freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/utilities/svd_eigen_HH.cpp
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Robot/App/kdl_cp/utilities/svd_eigen_HH.cpp
++++ freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/utilities/svd_eigen_HH.cpp
+@@ -30,7 +30,7 @@ namespace KDL{
+         const int cols = A.cols();
+     
+         U.setZero();
+-        U.corner(Eigen::TopLeft,rows,cols)=A;
++        U.topLeftCorner(rows,cols)=A;
+ 
+         int i(-1),its(-1),j(-1),jj(-1),k(-1),nm=0;
+         int ppi(0);
+Index: freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/utilities/svd_eigen_HH.hpp
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Robot/App/kdl_cp/utilities/svd_eigen_HH.hpp
++++ freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/utilities/svd_eigen_HH.hpp
+@@ -28,7 +28,7 @@
+ #include <Eigen/Core>
+ #include <algorithm>
+ 
+-USING_PART_OF_NAMESPACE_EIGEN;
++using namespace Eigen;
+ 
+ namespace KDL
+ {
+Index: freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/utilities/svd_eigen_Macie.hpp
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Robot/App/kdl_cp/utilities/svd_eigen_Macie.hpp
++++ freecad-0.15.4671/src/Mod/Robot/App/kdl_cp/utilities/svd_eigen_Macie.hpp
+@@ -26,7 +26,7 @@
+ #define SVD_BOOST_MACIE
+ 
+ #include <Eigen/Core>
+-USING_PART_OF_NAMESPACE_EIGEN
++using namespace Eigen;
+ 
+ namespace KDL
+ {
+@@ -39,7 +39,7 @@ namespace KDL
+         unsigned int rotations=0;
+         if(toggle){
+             //Calculate B from new A and previous V
+-            B=(A*V).lazy();
++            B=(A*V);
+             while(rotate){
+                 rotate=false;
+                 rotations=0;
+@@ -76,9 +76,9 @@ namespace KDL
+                         B.col(i) = tempi;
+                         
+                         //Apply plane rotation to columns of V
+-                        tempi.start(V.rows()) = cos*V.col(i) + sin*V.col(j);
++                        tempi.head(V.rows()) = cos*V.col(i) + sin*V.col(j);
+                         V.col(j) = - sin*V.col(i) + cos*V.col(j);
+-                        V.col(i) = tempi.start(V.rows());
++                        V.col(i) = tempi.head(V.rows());
+ 
+                         rotate=true;
+                     }
+@@ -103,7 +103,7 @@ namespace KDL
+             return sweeps;
+         }else{
+             //Calculate B from new A and previous U'
+-            B =(U.transpose() * A).lazy();
++            B =(U.transpose() * A);
+             while(rotate){
+                 rotate=false;
+                 rotations=0;
+@@ -137,15 +137,15 @@ namespace KDL
+                         }
+ 
+                         //Apply plane rotation to rows of B
+-                        tempi.start(B.cols()) =  cos*B.row(i) + sin*B.row(j);
++                        tempi.head(B.cols()) =  cos*B.row(i) + sin*B.row(j);
+                         B.row(j) =  - sin*B.row(i) + cos*B.row(j);
+-                        B.row(i) =  tempi.start(B.cols());
++                        B.row(i) =  tempi.head(B.cols());
+ 
+ 
+                         //Apply plane rotation to rows of U
+-                        tempi.start(U.rows()) = cos*U.col(i) + sin*U.col(j);
++                        tempi.head(U.rows()) = cos*U.col(i) + sin*U.col(j);
+                         U.col(j) = - sin*U.col(i) + cos*U.col(j);
+-                        U.col(i) = tempi.start(U.rows());
++                        U.col(i) = tempi.head(U.rows());
+ 
+                         rotate=true;
+                     }
+Index: freecad-0.15.4671/src/Mod/Mesh/App/CMakeLists.txt
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Mesh/App/CMakeLists.txt
++++ freecad-0.15.4671/src/Mod/Mesh/App/CMakeLists.txt
+@@ -1,7 +1,5 @@
+ if(WIN32)
+     add_definitions(-DFCAppMesh -DWM4_FOUNDATION_DLL_EXPORT -DEIGEN2_SUPPORT)
+-else (Win32)
+-    add_definitions(-DEIGEN2_SUPPORT)
+ endif(WIN32)
+ 
+ include_directories(
+Index: freecad-0.15.4671/src/Mod/Robot/App/CMakeLists.txt
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Robot/App/CMakeLists.txt
++++ freecad-0.15.4671/src/Mod/Robot/App/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ if(MSVC)
+     add_definitions(-DFCAppRobot -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH -DEIGEN2_SUPPORT)
+ else(MSVC)
+-    add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H -DEIGEN2_SUPPORT)
++    add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
+ endif(MSVC)
+ 
+ 
+Index: freecad-0.15.4671/src/Mod/Robot/Gui/CMakeLists.txt
+===================================================================
+--- freecad-0.15.4671.orig/src/Mod/Robot/Gui/CMakeLists.txt
++++ freecad-0.15.4671/src/Mod/Robot/Gui/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ if(MSVC)
+     add_definitions(-DFCGuiRobot -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH -DEIGEN2_SUPPORT)
+ else(MSVC)
+-    add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H -DEIGEN2_SUPPORT)
++    add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
+ endif(MSVC)
+ 
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 1321ee0..d56b9ea 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ fix_clang_compilation.patch
 gcc5.patch
 remove_doc-files.patch
 remove_getting_webpage.patch
+eigen3.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/freecad.git



More information about the debian-science-commits mailing list