Loading src/LocalOperations.cpp +17 −10 Original line number Diff line number Diff line Loading @@ -601,7 +601,7 @@ bool floatTetWild::is_out_boundary_envelope(const Mesh& mesh, int v_id, const Ve } #include <sstream> bool floatTetWild::is_out_envelope(const Mesh& mesh, int v_id, const Vector3& new_pos, const AABBWrapper& tree) { bool floatTetWild::is_out_envelope(Mesh& mesh, int v_id, const Vector3& new_pos, const AABBWrapper& tree) { GEO::index_t prev_facet; if(tree.is_out_sf_envelope(new_pos, mesh.params.eps_2, prev_facet)) return true; Loading @@ -625,7 +625,8 @@ bool floatTetWild::is_out_envelope(const Mesh& mesh, int v_id, const Vector3& ne #else bool is_out = sample_triangle_and_check_is_out(vs, mesh.params.dd, mesh.params.eps_2, tree, prev_facet); #endif if(!mesh.params.envelope_log.empty() && envelope_log_csv_cnt < 1e5){ if(!mesh.params.envelope_log.empty()){ if(envelope_log_csv_cnt < 1e5) { std::ostringstream ss; ss << std::setprecision(17); for (const auto &v: vs) { Loading @@ -635,6 +636,12 @@ bool floatTetWild::is_out_envelope(const Mesh& mesh, int v_id, const Vector3& ne std::string tmp = ss.str(); envelope_log_csv += tmp; envelope_log_csv_cnt += 1; } else { std::ofstream fout(mesh.params.envelope_log); fout << envelope_log_csv; fout.close(); mesh.params.envelope_log = ""; } } if (is_out) return true; Loading src/LocalOperations.h +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ namespace floatTetWild { bool is_inverted(const Vector3& v0, const Vector3& v1, const Vector3& v2, const Vector3& v3); bool is_degenerate(const Vector3& v0, const Vector3& v1, const Vector3& v2, const Vector3& v3); bool is_out_envelope(const Mesh& mesh, int v_id, const Vector3& new_pos, const AABBWrapper& tree); bool is_out_envelope(Mesh& mesh, int v_id, const Vector3& new_pos, const AABBWrapper& tree); bool is_out_boundary_envelope(const Mesh& mesh, int v_id, const Vector3& new_pos, const AABBWrapper& tree); void sample_triangle(const std::array<Vector3, 3>& vs, std::vector<GEO::vec3>& ps, Scalar sampling_dist); bool sample_triangle_and_check_is_out(const std::array<Vector3, 3>& vs, Scalar sampling_dist, Loading src/main.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -471,6 +471,7 @@ int main(int argc, char **argv) { if (!params.envelope_log.empty()) { std::ofstream fout(params.envelope_log); fout << envelope_log_csv; fout.close(); } return EXIT_SUCCESS; Loading Loading
src/LocalOperations.cpp +17 −10 Original line number Diff line number Diff line Loading @@ -601,7 +601,7 @@ bool floatTetWild::is_out_boundary_envelope(const Mesh& mesh, int v_id, const Ve } #include <sstream> bool floatTetWild::is_out_envelope(const Mesh& mesh, int v_id, const Vector3& new_pos, const AABBWrapper& tree) { bool floatTetWild::is_out_envelope(Mesh& mesh, int v_id, const Vector3& new_pos, const AABBWrapper& tree) { GEO::index_t prev_facet; if(tree.is_out_sf_envelope(new_pos, mesh.params.eps_2, prev_facet)) return true; Loading @@ -625,7 +625,8 @@ bool floatTetWild::is_out_envelope(const Mesh& mesh, int v_id, const Vector3& ne #else bool is_out = sample_triangle_and_check_is_out(vs, mesh.params.dd, mesh.params.eps_2, tree, prev_facet); #endif if(!mesh.params.envelope_log.empty() && envelope_log_csv_cnt < 1e5){ if(!mesh.params.envelope_log.empty()){ if(envelope_log_csv_cnt < 1e5) { std::ostringstream ss; ss << std::setprecision(17); for (const auto &v: vs) { Loading @@ -635,6 +636,12 @@ bool floatTetWild::is_out_envelope(const Mesh& mesh, int v_id, const Vector3& ne std::string tmp = ss.str(); envelope_log_csv += tmp; envelope_log_csv_cnt += 1; } else { std::ofstream fout(mesh.params.envelope_log); fout << envelope_log_csv; fout.close(); mesh.params.envelope_log = ""; } } if (is_out) return true; Loading
src/LocalOperations.h +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ namespace floatTetWild { bool is_inverted(const Vector3& v0, const Vector3& v1, const Vector3& v2, const Vector3& v3); bool is_degenerate(const Vector3& v0, const Vector3& v1, const Vector3& v2, const Vector3& v3); bool is_out_envelope(const Mesh& mesh, int v_id, const Vector3& new_pos, const AABBWrapper& tree); bool is_out_envelope(Mesh& mesh, int v_id, const Vector3& new_pos, const AABBWrapper& tree); bool is_out_boundary_envelope(const Mesh& mesh, int v_id, const Vector3& new_pos, const AABBWrapper& tree); void sample_triangle(const std::array<Vector3, 3>& vs, std::vector<GEO::vec3>& ps, Scalar sampling_dist); bool sample_triangle_and_check_is_out(const std::array<Vector3, 3>& vs, Scalar sampling_dist, Loading
src/main.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -471,6 +471,7 @@ int main(int argc, char **argv) { if (!params.envelope_log.empty()) { std::ofstream fout(params.envelope_log); fout << envelope_log_csv; fout.close(); } return EXIT_SUCCESS; Loading