Răsfoiți Sursa

better polar decompostion

Former-commit-id: a82e81c4041385133f27d6ecb2685ad238385375
Alec Jacobson (jalec 11 ani în urmă
părinte
comite
4254525627

+ 3 - 2
Makefile

@@ -17,6 +17,7 @@ all: LFLAGS +=
 OPTFLAGS+=-O3 -DNDEBUG $(OPENMP)
 #debug: OPTFLAGS= -g -Wall -Werror
 debug: OPTFLAGS= -g -Wall
+debug: DEBUG=debug
 CFLAGS += $(OPTFLAGS)
 #CFLAGS += -DIGL_NO_OPENGL -DIGL_NO_ANTTWEAKBAR
 
@@ -43,7 +44,7 @@ endif
 
 .PHONY: examples
 .PHONY: extras
-debug: lib
+debug: lib extras
 lib: lib/libigl.a
 examples: lib extras
 	make -C examples
@@ -51,7 +52,7 @@ extras:
 	for p in  $(EXTRA_DIRS); \
 	do \
 	echo "cd $$p" ; \
-	$(MAKE) -C $$p ; \
+	$(MAKE) -C $$p $(DEBUG); \
 	done
 
 

+ 2 - 2
Makefile.conf

@@ -33,8 +33,8 @@ ifeq ($(IGL_USERNAME),ajx)
 	# msse4.2 is necessary for me to get embree to compile correctly
 	AFLAGS = -m64 -msse4.2
 	OPENMP=-fopenmp
-	#EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
-	EIGEN3_INC=-I/Users/ajx/Documents/eigen -I/Users/ajx/Documents/eigen/unsupported
+	EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
+	#EIGEN3_INC=-I/Users/ajx/Documents/eigen -I/Users/ajx/Documents/eigen/unsupported
 endif
 
 ifeq ($(IGL_USERNAME),alecjaco) 

+ 1 - 1
include/igl/active_set.cpp

@@ -36,7 +36,7 @@ IGL_INLINE igl::SolverStatus igl::active_set(
   Eigen::PlainObjectBase<DerivedZ> & Z
   )
 {
-//#define ACTIVE_SET_CPP_DEBUG
+#define ACTIVE_SET_CPP_DEBUG
   using namespace igl;
   using namespace Eigen;
   using namespace std;

+ 1 - 1
include/igl/embree/Makefile

@@ -6,7 +6,7 @@ debug: libiglembree
 
 include ../../../Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG
-debug: CFLAGS += -g -Wall -Werror
+debug: CFLAGS += -g -Wall 
 
 .PHONY: libiglembree
 libiglembree: obj ../../../lib/libiglembree.a

+ 1 - 0
include/igl/matlab/Makefile

@@ -4,6 +4,7 @@ debug: CFLAGS += -g -Wall -Werror
 
 .PHONY: all
 all: libiglmatlab
+debug: libiglmatlab
 
 .PHONY: libmatlab
 libiglmatlab: obj ../../../lib/libiglmatlab.a

+ 1 - 1
include/igl/matlab/MatlabWorkspace.h

@@ -417,7 +417,7 @@ inline bool igl::MatlabWorkspace::find(
   if(DerivedM::IsVectorAtCompileTime)
   {
     assert(m==1 || n==1 || (m==0 && n==0));
-    M.resize(m*n);
+    M.resize(m*n,1);
   }else
   {
     M.resize(m,n);

+ 1 - 1
include/igl/min_quad_with_fixed.cpp

@@ -28,7 +28,7 @@ IGL_INLINE bool igl::min_quad_with_fixed_precompute(
   min_quad_with_fixed_data<T> & data
   )
 {
-//#define MIN_QUAD_WITH_FIXED_CPP_DEBUG
+#define MIN_QUAD_WITH_FIXED_CPP_DEBUG
   using namespace Eigen;
   using namespace std;
   using namespace igl;

+ 9 - 8
include/igl/mosek/mosek_quadprog.cpp

@@ -91,15 +91,15 @@ IGL_INLINE bool igl::mosek_quadprog(
 
   // Create the MOSEK environment
   mosek_guarded(MSK_makeenv(&env,NULL,NULL,NULL,NULL));
-  ///* Directs the log stream to the 'printstr' function. */
-  //mosek_guarded(MSK_linkfunctoenvstream(env,MSK_STREAM_LOG,NULL,printstr));
+  /* Directs the log stream to the 'printstr' function. */
+  mosek_guarded(MSK_linkfunctoenvstream(env,MSK_STREAM_LOG,NULL,printstr));
   // initialize mosek environment
   mosek_guarded(MSK_initenv(env));
   // Create the optimization task
   mosek_guarded(MSK_maketask(env,m,n,&task));
   verbose("Creating task with %ld linear constraints and %ld variables...\n",m,n);
-  //// Tell mosek how to print to std out
-  //mosek_guarded(MSK_linkfunctotaskstream(task,MSK_STREAM_LOG,NULL,printstr));
+  // Tell mosek how to print to std out
+  mosek_guarded(MSK_linkfunctotaskstream(task,MSK_STREAM_LOG,NULL,printstr));
   // Give estimate of number of variables
   mosek_guarded(MSK_putmaxnumvar(task,n));
   if(m>0)
@@ -171,7 +171,8 @@ IGL_INLINE bool igl::mosek_quadprog(
     pit != mosek_data.intparam.end(); 
     pit++)
   {
-    mosek_guarded(MSK_putintparam(task,pit->first,pit->second));
+    const MSKrescodee r = MSK_putintparam(task,pit->first,pit->second);
+    mosek_guarded(r);
   }
   for(
     std::map<MSKdparame,double>::iterator pit = mosek_data.douparam.begin();
@@ -186,9 +187,9 @@ IGL_INLINE bool igl::mosek_quadprog(
   // run the optimizer
   mosek_guarded(MSK_optimizetrm(task,&trmcode));
 
-  //// Print a summary containing information about the solution for debugging
-  //// purposes
-  //MSK_solutionsummary(task,MSK_STREAM_LOG);
+  // Print a summary containing information about the solution for debugging
+  // purposes
+  MSK_solutionsummary(task,MSK_STREAM_LOG);
 
   // Get status of solution
   MSKsolstae solsta;

+ 1 - 0
include/igl/png/Makefile

@@ -4,6 +4,7 @@ debug: CFLAGS += -g -Wall -Werror
 
 .PHONY: all
 all: libiglpng
+debug: libiglpng
 
 .PHONY: libpng
 libiglpng: obj ../../../lib/libiglpng.a

+ 52 - 22
include/igl/polar_dec.cpp

@@ -1,46 +1,76 @@
 #include "polar_dec.h"
-#include <Eigen/Eigenvalues>
-
 #include "polar_svd.h"
 #ifdef _WIN32
 #else
 #  include <fenv.h>
 #endif
-// You will need the development version of Eigen which is > 3.0.3
-// You can determine if you have computeDirect by issuing
-//   grep -r computeDirect path/to/eigen/*
-#define EIGEN_HAS_COMPUTE_DIRECT
+#include <cmath>
+#include <Eigen/Eigenvalues>
+#include <iostream>
 
 // From Olga's CGAL mentee's ARAP code
-template<typename Mat>
-IGL_INLINE void igl::polar_dec(const Mat& A, Mat& R, Mat& T)
+template <
+  typename DerivedA,
+  typename DerivedR,
+  typename DerivedT,
+  typename DerivedU,
+  typename DerivedS,
+  typename DerivedV>
+IGL_INLINE void igl::polar_dec(
+  const Eigen::PlainObjectBase<DerivedA> & A,
+  Eigen::PlainObjectBase<DerivedR> & R,
+  Eigen::PlainObjectBase<DerivedT> & T,
+  Eigen::PlainObjectBase<DerivedU> & U,
+  Eigen::PlainObjectBase<DerivedS> & S,
+  Eigen::PlainObjectBase<DerivedV> & V)
 {
-#ifdef EIGEN_HAS_COMPUTE_DIRECT
- typedef typename Mat::Scalar Scalar;
- typedef Eigen::Matrix<typename Mat::Scalar,3,1> Vec;
+  using namespace std;
+ typedef typename DerivedA::Scalar Scalar;
 
  const Scalar th = std::sqrt(Eigen::NumTraits<Scalar>::dummy_precision());
 
- Eigen::SelfAdjointEigenSolver<Mat> eig;
+ Eigen::SelfAdjointEigenSolver<DerivedA> eig;
  feclearexcept(FE_UNDERFLOW);
  eig.computeDirect(A.transpose()*A);
  if(fetestexcept(FE_UNDERFLOW) || eig.eigenvalues()(0)/eig.eigenvalues()(2)<th)
-   return polar_svd(A,R,T);
+ {
+   cout<<"resorting to svd 1..."<<endl;
+   return polar_svd(A,R,T,U,S,V);
+ }
 
- Vec S = eig.eigenvalues().cwiseSqrt();
+ S = eig.eigenvalues().cwiseSqrt();
 
  T = eig.eigenvectors() * S.asDiagonal() * eig.eigenvectors().transpose();
- R = A  * eig.eigenvectors() * S.asDiagonal().inverse()
-        * eig.eigenvectors().transpose();
+ U = A * eig.eigenvectors();
+ V = eig.eigenvectors();
+ R = U * S.asDiagonal().inverse() * V.transpose();
+ S = S.reverse().eval();
+ V = V.rowwise().reverse().eval();
+ U = U.rowwise().reverse().eval() * S.asDiagonal().inverse();
 
- if(std::abs(R.squaredNorm()-3.) > th)
-   return polar_svd(A,R,T);
-#else
-  return polar_svd(A,R,T);
-#endif
+ if(std::fabs(R.squaredNorm()-3.) > th)
+ {
+   cout<<"resorting to svd 2..."<<endl;
+   return polar_svd(A,R,T,U,S,V);
+ }
+}
+
+template <
+  typename DerivedA,
+  typename DerivedR,
+  typename DerivedT>
+IGL_INLINE void igl::polar_dec(
+  const Eigen::PlainObjectBase<DerivedA> & A,
+  Eigen::PlainObjectBase<DerivedR> & R,
+  Eigen::PlainObjectBase<DerivedT> & T)
+{
+  Eigen::PlainObjectBase<DerivedA> U;
+  Eigen::PlainObjectBase<DerivedA> V;
+  Eigen::Matrix<typename DerivedA::Scalar,DerivedA::RowsAtCompileTime,1> S;
+  return igl::polar_dec(A,R,T,U,S,V);
 }
 
 #ifndef IGL_HEADER_ONLY
 // Explicit template instanciation
-template void igl::polar_dec<Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<double, -1, -1, 0, -1, -1>&, Eigen::Matrix<double, -1, -1, 0, -1, -1>&);
+template  void igl::polar_dec<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 #endif

+ 27 - 5
include/igl/polar_dec.h

@@ -1,6 +1,7 @@
 #ifndef IGL_POLAR_DEC
 #define IGL_POLAR_DEC
 #include "igl_inline.h"
+#include <Eigen/Core>
 
 namespace igl
 {
@@ -8,14 +9,35 @@ namespace igl
   // Inputs:
   //   A  3 by 3 matrix to be decomposed
   // Outputs:
-  //   R  3 by 3 rotation matrix part of decomposition
+  //   R  3 by 3 orthonormal matrix part of decomposition
   //   T  3 by 3 stretch matrix part of decomposition
+  //   U  3 by 3 left-singular vectors
+  //   S  3 by 1 singular values
+  //   V  3 by 3 right-singular vectors
   //
-  // Note: I'm not sure if this implementation is check against reflections in R
-  // Note: It is not
   //
-  template<typename Mat>
-  IGL_INLINE void polar_dec(const Mat& A, Mat& R, Mat& T);
+  template <
+    typename DerivedA,
+    typename DerivedR,
+    typename DerivedT,
+    typename DerivedU,
+    typename DerivedS,
+    typename DerivedV>
+  IGL_INLINE void polar_dec(
+    const Eigen::PlainObjectBase<DerivedA> & A,
+    Eigen::PlainObjectBase<DerivedR> & R,
+    Eigen::PlainObjectBase<DerivedT> & T,
+    Eigen::PlainObjectBase<DerivedU> & U,
+    Eigen::PlainObjectBase<DerivedS> & S,
+    Eigen::PlainObjectBase<DerivedV> & V);
+  template <
+    typename DerivedA,
+    typename DerivedR,
+    typename DerivedT>
+  IGL_INLINE void polar_dec(
+    const Eigen::PlainObjectBase<DerivedA> & A,
+    Eigen::PlainObjectBase<DerivedR> & R,
+    Eigen::PlainObjectBase<DerivedT> & T);
 }
 #ifdef IGL_HEADER_ONLY
 #  include "polar_dec.cpp"

+ 36 - 40
include/igl/polar_svd.cpp

@@ -1,53 +1,49 @@
 #include "polar_svd.h"
 #include <Eigen/SVD>
 
-// From Olga's CGAL mentee's ARAP code
-template<typename Mat>
-IGL_INLINE void igl::polar_svd(const Mat& A, Mat& R, Mat& T)
+// Adapted from Olga's CGAL mentee's ARAP code
+template <
+  typename DerivedA,
+  typename DerivedR,
+  typename DerivedT>
+IGL_INLINE void igl::polar_svd(
+  const Eigen::PlainObjectBase<DerivedA> & A,
+  Eigen::PlainObjectBase<DerivedR> & R,
+  Eigen::PlainObjectBase<DerivedT> & T)
 {
-  typedef Eigen::Matrix<typename Mat::Scalar,Mat::RowsAtCompileTime,1> Vec;
-  Eigen::JacobiSVD<Mat> svd;
-  svd.compute(A, Eigen::ComputeFullU | Eigen::ComputeFullV );
-  const Mat& u = svd.matrixU();
-  const Mat& v = svd.matrixV();
-  const Vec& w = svd.singularValues();
-  R = u*v.transpose();
-  T = v*w.asDiagonal()*v.adjoint();
+  Eigen::PlainObjectBase<DerivedA> U;
+  Eigen::PlainObjectBase<DerivedA> V;
+  Eigen::Matrix<typename DerivedA::Scalar,DerivedA::RowsAtCompileTime,1> S;
+  return igl::polar_svd(A,R,T,U,S,V);
 }
 
-IGL_INLINE void igl::polar_svd(const Eigen::Matrix3f& A, Eigen::Matrix3f& R, Eigen::Matrix3f& T)
+template <
+  typename DerivedA,
+  typename DerivedR,
+  typename DerivedT,
+  typename DerivedU,
+  typename DerivedS,
+  typename DerivedV>
+IGL_INLINE void igl::polar_svd(
+  const Eigen::PlainObjectBase<DerivedA> & A,
+  Eigen::PlainObjectBase<DerivedR> & R,
+  Eigen::PlainObjectBase<DerivedT> & T,
+  Eigen::PlainObjectBase<DerivedU> & U,
+  Eigen::PlainObjectBase<DerivedS> & S,
+  Eigen::PlainObjectBase<DerivedV> & V)
 {
-  typedef Eigen::Matrix<Eigen::Matrix3f::Scalar,3,1> Vec;
-  Eigen::JacobiSVD<Eigen::Matrix3f> svd;
+  Eigen::JacobiSVD<DerivedA> svd;
   svd.compute(A, Eigen::ComputeFullU | Eigen::ComputeFullV );
-  const Eigen::Matrix3f& u = svd.matrixU();
-  const Eigen::Matrix3f& v = svd.matrixV();
-  const Vec& w = svd.singularValues();
-  R = u*v.transpose();
-  T = v*w.asDiagonal()*v.adjoint();
+  U = svd.matrixU();
+  V = svd.matrixV();
+  S = svd.singularValues();
+  R = U*V.transpose();
+  T = V*S.asDiagonal()*V.adjoint();
 }
 
-// Clang is giving an annoying warning inside Eigen
-#ifdef __clang__
-#  pragma clang diagnostic push
-#  pragma clang diagnostic ignored "-Wconstant-logical-operand"
-#endif
-IGL_INLINE void igl::polar_svd(const Eigen::Matrix2f& A, Eigen::Matrix2f& R, Eigen::Matrix2f& T)
-{
-  typedef Eigen::Matrix<Eigen::Matrix2f::Scalar,2,1> Vec;
-  Eigen::JacobiSVD<Eigen::Matrix2f> svd;
-  svd.compute(A, Eigen::ComputeFullU | Eigen::ComputeFullV );
-  const Eigen::Matrix2f& u = svd.matrixU();
-  const Eigen::Matrix2f& v = svd.matrixV();
-  const Vec& w = svd.singularValues();
-  R = u*v.transpose();
-  T = v*w.asDiagonal()*v.adjoint();
-}
-#ifdef __clang__
-#  pragma clang diagnostic pop
-#endif
-
 #ifndef IGL_HEADER_ONLY
 // Explicit template instanciation
-template void igl::polar_svd<Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<double, -1, -1, 0, -1, -1>&, Eigen::Matrix<double, -1, -1, 0, -1, -1>&);
+template void igl::polar_svd<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
+template void igl::polar_svd<Eigen::Matrix<double, 2, 2, 0, 2, 2>, Eigen::Matrix<double, 2, 2, 0, 2, 2>, Eigen::Matrix<double, 2, 2, 0, 2, 2> >(Eigen::PlainObjectBase<Eigen::Matrix<double, 2, 2, 0, 2, 2> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, 2, 2, 0, 2, 2> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, 2, 2, 0, 2, 2> >&);
+template void igl::polar_svd<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::Matrix<double, 3, 3, 0, 3, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >&);
 #endif

+ 35 - 4
include/igl/polar_svd.h

@@ -11,11 +11,42 @@ namespace igl
   // Outputs:
   //   R  3 by 3 rotation matrix part of decomposition
   //   T  3 by 3 stretch matrix part of decomposition
+  //   U  3 by 3 left-singular vectors
+  //   S  3 by 1 singular values
+  //   V  3 by 3 right-singular vectors
   //
-  IGL_INLINE void polar_svd(const Eigen::Matrix3f& A, Eigen::Matrix3f& R, Eigen::Matrix3f& T);
-  IGL_INLINE void polar_svd(const Eigen::Matrix2f& A, Eigen::Matrix2f& R, Eigen::Matrix2f& T);
-  template<typename Mat>
-  IGL_INLINE void polar_svd(const Mat& A, Mat& R, Mat& T);
+  // Example:
+  //   polar_svd(A,R,T,U,S,V);
+  //   // Check if R is a reflection
+  //   if(R.determinant() < ))
+  //   {
+  //     // flip last column of U and rebuild to get rotation
+  //     U.col(U.cols()-1) *= -1.0;
+  //     R = U * V.transpose();
+  //   }
+  //
+  template <
+    typename DerivedA,
+    typename DerivedR,
+    typename DerivedT,
+    typename DerivedU,
+    typename DerivedS,
+    typename DerivedV>
+  IGL_INLINE void polar_svd(
+    const Eigen::PlainObjectBase<DerivedA> & A,
+    Eigen::PlainObjectBase<DerivedR> & R,
+    Eigen::PlainObjectBase<DerivedT> & T,
+    Eigen::PlainObjectBase<DerivedU> & U,
+    Eigen::PlainObjectBase<DerivedS> & S,
+    Eigen::PlainObjectBase<DerivedV> & V);
+  template <
+    typename DerivedA,
+    typename DerivedR,
+    typename DerivedT>
+  IGL_INLINE void polar_svd(
+    const Eigen::PlainObjectBase<DerivedA> & A,
+    Eigen::PlainObjectBase<DerivedR> & R,
+    Eigen::PlainObjectBase<DerivedT> & T);
 }
 #ifdef IGL_HEADER_ONLY
 #  include "polar_svd.cpp"

+ 1 - 0
include/igl/repmat.cpp

@@ -56,4 +56,5 @@ IGL_INLINE void igl::repmat(
 // generated by autoexplicit.sh
 template void igl::repmat<Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, int, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 template void igl::repmat<Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, int, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&);
+template void igl::repmat<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, int, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 #endif

+ 5 - 5
include/igl/tetgen/read_into_tetgenio.cpp

@@ -56,11 +56,11 @@ IGL_INLINE bool igl::read_into_tetgenio(
     }
     // This changed as of (the so far unreleased) tetgen 1.5
     //success = in.load_tetmesh(basename_char);
-    int object = tetgenbehavior::NODES;
-    if(ext == "mesh")
-    {
-      object = tetgenbehavior::MEDIT;
-    }
+    //int object = tetgenbehavior::NODES;
+    //if(ext == "mesh")
+    //{
+    //  object = tetgenbehavior::MEDIT;
+    //}
     success = in.load_tetmesh(basename_char,!tetgenbehavior::MEDIT);
   }
 

+ 1 - 1
include/igl/xml/Makefile

@@ -6,7 +6,7 @@ debug: libiglxml
 
 include ../../../Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG
-debug: CFLAGS += -g -Wall -Werror
+debug: CFLAGS += -g -Wall
 
 .PHONY: libiglxml
 libiglxml: obj ../../../lib/libiglxml.a