Files
wg_cpso/CaeMesh/Meshing/Gmsh/Mesher/GmshEdge.cs

32 lines
769 B
C#
Raw Normal View History

2026-03-25 18:20:24 +08:00
using System;
using System.Collections.Generic;
#pragma warning disable IDE0130
namespace CaeMesh
{
[Serializable]
public class GmshEdge : IComparable<GmshEdge>
{
public int Id;
public int[] VertexIds;
public HashSet<int> SurfaceIds;
public double Length;
// 构造函数
public GmshEdge(int id, int[] vertexIds, int surfaceId, double length)
{
Id = id;
VertexIds = vertexIds;
SurfaceIds = new HashSet<int> { surfaceId };
Length = length;
}
//
public int CompareTo(GmshEdge other)
{
if (Id < other.Id) return 1;
else if (Id > other.Id) return -1;
else return 0;
}
}
}