Explorar o código

cage edges bug fix

Former-commit-id: 28d18bf5161cc7490bb4341154f17754f40318f5
Alec Jacobson %!s(int64=10) %!d(string=hai) anos
pai
achega
3606db54da
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      include/igl/boundary_conditions.cpp

+ 2 - 4
include/igl/boundary_conditions.cpp

@@ -35,10 +35,9 @@ IGL_INLINE bool igl::boundary_conditions(
     return false;
   }
 
-
   vector<int> bci;
   vector<int> bcj;
-  vector<int> bcv;
+  vector<double> bcv;
 
   // loop over points
   for(int p = 0;p<P.size();p++)
@@ -95,7 +94,6 @@ IGL_INLINE bool igl::boundary_conditions(
     }
   }
 
-  // Cage edges are not considered yet
   // loop over cage edges
   for(int e = 0;e<CE.rows();e++)
   {
@@ -153,7 +151,7 @@ IGL_INLINE bool igl::boundary_conditions(
   for(i = 0;i<bc.rows();i++)
   {
     double sum = bc.row(i).sum();
-    assert(sum != 0);
+    assert(sum != 0 && "Some boundary vertex getting all zero BCs");
     bc.row(i).array() /= sum;
   }