Browse Source

handle boundary edges

Former-commit-id: 3ce028a1ea44d9de4e59c37c1a2420f7487c36a1
Alec Jacobson 8 years ago
parent
commit
148c4a067f
1 changed files with 3 additions and 2 deletions
  1. 3 2
      include/igl/edge_flaps.cpp

+ 3 - 2
include/igl/edge_flaps.cpp

@@ -17,8 +17,9 @@ IGL_INLINE void igl::edge_flaps(
   Eigen::MatrixXi & EF,
   Eigen::MatrixXi & EI)
 {
-  EF.resize(E.rows(),2);
-  EI.resize(E.rows(),2);
+  // Initialize to boundary value
+  EF.setConstant(E.rows(),2,-1);
+  EI.setConstant(E.rows(),2,-1);
   // loop over all faces
   for(int f = 0;f<F.rows();f++)
   {