Browse Source

fix compilation error

V2-integral
Zhicheng Wang 2 weeks ago
parent
commit
d984b98d3a
  1. 17
      network_process/src/connect_by_topo/patch_connectivity.cpp
  2. 9
      network_process/src/post_topo/map_chains.cpp

17
network_process/src/connect_by_topo/patch_connectivity.cpp

@ -82,12 +82,12 @@ void compute_patches(const stl_vector_mp<stl_vector_mp<edge_key_t>>& edges_of
} }
} }
void compute_chains(const flat_hash_map_mp<edge_key_t, edge_header_t>& patch_edges, void compute_chains(const flat_hash_map_mp<edge_key_t, edge_header_t>& patch_edges,
const flat_hash_set_mp<edge_key_t>& patch_boundary_edges, const flat_hash_set_mp<edge_key_t>& patch_boundary_edges,
const stl_vector_mp<polygon_face_t>& iso_faces, const stl_vector_mp<polygon_face_t>& iso_faces,
stl_vector_mp<stl_vector_mp<uint32_t>>& chain_vertices, stl_vector_mp<stl_vector_mp<uint32_t>>& chain_vertices,
stl_vector_mp<boundary_edge_header_t>& chain_edge_headers, stl_vector_mp<boundary_edge_header_t>& chain_edge_headers,
stl_vector_mp<chain_header_t>& chain_headers) stl_vector_mp<chain_header_t>& chain_headers)
{ {
flat_hash_map_mp<uint32_t, stl_vector_mp<uint32_t>> non_manifold_edges_of_vert{}; flat_hash_map_mp<uint32_t, stl_vector_mp<uint32_t>> non_manifold_edges_of_vert{};
non_manifold_edges_of_vert.reserve(patch_boundary_edges.size() / 2); non_manifold_edges_of_vert.reserve(patch_boundary_edges.size() / 2);
@ -117,10 +117,7 @@ void compute_chains(const flat_hash_map_mp<edge_key_t, edge_header_t>& patch_e
flat_hash_set_mp<uint32_t> unique_volume_indices{}; flat_hash_set_mp<uint32_t> unique_volume_indices{};
new_chain_edge_headers.subface_indices.reserve(new_chain_headers.face_indices.size()); new_chain_edge_headers.subface_indices.reserve(new_chain_headers.face_indices.size());
for (const auto& face_index : new_chain_headers.face_indices) { for (const auto& face_index : new_chain_headers.face_indices) {
std::transform(iso_faces[face_index].headers.begin(), for (const auto& [volume_index, _] : iso_faces[face_index].headers) unique_volume_indices.emplace(volume_index);
iso_faces[face_index].headers.end(),
std::back_inserter(unique_volume_indices),
[](const face_header_t& header) { return header.volume_index; });
new_chain_edge_headers.subface_indices.emplace_back(iso_faces[face_index].subface_index); new_chain_edge_headers.subface_indices.emplace_back(iso_faces[face_index].subface_index);
} }
std::move(unique_volume_indices.begin(), std::move(unique_volume_indices.begin(),

9
network_process/src/post_topo/map_chains.cpp

@ -22,7 +22,8 @@ void map_chain_to_parameteric_plane(const baked_blobtree_t&
stl_vector_mp<uint32_t> unique_chain_indices{}; stl_vector_mp<uint32_t> unique_chain_indices{};
flat_hash_map_mp<uint32_t, uint32_t> old_chain_index_to_unique_index{}; flat_hash_map_mp<uint32_t, uint32_t> old_chain_index_to_unique_index{};
auto unique_end_iter = unique_chain_indices.begin(); auto unique_end_iter = unique_chain_indices.begin();
for (const auto& [subface_index, patch_indices] : patch_of_subface) { for (const auto& [subface_index_, patch_indices] : patch_of_subface) {
const auto subface_index = subface_index_;
const auto& subface = subfaces[subface_index].object_ptr.get(); const auto& subface = subfaces[subface_index].object_ptr.get();
auto mapping_func = subface.fetch_param_mapping_evaluator(); auto mapping_func = subface.fetch_param_mapping_evaluator();
auto& parameteric_plane = parameteric_planes[subface_index]; auto& parameteric_plane = parameteric_planes[subface_index];
@ -62,7 +63,11 @@ void map_chain_to_parameteric_plane(const baked_blobtree_t&
chain_vertex_flags_[0] = chain_end_vertex_signular_flag[2 * chain_index]; chain_vertex_flags_[0] = chain_end_vertex_signular_flag[2 * chain_index];
chain_vertex_flags_[chain.size() - 1] = chain_end_vertex_signular_flag[2 * chain_index + 1]; chain_vertex_flags_[chain.size() - 1] = chain_end_vertex_signular_flag[2 * chain_index + 1];
chain_other_subface_indices.emplace_back(chain_edge_headers[chain_index].subface_indices); const auto& subface_indices = chain_edge_headers[chain_index].subface_indices;
const auto other_subface_index = *std::find_if_not(subface_indices.begin(),
subface_indices.end(),
[&](uint32_t index) { return index == subface_index; });
chain_other_subface_indices.emplace_back(other_subface_index);
} }
for (const auto& patch_index : patch_indices) { for (const auto& patch_index : patch_indices) {

Loading…
Cancel
Save