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("ProfAlign")]
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
|
public class ProfAlign
|
|
|
|
|
|
{
|
|
|
|
|
|
public ProfAlign()
|
|
|
|
|
|
{
|
|
|
|
|
|
PVIs = new List<TextPoint2D>();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
public TextPoint2D this[int index]
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (index < PVIs.Count)
|
|
|
|
|
|
{
|
|
|
|
|
|
return PVIs[index];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
throw new IndexOutOfRangeException();
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
if (index < PVIs.Count)
|
|
|
|
|
|
{
|
|
|
|
|
|
PVIs[index] = value;
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (index == PVIs.Count)
|
|
|
|
|
|
{
|
|
|
|
|
|
PVIs.Add(value);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
throw new IndexOutOfRangeException();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
public int Count => PVIs.Count;
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
public bool IsReadOnly => false;
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("type")]
|
|
|
|
|
|
public int Type { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlElement("CircCurve", Type = typeof(CircCurve))]
|
|
|
|
|
|
[XmlElement("UnsymParaCurve", Type = typeof(AsymCurve))]
|
|
|
|
|
|
[XmlElement("PVI", Type = typeof(TextPoint2D))]
|
|
|
|
|
|
[XmlElement("ParaCurve", Type = typeof(ParaCurve))]
|
|
|
|
|
|
public List<TextPoint2D> PVIs { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("name")]
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public void Add(TextPoint2D item)
|
|
|
|
|
|
{
|
|
|
|
|
|
PVIs.Add(item);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void Clear()
|
|
|
|
|
|
{
|
|
|
|
|
|
PVIs.Clear();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool Contains(TextPoint2D item)
|
|
|
|
|
|
{
|
|
|
|
|
|
return PVIs.Contains(item);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void CopyTo(TextPoint2D[] array, int arrayIndex)
|
|
|
|
|
|
{
|
|
|
|
|
|
PVIs.CopyTo(array, arrayIndex);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerator<TextPoint2D> GetEnumerator()
|
|
|
|
|
|
{
|
|
|
|
|
|
return PVIs.GetEnumerator();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int IndexOf(TextPoint2D item)
|
|
|
|
|
|
{
|
|
|
|
|
|
return PVIs.IndexOf(item);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void Insert(int index, TextPoint2D item)
|
|
|
|
|
|
{
|
|
|
|
|
|
PVIs.Insert(index, item);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool Remove(TextPoint2D item)
|
|
|
|
|
|
{
|
|
|
|
|
|
return PVIs.Remove(item);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void RemoveAt(int index)
|
|
|
|
|
|
{
|
|
|
|
|
|
PVIs.RemoveAt(index);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void Transform(GeometryTransformations transformations)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (TextPoint2D textPoint2D in PVIs)
|
|
|
|
|
|
{
|
|
|
|
|
|
textPoint2D.Transform(transformations, true);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|