From 874052cd9c583c59c8a08ba3724cb84fb8afd3eb Mon Sep 17 00:00:00 2001 From: Zhicheng Wang <1627343141@qq.com> Date: Tue, 29 Jul 2025 22:04:35 +0800 Subject: [PATCH] try to fix error on resizing Eigen::MatrixXd --- network_process/src/prim_gen/extract_vertex_infos.cpp | 3 --- network_process/src/process.cpp | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/network_process/src/prim_gen/extract_vertex_infos.cpp b/network_process/src/prim_gen/extract_vertex_infos.cpp index bb8859c..ec63527 100644 --- a/network_process/src/prim_gen/extract_vertex_infos.cpp +++ b/network_process/src/prim_gen/extract_vertex_infos.cpp @@ -38,9 +38,6 @@ void extract_vertex_infos(const s_settings& settings, scene_bg_mesh_info.vert_resolution = Eigen::Vector::Constant(settings.resolution + 1); // compute the SDF values for each vertex - vertex_infos = - Eigen::MatrixXd::Zero(hash_vert_pos(settings.resolution, settings.resolution, settings.resolution, scene_bg_mesh_info), - tree.subfaces.size()); for (uint32_t i = 0; i < tree.subfaces.size(); ++i) { auto subface_vert_info = vertex_infos.col(i); auto sdf_evaluator = tree.subfaces[i].object_ptr->fetch_sdf_evaluator(); diff --git a/network_process/src/process.cpp b/network_process/src/process.cpp index 8a8bc33..8c9aeab 100644 --- a/network_process/src/process.cpp +++ b/network_process/src/process.cpp @@ -25,7 +25,9 @@ ISNP_API void build_implicit_network_by_blobtree(const s_settings& stl_vector_mp iso_faces{}; // primitive generation { - Eigen::MatrixXd vertex_infos{}; + Eigen::MatrixXd vertex_infos = + Eigen::MatrixXd::Zero((settings.resolution + 1) * (settings.resolution + 1) * (settings.resolution + 1), + tree.subfaces.size()); flat_hash_map_mp vertex_indices_mapping{}; { btree_map_mp> vertex_to_tet_mapping{};