diff --git a/frontend/src/implicit_surface_network_solver.cpp b/frontend/src/implicit_surface_network_solver.cpp index ba8049d..929afa4 100644 --- a/frontend/src/implicit_surface_network_solver.cpp +++ b/frontend/src/implicit_surface_network_solver.cpp @@ -8,7 +8,7 @@ void implicit_network_solver::generate_polymesh(stl_vector_mp& { // generate polymesh m_timers.push_timer("generate_polymesh"); - flat_hash_map_mp temp{}; + flat_hash_map_mp temp{}; build_implicit_network_by_blobtree(m_settings, *m_blobtree, output_vertices, diff --git a/network_process/include/post_topo/chain_post_processing.hpp b/network_process/include/post_topo/chain_post_processing.hpp index 181210a..da12df2 100644 --- a/network_process/include/post_topo/chain_post_processing.hpp +++ b/network_process/include/post_topo/chain_post_processing.hpp @@ -3,7 +3,7 @@ #include struct baked_blobtree_t; -struct parameteric_plane_t; +struct parametric_plane_t; // return: active chain label dynamic_bitset_mp<> filter_chains(const stl_vector_mp& faces, @@ -17,8 +17,8 @@ dynamic_bitset_mp<> identify_chain_signular(const stl_vector_mp& const stl_vector_mp>& chains, const flat_hash_map_mp>& chain_of_patch, size_t chain_size); -void identify_chain_near_parallel(flat_hash_map_mp& parameteric_planes); -void map_chain_to_parameteric_plane(const baked_blobtree_t& tree, +void identify_chain_near_parallel(flat_hash_map_mp& parametric_planes); +void map_chain_to_parametric_plane(const baked_blobtree_t& tree, const stl_vector_mp& vertices, const stl_vector_mp& faces, const stl_vector_mp>& patches, @@ -27,5 +27,5 @@ void map_chain_to_parameteric_plane(const baked_blobtree_t& const flat_hash_map_mp>& chain_of_patch, const flat_hash_map_mp& vertex_old_index_to_unique_index, const dynamic_bitset_mp<>& chain_end_vertex_signular_flag, - flat_hash_map_mp& parameteric_planes); -void remap_parameteric_plane_vertices(flat_hash_map_mp& parameteric_planes); \ No newline at end of file + flat_hash_map_mp& parametric_planes); +void remap_parametric_plane_vertices(flat_hash_map_mp& parametric_planes); \ No newline at end of file diff --git a/network_process/interface/process.hpp b/network_process/interface/process.hpp index f8b130a..5e032b9 100644 --- a/network_process/interface/process.hpp +++ b/network_process/interface/process.hpp @@ -13,7 +13,7 @@ struct parametric_plane_t { stl_vector_mp> vertex_special_flags{}; // format: total length is N - 1, and i identifies whether edge [i, i+1) is near parallel or not stl_vector_mp> edge_near_parallel_flags{}; - // the other subface index (except the subface of the parameteric plane) of the chain + // the other subface index (except the subface of the parametric plane) of the chain stl_vector_mp chain_other_subface_indices{}; /// chain group (by neighboring patch) associated properties stl_vector_mp> chain_group_indices{}; @@ -24,4 +24,4 @@ ISNP_API void build_implicit_network_by_blobtree(const s_settings& stl_vector_mp& output_vertices, stl_vector_mp& output_polygon_faces, stl_vector_mp& output_vertex_counts_of_face, - flat_hash_map_mp& output_parameteric_planes); \ No newline at end of file + flat_hash_map_mp& output_parametric_planes); \ No newline at end of file diff --git a/network_process/src/post_topo/identify_chain_properties.cpp b/network_process/src/post_topo/identify_chain_properties.cpp index da976bc..8bb7b76 100644 --- a/network_process/src/post_topo/identify_chain_properties.cpp +++ b/network_process/src/post_topo/identify_chain_properties.cpp @@ -47,14 +47,14 @@ dynamic_bitset_mp<> identify_chain_signular(const stl_vector_mp& return chain_end_vertex_signular_flag; } -void identify_chain_near_parallel(flat_hash_map_mp& parameteric_planes) +void identify_chain_near_parallel(flat_hash_map_mp& parametric_planes) { - for (auto& [_, parameteric_plane] : parameteric_planes) { - parameteric_plane.edge_near_parallel_flags.reserve(parameteric_plane.chain_vertices.size()); - for (size_t i = 0; i < parameteric_plane.chain_vertices.size(); ++i) { - const auto& vertices = parameteric_plane.chain_vertices[i]; - auto& vertex_flags = parameteric_plane.vertex_special_flags[i]; - auto& edge_flags = parameteric_plane.edge_near_parallel_flags.emplace_back(); + for (auto& [_, parametric_plane] : parametric_planes) { + parametric_plane.edge_near_parallel_flags.reserve(parametric_plane.chain_vertices.size()); + for (size_t i = 0; i < parametric_plane.chain_vertices.size(); ++i) { + const auto& vertices = parametric_plane.chain_vertices[i]; + auto& vertex_flags = parametric_plane.vertex_special_flags[i]; + auto& edge_flags = parametric_plane.edge_near_parallel_flags.emplace_back(); edge_flags.resize(vertices.size() - 1); // identify edge near parallel first diff --git a/network_process/src/post_topo/map_chains.cpp b/network_process/src/post_topo/map_chains.cpp index 7e9675d..1a60bbb 100644 --- a/network_process/src/post_topo/map_chains.cpp +++ b/network_process/src/post_topo/map_chains.cpp @@ -1,7 +1,7 @@ #include #include -void map_chain_to_parameteric_plane(const baked_blobtree_t& tree, +void map_chain_to_parametric_plane(const baked_blobtree_t& tree, const stl_vector_mp& vertices, const stl_vector_mp& faces, const stl_vector_mp>& patches, @@ -10,7 +10,7 @@ void map_chain_to_parameteric_plane(const baked_blobtree_t& const flat_hash_map_mp>& chain_of_patch, const flat_hash_map_mp& vertex_old_index_to_unique_index, const dynamic_bitset_mp<>& chain_end_vertex_signular_flag, - flat_hash_map_mp& parameteric_planes) + flat_hash_map_mp& parametric_planes) { flat_hash_map_mp> patch_of_subface{}; for (const auto& [patch_index, _] : chain_of_patch) { @@ -26,11 +26,11 @@ void map_chain_to_parameteric_plane(const baked_blobtree_t& 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]; - auto& chain_vertices = parameteric_plane.chain_vertices; - auto& chain_group_indices = parameteric_plane.chain_group_indices; - auto& chain_vertex_flags = parameteric_plane.vertex_special_flags; - auto& chain_other_subface_indices = parameteric_plane.chain_other_subface_indices; + auto& parametric_plane = parametric_planes[subface_index]; + auto& chain_vertices = parametric_plane.chain_vertices; + auto& chain_group_indices = parametric_plane.chain_group_indices; + auto& chain_vertex_flags = parametric_plane.vertex_special_flags; + auto& chain_other_subface_indices = parametric_plane.chain_other_subface_indices; chain_group_indices.reserve(patch_indices.size()); unique_chain_indices.clear(); @@ -81,16 +81,16 @@ void map_chain_to_parameteric_plane(const baked_blobtree_t& } } -void remap_parameteric_plane_vertices(flat_hash_map_mp& parameteric_planes) +void remap_parametric_plane_vertices(flat_hash_map_mp& parametric_planes) { - for (auto& [_, parameteric_plane] : parameteric_planes) { - auto& uv_bounds = parameteric_plane.uv_bounds; - for (auto& chain_vertices : parameteric_plane.chain_vertices) { + for (auto& [_, parametric_plane] : parametric_planes) { + auto& uv_bounds = parametric_plane.uv_bounds; + for (auto& chain_vertices : parametric_plane.chain_vertices) { for (auto& vertex : chain_vertices) uv_bounds = uv_bounds.extend(vertex); } assert(uv_bounds.sizes().minCoeff() > epsilon); const auto uv_bounds_rpc = uv_bounds.sizes().cwiseInverse().array(); - for (auto& chain_vertices : parameteric_plane.chain_vertices) { + for (auto& chain_vertices : parametric_plane.chain_vertices) { std::transform(chain_vertices.begin(), chain_vertices.end(), chain_vertices.begin(), diff --git a/network_process/src/process.cpp b/network_process/src/process.cpp index 1088fd6..c7faef5 100644 --- a/network_process/src/process.cpp +++ b/network_process/src/process.cpp @@ -5,12 +5,12 @@ #include #include "post_topo/chain_post_processing.hpp" -ISNP_API void build_implicit_network_by_blobtree(const s_settings& settings, - const baked_blobtree_t& tree, - stl_vector_mp& output_vertices, - stl_vector_mp& output_polygon_faces, - stl_vector_mp& output_vertex_counts_of_face, - flat_hash_map_mp& output_parameteric_planes) +ISNP_API void build_implicit_network_by_blobtree(const s_settings& settings, + const baked_blobtree_t& tree, + stl_vector_mp& output_vertices, + stl_vector_mp& output_polygon_faces, + stl_vector_mp& output_vertex_counts_of_face, + flat_hash_map_mp& output_parametric_planes) { // load LUT for implicit arrangement load_lut(); @@ -181,18 +181,18 @@ ISNP_API void build_implicit_network_by_blobtree(const s_settings& filter_chains(iso_faces, patches, active_patch_label, chain_edge_headers, chain_of_patch); auto is_chain_end_vertices_signular = identify_chain_signular(iso_faces, patches, chain_vertices, chain_of_patch, chain_vertices.size()); - map_chain_to_parameteric_plane(tree, - iso_pts, - iso_faces, - patches, - chain_vertices, - chain_edge_headers, - chain_of_patch, - vertex_old_index_to_unique_index, - is_chain_end_vertices_signular, - output_parameteric_planes); - identify_chain_near_parallel(output_parameteric_planes); - remap_parameteric_plane_vertices(output_parameteric_planes); + map_chain_to_parametric_plane(tree, + iso_pts, + iso_faces, + patches, + chain_vertices, + chain_edge_headers, + chain_of_patch, + vertex_old_index_to_unique_index, + is_chain_end_vertices_signular, + output_parametric_planes); + identify_chain_near_parallel(output_parametric_planes); + remap_parametric_plane_vertices(output_parametric_planes); } } }