2025-02-10 20:53:40 +08:00
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
|
2025-04-24 20:56:44 +08:00
|
|
|
|
namespace ShrlAlgoToolkit.RevitAddins.RvIndependent.MetroGauges.LandXMLData
|
2025-02-10 20:53:40 +08:00
|
|
|
|
{
|
|
|
|
|
|
[XmlType("Profile")]
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
|
public class Profile
|
|
|
|
|
|
{
|
|
|
|
|
|
public Profile()
|
|
|
|
|
|
{
|
|
|
|
|
|
ProfileCurve = new List<ProfAlign>();
|
|
|
|
|
|
ProfileSurfaces = new List<ProfileSurface>();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public ProfAlign this[int index]
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (index < ProfileCurve.Count)
|
|
|
|
|
|
{
|
|
|
|
|
|
return ProfileCurve[index];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
throw new IndexOutOfRangeException();
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
if (index < ProfileCurve.Count)
|
|
|
|
|
|
{
|
|
|
|
|
|
ProfileCurve[index] = value;
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (index == ProfileCurve.Count)
|
|
|
|
|
|
{
|
|
|
|
|
|
ProfileCurve.Add(value);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
throw new IndexOutOfRangeException();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
public int Count => ProfileCurve.Count;
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
public bool IsReadOnly => false;
|
|
|
|
|
|
|
|
|
|
|
|
[XmlElement("ProfSurf")]
|
|
|
|
|
|
public List<ProfileSurface> ProfileSurfaces { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlElement("ProfAlign")]
|
|
|
|
|
|
public List<ProfAlign> ProfileCurve { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("name")]
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public void Add(ProfAlign item)
|
|
|
|
|
|
{
|
|
|
|
|
|
ProfileCurve.Add(item);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void Clear()
|
|
|
|
|
|
{
|
|
|
|
|
|
ProfileCurve.Clear();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool Contains(ProfAlign item)
|
|
|
|
|
|
{
|
|
|
|
|
|
return ProfileCurve.Contains(item);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void CopyTo(ProfAlign[] array, int arrayIndex)
|
|
|
|
|
|
{
|
|
|
|
|
|
ProfileCurve.CopyTo(array, arrayIndex);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerator<ProfAlign> GetEnumerator()
|
|
|
|
|
|
{
|
|
|
|
|
|
return ProfileCurve.GetEnumerator();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int IndexOf(ProfAlign item)
|
|
|
|
|
|
{
|
|
|
|
|
|
return ProfileCurve.IndexOf(item);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void Insert(int index, ProfAlign item)
|
|
|
|
|
|
{
|
|
|
|
|
|
ProfileCurve.Insert(index, item);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool Remove(ProfAlign item)
|
|
|
|
|
|
{
|
|
|
|
|
|
return ProfileCurve.Remove(item);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void RemoveAt(int index)
|
|
|
|
|
|
{
|
|
|
|
|
|
ProfileCurve.RemoveAt(index);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|