#pragma once #include /// Compute iso-edges and edge-face connectivity /// ///@param[in] patch_faces Patch faces taken from the kernel ///@param[out] edges_of_face A list of face edges containing global edge index /// ///@param[out] patch_edges Edges of the patch; containing two vertices, global face index, and local edge index ISNP_API void compute_patch_edges(const stl_vector_mp& patch_faces, stl_vector_mp>& edges_of_face, stl_vector_mp& patch_edges); /// Group `iso_faces` into patches for IA: /// /// /// @param[in] edges_of_faces the edges' indices of each face with the same orientation from the kernel. /// @param[in] medg_edges the list of edges on the patch. /// @param[in] patch_faces the list of faces on the patch. Each face contains an implicit function label. /// /// /// @param[out] patches output - the list of patches which contain a list of faces' indices. ISNP_API void compute_patches(const stl_vector_mp>& edges_of_face, const stl_vector_mp& patch_edges, const stl_vector_mp& patch_faces, stl_vector_mp>& patches, stl_vector_mp& patch_of_face_mapping); /// this should be correct, so we won't implement it for now. // /// A validation of patch to function label through taking the majority vote of function labels on all the patch vertices // /// // ///@param[in] iso_verts the list of vertices on the patch. Each vertex contains 1-3 implicit function labesl // /// depending on its connectivity. This purely serves as a verification for the face labels above. // /// // ///@return Bool True - passed the patch label checks / False - failed the check // bool check_patch_label(const stl_vector_mp>& edges_of_face, // const stl_vector_mp& patch_edges, // const stl_vector_mp& patch_faces, // const stl_vector_mp iso_verts, // stl_vector_mp>& patches, // stl_vector_mp& patch_function_label); /// Group non-manifold iso-edges into chains /// /// @param[in] patch_edges As above /// @param[out] non_manifold_edges_of_vert Indices of non-manifold vertices /// /// @param[out] chains Chains of non-manifold edges; encoded by a vector of edge indices. ISNP_API void compute_chains(const stl_vector_mp& patch_edges, const stl_vector_mp>& non_manifold_edges_of_vert, stl_vector_mp>& chains); /// compute shells and connected components of isosurfaces /// each shell is a list of half-patches /// each component is a list of patches /// we also build maps: half-patch --> shell, patch --> component /// @param[in] half_patch_adj_list The adjacency list of half-patches /// /// @param[out] shell_of_patch Map: half-patch --> shell /// @param[out] component Connected componeent represented as a list of patches /// @param[out] component_of_patch Map: patch --> component ISNP_API void compute_shells_and_components(const stl_vector_mp>& half_patch_adj_list, stl_vector_mp>& shells, stl_vector_mp& shell_of_half_patch, stl_vector_mp>& components, stl_vector_mp& component_of_patch); /// group shells into arrangement cells /// ///@param[in] num_shell Shells number ///@param[in] shell_links The connectivity of shells /// ///@param[out] arrangement_cells Cells ISNP_API void compute_arrangement_cells(uint32_t num_shell, const stl_vector_mp>& shell_links, stl_vector_mp>& arrangement_cells);