2D Smooth Frame Fields
SurfaceFrameField
Framefield implementation selector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mesh
|
SurfaceMesh
|
the supporting mesh onto which the framefield is based |
required |
elements
|
str
|
"vertices" or "faces", the mesh elements onto which the frames live. |
required |
Other Parameters:
Name | Type | Description |
---|---|---|
order |
int
|
Order of the frame field (number of branches). Defaults to 4. |
features |
bool
|
Whether to consider feature edges or not. If no 'custom_features' argument is provided, features will be automatically detected (see the FeatureEdgeDetector class). Defaults to True. |
n_smooth |
int
|
Number of smoothing steps to perform. Defaults to 3. |
smooth_attach_weight |
float
|
Custom attach weight to previous solution during smoothing steps. If not provided, will be estimated automatically during optimization. Defaults to None. |
use_cotan |
bool
|
whether to use cotan for a better approximation of the Laplace-Beltrami operator. If False, will use a simple adjacency laplacian operator (See the operators module). Defaults to True. |
cad_correction |
bool
|
Whether to modify the parallel transport as in [2] to prevent singularities to appear close to pointy areas. Will overwrite any connection provided with the 'custom_connection' argument. Defaults to True. |
smooth_normals |
Whether to initialize the frame field as a mean of adjacent feature edges (True), or following one of the edges (False). has no effect for frame field on faces. Defaults to True. |
|
verbose |
bool
|
verbose mode. Defaults to False. |
singularity_indices |
Attribute
|
custom singularity indices for the frame field. If provided, will use the algorithm described in [3] to get the smoothest frame field with these singularities. If elements is "vertices", the attribute should be indexed by the faces (where singularities appear) If elements is "faces", the attribute should be indexed by the vertices /!\ Indices should respect the Poincarré-Hopf theorem. Defaults to None. |
custom_connection |
SurfaceConnection
|
custom connection object to be used for parallel transport. If not provided, a connection will be automatically computed (see SurfaceConnection class). Defaults to None. |
custom_feature |
FeatureEdgeDetector
|
custom feature edges to be used in frame field optimization. If not provided, feature edges will be automatically detected. If the 'features' flag is set to False, features of this object are ignored. Defaults to None. |
Raises:
Type | Description |
---|---|
InvalidRangeArgumentError
|
'order' should be >= 1 |
InvalidRangeArgumentError
|
'n_smooth' should be >= 0 |
InvalidRangeArgumentError
|
'smooth_attach_weight' should be >= 0 |
Returns:
Name | Type | Description |
---|---|---|
FrameField |
FrameField
|
A framefield object with the correct specifications |
References
-
[1] An Approach to Quad Meshing Based on Harmonic Cross-Valued Maps and the Ginzburg-Landau Theory, Viertel and Osting (2018)
-
[2] Frame Fields for CAD models, Desobry et al. (2022)
-
[3] Trivial Connections on Discrete Surfaces, Crane et al. (2010)
Example
See https://github.com/GCoiffier/mouette/blob/main/examples/framefield2D.py