From 47b39bcb2fe2307f931e6473f2d26d766b4ed6e5 Mon Sep 17 00:00:00 2001 From: Kacper Pluta Date: Tue, 4 Aug 2020 13:28:36 +0300 Subject: [PATCH 1/3] reduce numerical errors --- include/hedra/polyhedral_face_normals.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/include/hedra/polyhedral_face_normals.h b/include/hedra/polyhedral_face_normals.h index f9d5734..431e53d 100644 --- a/include/hedra/polyhedral_face_normals.h +++ b/include/hedra/polyhedral_face_normals.h @@ -29,21 +29,18 @@ namespace hedra { using namespace Eigen; faceNormals.resize(D.rows(),3); - for (int i=0;i10e-6) - faceNormal=faceNormal+((v1-v0).cross(vn-v0)).normalized(); + faceNormal += (v1-v0).cross(vn-v0); } - faceNormals.row(i)=faceNormal.normalized(); } - return true; - } + } } From 9083198ac48ecc5cae611b8d58e261d67ae55c53 Mon Sep 17 00:00:00 2001 From: Kacper Pluta Date: Tue, 24 Nov 2020 19:50:59 +0200 Subject: [PATCH 2/3] add different dualizer --- include/hedra/dual_mesh.h | 83 +++++++++++++++++++++++++++++---------- 1 file changed, 63 insertions(+), 20 deletions(-) diff --git a/include/hedra/dual_mesh.h b/include/hedra/dual_mesh.h index fcc4dd8..40ed0c8 100644 --- a/include/hedra/dual_mesh.h +++ b/include/hedra/dual_mesh.h @@ -9,11 +9,11 @@ #define HEDRA_DUAL_MESH_H #include #include -#include -#include -#include -#include -#include +#include "polygonal_face_centers.h" +#include "linear_vi_subdivision.h" +#include "moebius_vi_subdivision.h" +#include "subdivision_basics.h" +#include "dcel.h" #include #include #include @@ -40,7 +40,8 @@ namespace hedra OneRingSubdivisionData& sd, Eigen::MatrixXd& dualV, Eigen::VectorXi& dualD, - Eigen::MatrixXi& dualF) + Eigen::MatrixXi& dualF, + const bool clipBoundary) { using namespace Eigen; using namespace std; @@ -76,14 +77,10 @@ namespace hedra currVertexinFace=k; } - //std::cout<<"origFaceVertices: "< Date: Tue, 24 Nov 2020 20:46:46 +0200 Subject: [PATCH 3/3] Revert "add different dualizer" This reverts commit 9083198ac48ecc5cae611b8d58e261d67ae55c53. --- include/hedra/dual_mesh.h | 83 ++++++++++----------------------------- 1 file changed, 20 insertions(+), 63 deletions(-) diff --git a/include/hedra/dual_mesh.h b/include/hedra/dual_mesh.h index 40ed0c8..fcc4dd8 100644 --- a/include/hedra/dual_mesh.h +++ b/include/hedra/dual_mesh.h @@ -9,11 +9,11 @@ #define HEDRA_DUAL_MESH_H #include #include -#include "polygonal_face_centers.h" -#include "linear_vi_subdivision.h" -#include "moebius_vi_subdivision.h" -#include "subdivision_basics.h" -#include "dcel.h" +#include +#include +#include +#include +#include #include #include #include @@ -40,8 +40,7 @@ namespace hedra OneRingSubdivisionData& sd, Eigen::MatrixXd& dualV, Eigen::VectorXi& dualD, - Eigen::MatrixXi& dualF, - const bool clipBoundary) + Eigen::MatrixXi& dualF) { using namespace Eigen; using namespace std; @@ -77,10 +76,14 @@ namespace hedra currVertexinFace=k; } + //std::cout<<"origFaceVertices: "<