using System; using System.Collections.Generic; #pragma warning disable IDE0130 namespace CaeMesh { [Serializable] public class GmshVolume : IComparable { public int Id; public HashSet SurfaceIds; public List TriSurfIds; public List QuadSurfIds; public bool Transfinite; // public int NumTriSurfaces => TriSurfIds.Count; public int NumQuadSurfaces => QuadSurfIds.Count; // 构造函数 public GmshVolume(int id, int surfaceId) { Id = id; SurfaceIds = new HashSet { surfaceId }; TriSurfIds = new List(); QuadSurfIds = new List(); Transfinite = false; } // IComparable接口 public int CompareTo(GmshVolume other) { if (Id < other.Id) return 1; else if (Id > other.Id) return -1; else return 0; } } }