Lagrange
Loading...
Searching...
No Matches
WeldOptions Struct Reference

Options for welding indexed attributes. More...

#include <lagrange/weld_indexed_attribute.h>

Public Attributes

std::optional< double > epsilon_rel
 If set, values whose relative difference (in L-inf norm) is less than epsilon are merged together.
 
std::optional< double > epsilon_abs
 If set, values whose absolute difference (in L-inf norm) is less than epsilon are merged together.
 
std::optional< double > angle_abs
 If set, the absolute angle threshold (in radians) for merging attributes.
 
bool merge_across_vertices = false
 If indices are shared between corners around different vertices, merge them together.
 
span< const size_t > exclude_vertices = {}
 Vertices to exclude from welding.
 

Detailed Description

Options for welding indexed attributes.

Member Data Documentation

◆ epsilon_rel

std::optional<double> epsilon_rel

If set, values whose relative difference (in L-inf norm) is less than epsilon are merged together.

If not set, default to Eigen::NumTraits<ValueType>::dummy_precision().

◆ epsilon_abs

std::optional<double> epsilon_abs

If set, values whose absolute difference (in L-inf norm) is less than epsilon are merged together.

If not set, default to Eigen::NumTraits<ValueType>::epsilon().

◆ angle_abs

std::optional<double> angle_abs

If set, the absolute angle threshold (in radians) for merging attributes.

If the angle between two corners is less than this value, the attributes are merged. If not set, this condition is not checked.

Note
Angle is computed as \( arccos(v1 \cdot v2 / (\|v1\| * \|v2\|)) \), where v1 and v2 are the corner attribute values. It is well defined for all dimensions. The angle check is robust against degeneracies (e.g. zero-length vectors).
Angle check is done in conjunction with the relative and absolute precision checks. To only check the angle, set epsilon_rel to 0 and epsilon_abs to std::numeric_limits<double>::infinity().

◆ merge_across_vertices

bool merge_across_vertices = false

If indices are shared between corners around different vertices, merge them together.

Otherwise, separate indices will be created for each group of welded corners around each vertex.

◆ exclude_vertices

span<const size_t> exclude_vertices = {}

Vertices to exclude from welding.

This is mainly useful for cone singularities where welding similar attribute values may not be desirable.


The documentation for this struct was generated from the following file: