Browse Source

fix some internal error

V2-origin
Zhicheng Wang 1 month ago
parent
commit
b864ef0aa3
  1. 2
      network_process/include/prim_gen.hpp
  2. 3
      network_process/src/prim_gen/filter_tet_by_subface.cpp
  3. 8
      network_process/src/process.cpp

2
network_process/include/prim_gen.hpp

@ -19,7 +19,7 @@ void build_tetrahedron_and_adjacency(const scene_bg_mesh_info
flat_hash_map_mp<uint32_t, stl_vector_mp<uint32_t>>& reverse_vertex_adjacency, flat_hash_map_mp<uint32_t, stl_vector_mp<uint32_t>>& reverse_vertex_adjacency,
btree_map_mp<uint32_t, stl_vector_mp<uint32_t>>& vertex_to_tet_mapping); btree_map_mp<uint32_t, stl_vector_mp<uint32_t>>& vertex_to_tet_mapping);
void filter_tet_by_subface(const btree_map_mp<uint32_t, stl_vector_mp<uint32_t>>& vertex_to_tet_mapping, void filter_tet_by_subface(const btree_map_mp<uint32_t, stl_vector_mp<uint32_t>>& vertex_to_tet_mapping,
Eigen::Ref<Eigen::MatrixXd> vertex_infos, Eigen::MatrixXd& vertex_infos,
flat_hash_map_mp<uint32_t, uint32_t>& vertex_indices_mapping, flat_hash_map_mp<uint32_t, uint32_t>& vertex_indices_mapping,
stl_vector_mp<std::array<uint32_t, 4>>& tetrahedrons, stl_vector_mp<std::array<uint32_t, 4>>& tetrahedrons,
flat_hash_map_mp<uint32_t, uint32_t>& vertex_lexigraphical_adjacency, flat_hash_map_mp<uint32_t, uint32_t>& vertex_lexigraphical_adjacency,

3
network_process/src/prim_gen/filter_tet_by_subface.cpp

@ -16,7 +16,7 @@
// }; // };
void filter_tet_by_subface(const btree_map_mp<uint32_t, stl_vector_mp<uint32_t>>& vertex_to_tet_mapping, void filter_tet_by_subface(const btree_map_mp<uint32_t, stl_vector_mp<uint32_t>>& vertex_to_tet_mapping,
Eigen::Ref<Eigen::MatrixXd> vertex_infos, Eigen::MatrixXd& vertex_infos,
flat_hash_map_mp<uint32_t, uint32_t>& vertex_indices_mapping, flat_hash_map_mp<uint32_t, uint32_t>& vertex_indices_mapping,
stl_vector_mp<std::array<uint32_t, 4>>& tetrahedrons, stl_vector_mp<std::array<uint32_t, 4>>& tetrahedrons,
flat_hash_map_mp<uint32_t, uint32_t>& vertex_lexigraphical_adjacency, flat_hash_map_mp<uint32_t, uint32_t>& vertex_lexigraphical_adjacency,
@ -140,6 +140,7 @@ void filter_tet_by_subface(const btree_map_mp<uint32_t, stl_vector_mp<uint32_t>>
filtered_vertex_lexigraphical_adjacency.emplace(vertex_index, vertex_indices_mapping.at(vertex_index)); filtered_vertex_lexigraphical_adjacency.emplace(vertex_index, vertex_indices_mapping.at(vertex_index));
filtered_vert_infos_iter++; filtered_vert_infos_iter++;
} }
vertex_infos.resize(filtered_vert_infos.rows(), filtered_vert_infos.cols());
vertex_infos = std::move(filtered_vert_infos); vertex_infos = std::move(filtered_vert_infos);
vertex_lexigraphical_adjacency = std::move(filtered_vertex_lexigraphical_adjacency); vertex_lexigraphical_adjacency = std::move(filtered_vertex_lexigraphical_adjacency);
} }

8
network_process/src/process.cpp

@ -106,6 +106,10 @@ ISNP_API void build_implicit_network_by_blobtree(const s_settings&
{ {
arrangement_cells.reserve(shells.size()); arrangement_cells.reserve(shells.size());
for (uint32_t i = 0; i < shells.size(); ++i) { arrangement_cells.emplace_back(stl_vector_mp<uint32_t>{i}); } for (uint32_t i = 0; i < shells.size(); ++i) { arrangement_cells.emplace_back(stl_vector_mp<uint32_t>{i}); }
shell_to_cell.resize(shells.size());
for (uint32_t i = 0; i < arrangement_cells.size(); i++) {
for (auto shell : arrangement_cells[i]) shell_to_cell[shell] = i;
}
} else { } else {
{ {
stl_vector_mp<std::pair<uint32_t, uint32_t>> shell_links{}; stl_vector_mp<std::pair<uint32_t, uint32_t>> shell_links{};
@ -124,10 +128,6 @@ ISNP_API void build_implicit_network_by_blobtree(const s_settings&
shell_links); shell_links);
compute_arrangement_cells(static_cast<uint32_t>(shells.size()), shell_links, arrangement_cells); compute_arrangement_cells(static_cast<uint32_t>(shells.size()), shell_links, arrangement_cells);
} }
shell_to_cell.resize(shells.size());
for (uint32_t i = 0; i < arrangement_cells.size(); i++) {
for (auto shell : arrangement_cells[i]) shell_to_cell[shell] = i;
}
} }
// post process // post process
{ {

Loading…
Cancel
Save