Lagrange
Loading...
Searching...
No Matches
split_obtuse_triangles.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#include <lagrange/internal/constants.h>
16
17#include <cstddef>
18#include <string_view>
19
20namespace lagrange {
21
26
31{
35 float max_angle = static_cast<float>(lagrange::internal::pi_2);
36
39 size_t max_iterations = 5;
40
43 std::string_view active_region_attribute = "";
44};
45
57template <typename Scalar, typename Index>
60 SplitObtuseTrianglesOptions options = {});
61
63
64} // namespace lagrange
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:73
size_t split_obtuse_triangles(SurfaceMesh< Scalar, Index > &mesh, SplitObtuseTrianglesOptions options={})
Iteratively split obtuse triangles by splitting their longest edge at the projection of the opposite ...
Definition split_obtuse_triangles.cpp:41
Main namespace for Lagrange.
Options for the split_obtuse_triangles function.
Definition split_obtuse_triangles.h:31
size_t max_iterations
Maximum number of split passes.
Definition split_obtuse_triangles.h:39
std::string_view active_region_attribute
Optional facet attribute (uint8_t) restricting which facets are considered obtuse candidates.
Definition split_obtuse_triangles.h:43
float max_angle
Maximum allowed interior angle in radians.
Definition split_obtuse_triangles.h:35