EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
EBGeometry_FaceParts.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Robert Marskar <robert.marskar@sintef.no>
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
11#ifndef EBGEOMETRY_FACEPARTS_HPP
12#define EBGEOMETRY_FACEPARTS_HPP
13
14// Std includes
15#include <cstdint>
16#include <string>
17
18// Our includes
22
23namespace EBGeometry {
24
25namespace Parser {
26
36template <typename T>
37[[nodiscard]] inline uint64_t
38meshFingerprint(const PolygonSoup<T>& a_soup) noexcept;
39
55template <typename T>
56[[nodiscard]] inline FaceGroups
57readFaceParts(const std::string& a_file, const PolygonSoup<T>& a_soup);
58
71template <typename T>
72inline void
73writeFaceParts(const std::string& a_file,
74 const FaceGroups& a_parts,
75 const PolygonSoup<T>& a_soup,
76 const std::string& a_meshFile);
77
88[[nodiscard]] inline FaceGroups
89overlayFaceGroups(const FaceGroups& a_fileGroups, const FaceGroups& a_picked);
90
91} // namespace Parser
92
93} // namespace EBGeometry
94
95#include "EBGeometry_FacePartsImplem.hpp"
96
97#endif
FaceGroups: named groups of a mesh's faces, as a file names them.
Declaration of the exception the file readers throw.
Declaration of the polygon soup the file readers return.
Polygons as a file stores them: vertex coordinates, faces as lists of vertex indices,...
Definition EBGeometry_PolygonSoup.hpp:48
FaceGroups readFaceParts(const std::string &a_file, const PolygonSoup< T > &a_soup)
Read a parts file: named parts of a mesh, each a set of the mesh's faces.
void writeFaceParts(const std::string &a_file, const FaceGroups &a_parts, const PolygonSoup< T > &a_soup, const std::string &a_meshFile)
Write a parts file that readFaceParts() reads back into a_parts.
uint64_t meshFingerprint(const PolygonSoup< T > &a_soup) noexcept
A fingerprint of a mesh's face numbering: its vertex count and each face's vertex indices,...
FaceGroups overlayFaceGroups(const FaceGroups &a_fileGroups, const FaceGroups &a_picked)
The groups a mesh file names, with picked parts on top.
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_Affine.hpp:26
Named groups of a mesh's faces: an OBJ file's g and o groups, or the named solids of an ASCII STL fil...
Definition EBGeometry_FaceGroups.hpp:29