MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.EdgeLengthMesh Class Reference

Public Member Functions

None __init__ (self)
 
None __init__ (self, EdgeLengthMesh arg0)
 
None __init__ (self, MeshTopology topology, UndirectedEdgeScalars edgeLengths)
 
float cotan (self, UndirectedEdgeId ue)
 
float edgeLengthAfterFlip (self, Id_EdgeTag e)
 
bool flipEdge (self, Id_EdgeTag e)
 
bool isDelone (self, UndirectedEdgeId ue, float threshold=0)
 
float leftCotan (self, Id_EdgeTag e)
 

Static Public Member Functions

EdgeLengthMesh fromMesh (Mesh mesh)
 

Detailed Description

Generated from:  MR::EdgeLengthMesh

Unlike the classic mesh that stores coordinates of its vertices, this class
stores the lengths of all edges. It can be used for construction of intrinsic Intrinsic Delaunay Triangulations.
\\ingroup MeshGroup

Constructor & Destructor Documentation

◆ __init__() [1/3]

None mrmeshpy.EdgeLengthMesh.__init__ ( self)
Implicit default constructor.

◆ __init__() [2/3]

None mrmeshpy.EdgeLengthMesh.__init__ ( self,
EdgeLengthMesh arg0 )
Implicit copy constructor.

◆ __init__() [3/3]

None mrmeshpy.EdgeLengthMesh.__init__ ( self,
MeshTopology topology,
UndirectedEdgeScalars edgeLengths )
Implicit aggregate constructor.

Member Function Documentation

◆ cotan()

float mrmeshpy.EdgeLengthMesh.cotan ( self,
UndirectedEdgeId ue )
computes sum of cotangents of the angle in the left and right triangles opposite to given edge,
consider cotangents zero for not existing triangles

◆ edgeLengthAfterFlip()

float mrmeshpy.EdgeLengthMesh.edgeLengthAfterFlip ( self,
Id_EdgeTag e )
given the edge with left and right triangular faces, which form together a quadrangle,
returns the length of geodesic line on original mesh between the vertices of the quadrangle opposite to given edge;
returns std::nullopt if the geodesic line does not go fully inside the quadrangle

◆ flipEdge()

bool mrmeshpy.EdgeLengthMesh.flipEdge ( self,
Id_EdgeTag e )
given the edge with left and right triangular faces, which form together a quadrangle,
rotates the edge counter-clockwise inside the quadrangle;
the length of e becomes equal to the length of geodesic line between its new ends on original mesh;
does not flip and returns false if the geodesic line does not go fully inside the quadrangle

◆ fromMesh()

EdgeLengthMesh mrmeshpy.EdgeLengthMesh.fromMesh ( Mesh mesh)
static
construct EdgeLengthMesh from an ordinary mesh

◆ isDelone()

bool mrmeshpy.EdgeLengthMesh.isDelone ( self,
UndirectedEdgeId ue,
float threshold = 0 )
returns true if given edge satisfies Delaunay conditions,
returns false if the edge needs to be flipped to satisfy Delaunay conditions,
passing negative threshold makes more edges satisfy Delaunay conditions

◆ leftCotan()

float mrmeshpy.EdgeLengthMesh.leftCotan ( self,
Id_EdgeTag e )
computes cotangent of the angle in the left( e ) triangle opposite to e,
and returns 0 if left face does not exist

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