Wildmeshing Toolkit
Loading...
Searching...
No Matches
EmbedTriangles.hpp
1#pragma once
2
3#include <wmtk/Types.hpp>
4
5#include <array>
6#include <cstdint>
7#include <vector>
8
9namespace wmtk::utils {
10
15{
20 bool check_orientation = false;
26 int num_threads = 1;
31 const std::vector<int>* triangle_input = nullptr;
32};
33
48{
52 std::vector<std::array<uint32_t, 2>> face_groups;
55 std::vector<uint32_t> triangle_group;
57 bool want_face_triangles = false;
60 std::vector<std::vector<uint32_t>> face_triangles;
61};
62
73{
75 std::vector<double> edge_vrt_coord;
77 std::vector<uint32_t> edge_indices;
79 std::vector<double> point_coord;
80};
81
87{
90 std::vector<std::vector<std::array<size_t, 2>>> edge_tiling;
94 std::vector<int64_t> point_vertex;
95};
96
147void embed_triangles_in_tets(
148 const std::vector<double>& tri_vrt_coord,
149 const std::vector<uint32_t>& triangle_indices,
150 const std::vector<double>& tet_vrt_coord,
151 const std::vector<uint32_t>& tet_indices,
152 std::vector<Vector3r>& v_rational,
153 std::vector<std::array<size_t, 3>>& polygon_faces,
154 std::vector<bool>& polygon_faces_on_input,
155 std::vector<bool>& is_v_on_input,
156 std::vector<std::array<size_t, 4>>& tets_after,
157 std::vector<bool>& tet_face_on_input_surface,
158 const EmbedTrianglesOptions& opts = {},
159 EmbedTrianglesProvenance* provenance = nullptr,
160 std::vector<int8_t>* tet_face_orientation = nullptr,
161 const EmbedFeaturesInput* features = nullptr,
162 EmbedFeaturesResult* features_out = nullptr);
163
164} // namespace wmtk::utils
Extra 1D/0D features to force into the output mesh, exactly.
Definition EmbedTriangles.hpp:73
std::vector< uint32_t > edge_indices
feature edges, 2 vertex ids each, into edge_vrt_coord
Definition EmbedTriangles.hpp:77
std::vector< double > point_coord
feature points, 3 doubles each, xyz-interleaved
Definition EmbedTriangles.hpp:79
std::vector< double > edge_vrt_coord
feature-edge vertices, 3 doubles each, xyz-interleaved
Definition EmbedTriangles.hpp:75
Where each feature ended up, in the COMPACTED output numbering (the same ids tets_after uses).
Definition EmbedTriangles.hpp:87
std::vector< std::vector< std::array< size_t, 2 > > > edge_tiling
Definition EmbedTriangles.hpp:90
std::vector< int64_t > point_vertex
Definition EmbedTriangles.hpp:94
Options for embed_triangles_in_tets. All checks are off by default.
Definition EmbedTriangles.hpp:15
int num_threads
Threads for the parts that run in parallel (so far the tracked surface's orientation).
Definition EmbedTriangles.hpp:26
const std::vector< int > * triangle_input
Definition EmbedTriangles.hpp:31
bool check_surface_provenance
Definition EmbedTriangles.hpp:24
bool check_collinear_input
Report input triangles that are collinear, before handing them to the remesher.
Definition EmbedTriangles.hpp:17
bool check_orientation
Definition EmbedTriangles.hpp:20
Which input triangles each output surface face came from.
Definition EmbedTriangles.hpp:48
std::vector< std::vector< uint32_t > > face_triangles
Definition EmbedTriangles.hpp:60
std::vector< std::array< uint32_t, 2 > > face_groups
Definition EmbedTriangles.hpp:52
bool want_face_triangles
Set to have face_triangles filled.
Definition EmbedTriangles.hpp:57
std::vector< uint32_t > triangle_group
Definition EmbedTriangles.hpp:55