diff --git a/RELEASE_HISTORY.txt b/RELEASE_HISTORY.txt index 218325c38..dd0e8a59e 100644 --- a/RELEASE_HISTORY.txt +++ b/RELEASE_HISTORY.txt @@ -1,3 +1,5 @@ +1.0.2 Bug fix in winding number code +1.0.1 Bug fixes and more CGAL support 1.0.0 Major beta release: many renames, tutorial, triangle wrapper, org. build 0.4.6 Generalized Winding Numbers 0.4.5 CGAL extra: mesh selfintersection diff --git a/VERSION.txt b/VERSION.txt index 40c52c2b5..f1945cef1 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -3,4 +3,4 @@ # Anyone may increment Minor to indicate a small change. # Major indicates a large change or large number of changes (upload to website) # World indicates a substantial change or release -1.0.1 +1.0.2 diff --git a/examples/intersections/example.cpp b/examples/intersections/example.cpp index 57d40e98e..0719d07b7 100644 --- a/examples/intersections/example.cpp +++ b/examples/intersections/example.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -273,6 +274,7 @@ void display() const MatrixXd & N, const MatrixXd & C) { + glEnable(GL_COLOR_MATERIAL); glEnable(GL_POLYGON_OFFSET_FILL); // Avoid Stitching! glPolygonOffset(1.0,1); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); @@ -476,12 +478,14 @@ void color_selfintersections( { using namespace igl; using namespace Eigen; + using namespace std; MatrixXd SV; MatrixXi SF,IF; VectorXi J,IM; RemeshSelfIntersectionsParam params; - params.detect_only = true; + params.detect_only = false; remesh_self_intersections(V,F,params,SV,SF,IF,J,IM); + writeOBJ("FUCK.obj",SV,SF); C.resize(F.rows(),3); C.col(0).setConstant(0.4); C.col(1).setConstant(0.8); @@ -639,6 +643,7 @@ int main(int argc, char * argv[]) }else { VU = V; + color_selfintersections(V,F,C); } mid = 0.5*(VU.colwise().maxCoeff() + VU.colwise().minCoeff()); bbd = (VU.colwise().maxCoeff() - VU.colwise().minCoeff()).maxCoeff(); diff --git a/examples/skeleton-posing/example.cpp b/examples/skeleton-posing/example.cpp index 0a200876c..1445e5215 100644 --- a/examples/skeleton-posing/example.cpp +++ b/examples/skeleton-posing/example.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -59,6 +60,8 @@ #include #include +#define VERBOSE + enum SkelStyleType { SKEL_STYLE_TYPE_3D = 0, @@ -698,8 +701,16 @@ bool clean( using namespace std; { MatrixXi _1; - VectorXi _2,_3; - remesh_self_intersections(V,F,{},CV,CF,_1,_2,_3); + VectorXi _2,IM; +#ifdef VERBOSE + cout<<"remesh_self_intersections"<thresh).cast().sum(); @@ -733,6 +753,7 @@ bool clean( } assert(c==count); boundary_facets(CT,CF); + writeOBJ("boundary_facets.obj",CV,CF); } return true; } @@ -759,11 +780,16 @@ bool robust_weights( // compute tet-mesh { MatrixXi _1; - if(!mesh_with_skeleton(V,F,C,{},BE,{},10,TV,TT,_1)) +#ifdef VERBOSE + cout<<"mesh_with_skeleton"<::inside(const Point & p) const assert(p.size() == min_corner.size()); for(int i = 0;i= max_corner(i)) + //// Perfect matching is **not** robust + //if( p(i) < min_corner(i) || p(i) >= max_corner(i)) + // **MUST** be conservative!! + if( p(i) < min_corner(i) || p(i) > max_corner(i)) { return false; } diff --git a/include/igl/avg_edge_length.cpp b/include/igl/avg_edge_length.cpp index 858ae89d9..c6ab7c120 100644 --- a/include/igl/avg_edge_length.cpp +++ b/include/igl/avg_edge_length.cpp @@ -19,10 +19,10 @@ IGL_INLINE double igl::avg_edge_length( for (unsigned i=0;i #include #include +#include #include // Default settings pq2Y tell tetgen to mesh interior of triangle mesh and @@ -43,15 +44,13 @@ IGL_INLINE bool igl::mesh_with_skeleton( sample_edges(C,BECE,samples_per_bone,S); // Vertices we'll constrain tet mesh to meet MatrixXd VS = cat(1,V,S); - // Boundary faces - MatrixXi BF; // Use tetgen to mesh the interior of surface, this assumes surface: // * has no holes // * has no non-manifold edges or vertices // * has consistent orientation // * has no self-intersections // * has no 0-volume pieces - //writeOFF("mesh_with_skeleton.off",VS,F); + writeOBJ("mesh_with_skeleton.obj",VS,F); cerr<<"tetgen begin()"< > lcap; for(int i = 0;i +#include +#include #include #include @@ -18,6 +20,7 @@ IGL_INLINE bool igl::writeOBJ( const Eigen::PlainObjectBase& F) { std::ofstream s(str.c_str()); + s.precision(std::numeric_limits::digits10 + 1); if(!s.is_open()) {