newton.utils.MeshEdge#

class newton.utils.MeshEdge(v0, v1, o0, o1, f0, f1)[source]#

Bases: object

Represents an edge in a triangle mesh with adjacency information.

Stores the two vertices of the edge, the opposite vertices from each adjacent triangle, and the indices of those triangles. The winding order is consistent: the first triangle is reconstructed as {v0, v1, o0}, and the second triangle as {v1, v0, o1}.

For boundary edges (edges with only one adjacent triangle), o1 and f1 are set to -1.

__init__(v0, v1, o0, o1, f0, f1)#
f0: int#

Index of the first adjacent triangle.

f1: int#

Index of the second adjacent triangle, or -1 if boundary edge.

o0: int#

Index of the vertex opposite to the edge in the first adjacent triangle.

o1: int#

Index of the vertex opposite to the edge in the second adjacent triangle, or -1 if boundary.

v0: int#

Index of the first vertex of the edge.

v1: int#

Index of the second vertex of the edge.