Compare commits

...

2 Commits

  1. 5
      network_process/src/connect_by_topo/patch_connectivity.cpp
  2. 9
      network_process/src/post_topo/map_chains.cpp

5
network_process/src/connect_by_topo/patch_connectivity.cpp

@ -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{};
new_chain_edge_headers.subface_indices.reserve(new_chain_headers.face_indices.size());
for (const auto& face_index : new_chain_headers.face_indices) {
std::transform(iso_faces[face_index].headers.begin(),
iso_faces[face_index].headers.end(),
std::back_inserter(unique_volume_indices),
[](const face_header_t& header) { return header.volume_index; });
for (const auto& [volume_index, _] : iso_faces[face_index].headers) unique_volume_indices.emplace(volume_index);
new_chain_edge_headers.subface_indices.emplace_back(iso_faces[face_index].subface_index);
}
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{};
flat_hash_map_mp<uint32_t, uint32_t> old_chain_index_to_unique_index{};
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();
auto mapping_func = subface.fetch_param_mapping_evaluator();
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_[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) {

Loading…
Cancel
Save