Lagrange
Loading...
Searching...
No Matches
remesh.h
1/*
2 * Copyright 2026 Adobe. All rights reserved.
3 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License. You may obtain a copy
5 * of the License at http://www.apache.org/licenses/LICENSE-2.0
6 *
7 * Unless required by applicable law or agreed to in writing, software distributed under
8 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 * OF ANY KIND, either express or implied. See the License for the specific language
10 * governing permissions and limitations under the License.
11 */
12#pragma once
13
14#include <lagrange/SurfaceMesh.h>
15
16namespace lagrange::remeshing_im {
17
21enum class PosyType : uint8_t { Triangle = 3, Quad = 4 };
22
26enum class RosyType : uint8_t { Line = 2, Cross = 4, Hex = 6 };
27
32{
34 size_t target_num_facets = 1000;
35
37 bool deterministic = false;
38
40 size_t knn_points = 1000;
41
43 PosyType posy = PosyType::Quad;
44
46 RosyType rosy = RosyType::Cross;
47
50 float crease_angle = 0.f;
51
53 bool align_to_boundaries = false;
54
56 bool extrinsic = true;
57
59 size_t num_smooth_iter = 0;
60};
61
75template <typename Scalar, typename Index>
78 const RemeshingOptions& options = {});
79
80} // namespace lagrange::remeshing_im
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:66
Options for the remeshing process.
Definition remesh.h:32
bool deterministic
If true, the remeshing process will be deterministic.
Definition remesh.h:37
size_t num_smooth_iter
Number of smoothing iterations.
Definition remesh.h:59
PosyType posy
Positional symmetry type. Options: Triangle (3), Quad (4)
Definition remesh.h:43
size_t target_num_facets
Target number of facets in the remeshed output.
Definition remesh.h:34
RosyType rosy
Rotational symmetry type. Options: Line (2), Cross (4), Hex (6)
Definition remesh.h:46
bool extrinsic
Use extrinsic metrics when aligning cross field.
Definition remesh.h:56
size_t knn_points
Number of nearest neighbors to use when processing point clouds.
Definition remesh.h:40
float crease_angle
Crease angle in degrees.
Definition remesh.h:50
bool align_to_boundaries
Whether to align the remeshed output to the input mesh boundaries.
Definition remesh.h:53