Lagrange
Loading...
Searching...
No Matches
isoline.h
1/*
2 * Copyright 2024 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
13#pragma once
14
15#include <lagrange/SurfaceMesh.h>
16
17namespace lagrange {
18
26
31{
34
36 size_t channel_index = 0;
37
39 double isovalue = 0.0;
40
42 bool keep_below = true;
43
47 bool keep_attributes = true;
48};
49
63template <typename Scalar, typename Index>
66 const IsolineOptions& options = {});
67
81template <typename Scalar, typename Index>
82SurfaceMesh<Scalar, Index> extract_isoline(
83 const SurfaceMesh<Scalar, Index>& mesh,
84 const IsolineOptions& options = {});
85
107template <typename Scalar, typename Index>
109 const SurfaceMesh<Scalar, Index>& mesh,
110 const IsolineOptions& options = {});
111
113} // namespace lagrange
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:73
uint32_t AttributeId
Identified to be used to access an attribute.
Definition AttributeFwd.h:73
constexpr AttributeId invalid_attribute_id()
Invalid attribute id.
Definition AttributeFwd.h:76
SurfaceMesh< Scalar, Index > trim_by_isoline(const SurfaceMesh< Scalar, Index > &mesh, const IsolineOptions &options={})
Trim a mesh by the isoline of an implicit function defined on the mesh vertices/corners.
Definition isoline.cpp:609
SurfaceMesh< Scalar, Index > insert_isoline(const SurfaceMesh< Scalar, Index > &mesh, const IsolineOptions &options={})
Insert the isoline of an implicit function into a mesh.
Definition isoline.cpp:625
SurfaceMesh< Scalar, Index > extract_isoline(const SurfaceMesh< Scalar, Index > &mesh, const IsolineOptions &options={})
Extract the isoline of an implicit function defined on the mesh vertices/corners.
Definition isoline.cpp:617
Main namespace for Lagrange.
Options for isoline extraction/trimming.
Definition isoline.h:31
double isovalue
Isovalue to extract or trim with.
Definition isoline.h:39
bool keep_attributes
Whether to propagate input mesh attributes (vertex, facet, corner and indexed) to the output mesh.
Definition isoline.h:47
AttributeId attribute_id
Attribute ID of the scalar field to use. Can be a vertex or indexed attribute.
Definition isoline.h:33
size_t channel_index
Channel index to use for the scalar field.
Definition isoline.h:36
bool keep_below
Whether to keep the part below the isoline. Ignored for isoline extraction.
Definition isoline.h:42