commit 029830781e0551be0980e20bb3ad47f63448253a Author: GG Z <903524121@qq.com> Date: Mon May 6 22:07:15 2019 +0800 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.vs/CorridorModel/DesignTimeBuild/.dtbcache b/.vs/CorridorModel/DesignTimeBuild/.dtbcache new file mode 100644 index 0000000..194a218 Binary files /dev/null and b/.vs/CorridorModel/DesignTimeBuild/.dtbcache differ diff --git a/.vs/CorridorModel/v15/.suo b/.vs/CorridorModel/v15/.suo new file mode 100644 index 0000000..1e218f7 Binary files /dev/null and b/.vs/CorridorModel/v15/.suo differ diff --git a/.vs/CorridorModel/v15/Server/sqlite3/db.lock b/.vs/CorridorModel/v15/Server/sqlite3/db.lock new file mode 100644 index 0000000..e69de29 diff --git a/.vs/CorridorModel/v15/Server/sqlite3/storage.ide b/.vs/CorridorModel/v15/Server/sqlite3/storage.ide new file mode 100644 index 0000000..b1ea741 Binary files /dev/null and b/.vs/CorridorModel/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/CorridorModel/v15/Server/sqlite3/storage.ide-shm b/.vs/CorridorModel/v15/Server/sqlite3/storage.ide-shm new file mode 100644 index 0000000..dfc4392 Binary files /dev/null and b/.vs/CorridorModel/v15/Server/sqlite3/storage.ide-shm differ diff --git a/.vs/CorridorModel/v15/Server/sqlite3/storage.ide-wal b/.vs/CorridorModel/v15/Server/sqlite3/storage.ide-wal new file mode 100644 index 0000000..3c46aae Binary files /dev/null and b/.vs/CorridorModel/v15/Server/sqlite3/storage.ide-wal differ diff --git a/CorridorModel.sln b/CorridorModel.sln new file mode 100644 index 0000000..f0f183b --- /dev/null +++ b/CorridorModel.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27703.2042 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CorridorModel", "CorridorModel\CorridorModel.csproj", "{D8FFA8FE-D920-4A55-A7BB-5381642CE016}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LandXML", "LandXML\LandXML.csproj", "{C8D102CB-A711-44AF-BA30-8B3B4CAB4686}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D8FFA8FE-D920-4A55-A7BB-5381642CE016}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8FFA8FE-D920-4A55-A7BB-5381642CE016}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8FFA8FE-D920-4A55-A7BB-5381642CE016}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8FFA8FE-D920-4A55-A7BB-5381642CE016}.Release|Any CPU.Build.0 = Release|Any CPU + {C8D102CB-A711-44AF-BA30-8B3B4CAB4686}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C8D102CB-A711-44AF-BA30-8B3B4CAB4686}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C8D102CB-A711-44AF-BA30-8B3B4CAB4686}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C8D102CB-A711-44AF-BA30-8B3B4CAB4686}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E6C7CBD1-0D09-48C0-B805-70CB4DB1CF18} + EndGlobalSection +EndGlobal diff --git a/CorridorModel/AGenerationRange.cs b/CorridorModel/AGenerationRange.cs new file mode 100644 index 0000000..6199fe9 --- /dev/null +++ b/CorridorModel/AGenerationRange.cs @@ -0,0 +1,50 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200001B RID: 27 + [XmlType] + [Serializable] + public abstract class AGenerationRange : IGenerationRange + { + // Token: 0x1700007C RID: 124 + // (get) Token: 0x06000188 RID: 392 + // (set) Token: 0x06000189 RID: 393 + [XmlAttribute("startG")] + public abstract double GenerationStartStation { get; set; } + + // Token: 0x1700007D RID: 125 + // (get) Token: 0x0600018A RID: 394 + // (set) Token: 0x0600018B RID: 395 + [XmlAttribute("endG")] + public abstract double GenerationEndStation { get; set; } + + // Token: 0x1700007E RID: 126 + // (get) Token: 0x0600018C RID: 396 + // (set) Token: 0x0600018D RID: 397 + [XmlAttribute("start")] + public abstract double StartStation { get; set; } + + // Token: 0x1700007F RID: 127 + // (get) Token: 0x0600018E RID: 398 + // (set) Token: 0x0600018F RID: 399 + [XmlAttribute("end")] + public abstract double EndStation { get; set; } + + // Token: 0x06000190 RID: 400 RVA: 0x00008E00 File Offset: 0x00007000 + public void SetRange(double start, double end) + { + this.GenerationStartStation = start; + this.StartStation = start; + this.GenerationEndStation = end; + this.EndStation = end; + } + + // Token: 0x06000191 RID: 401 RVA: 0x00008E2D File Offset: 0x0000702D + public Tuple GetGenerationScopeIntersection(IGenerationRange parent) + { + return new Tuple(Math.Max(parent.GenerationStartStation, this.GenerationStartStation), Math.Min(parent.GenerationEndStation, this.GenerationEndStation)); + } + } +} diff --git a/CorridorModel/Alignment.cs b/CorridorModel/Alignment.cs new file mode 100644 index 0000000..8ed7d9b --- /dev/null +++ b/CorridorModel/Alignment.cs @@ -0,0 +1,702 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000004 RID: 4 + [XmlType("Alignment")] + [Serializable] + public class Alignment : ComparableStructure + { + // Token: 0x0600000A RID: 10 RVA: 0x0000209C File Offset: 0x0000029C + private void Init() + { + this.CrossSections = new List(); + this.FeatureLines = new List(); + this.Regions = new List(); + this.SuperElevations = new List(); + this.CoordGeom = new CoordGeom(); + this.Profile = new Profile(); + this._geometricCenter = null; + this.Import = true; + } + + // Token: 0x0600000B RID: 11 RVA: 0x000020F9 File Offset: 0x000002F9 + public Alignment() + { + this.Init(); + } + + // Token: 0x0600000C RID: 12 RVA: 0x00002108 File Offset: 0x00000308 + public Alignment(Alignment alignment) + { + if (alignment != null) + { + this.ID = alignment.ID; + this.Description = alignment.Description; + this.Name = alignment.Name; + this.StationStart = alignment.StationStart; + this.StationEnd = alignment.StationEnd; + this.Length = alignment.Length; + this.CoordGeom = alignment.CoordGeom; + this.Regions = alignment.Regions; + this.FeatureLines = alignment.FeatureLines; + this.CrossSections = alignment.CrossSections; + this.Profile = alignment.Profile; + this.SuperElevations = alignment.SuperElevations; + this.Structres = alignment.Structres; + this.Import = alignment.Import; + this._geometricCenter = alignment._geometricCenter; + return; + } + this.Init(); + } + + // Token: 0x17000001 RID: 1 + // (get) Token: 0x0600000D RID: 13 RVA: 0x000021DC File Offset: 0x000003DC + // (set) Token: 0x0600000E RID: 14 RVA: 0x000021E4 File Offset: 0x000003E4 + [XmlAttribute("AlignmentID")] + public string ID + { + get + { + return this._id; + } + set + { + this._id = value; + } + } + + // Token: 0x17000002 RID: 2 + // (get) Token: 0x0600000F RID: 15 RVA: 0x000021ED File Offset: 0x000003ED + // (set) Token: 0x06000010 RID: 16 RVA: 0x000021F5 File Offset: 0x000003F5 + [XmlAttribute("desc")] + public string Description + { + get + { + return this._description; + } + set + { + this._description = value; + } + } + + // Token: 0x17000003 RID: 3 + // (get) Token: 0x06000011 RID: 17 RVA: 0x000021FE File Offset: 0x000003FE + // (set) Token: 0x06000012 RID: 18 RVA: 0x00002206 File Offset: 0x00000406 + [XmlAttribute("name")] + public string Name + { + get + { + return this._name; + } + set + { + this._name = value; + } + } + + // Token: 0x17000004 RID: 4 + // (get) Token: 0x06000013 RID: 19 RVA: 0x0000220F File Offset: 0x0000040F + // (set) Token: 0x06000014 RID: 20 RVA: 0x00002217 File Offset: 0x00000417 + [XmlAttribute("staStart")] + public double StationStart { get; set; } + + // Token: 0x17000005 RID: 5 + // (get) Token: 0x06000015 RID: 21 RVA: 0x00002220 File Offset: 0x00000420 + // (set) Token: 0x06000016 RID: 22 RVA: 0x00002228 File Offset: 0x00000428 + [XmlAttribute("staEnd")] + public double StationEnd { get; set; } + + // Token: 0x17000006 RID: 6 + // (get) Token: 0x06000017 RID: 23 RVA: 0x00002231 File Offset: 0x00000431 + // (set) Token: 0x06000018 RID: 24 RVA: 0x00002239 File Offset: 0x00000439 + [XmlAttribute("length")] + public double Length { get; set; } + + // Token: 0x17000007 RID: 7 + // (get) Token: 0x06000019 RID: 25 RVA: 0x00002242 File Offset: 0x00000442 + // (set) Token: 0x0600001A RID: 26 RVA: 0x0000224A File Offset: 0x0000044A + [XmlElement("CoordGeom")] + public CoordGeom CoordGeom { get; set; } + + // Token: 0x17000008 RID: 8 + // (get) Token: 0x0600001B RID: 27 RVA: 0x00002253 File Offset: 0x00000453 + // (set) Token: 0x0600001C RID: 28 RVA: 0x0000225B File Offset: 0x0000045B + [XmlArray("Regions")] + public List Regions { get; set; } + + // Token: 0x17000009 RID: 9 + // (get) Token: 0x0600001D RID: 29 RVA: 0x00002264 File Offset: 0x00000464 + // (set) Token: 0x0600001E RID: 30 RVA: 0x0000226C File Offset: 0x0000046C + [XmlArray("FeatureLines")] + public List FeatureLines { get; set; } + + // Token: 0x1700000A RID: 10 + // (get) Token: 0x0600001F RID: 31 RVA: 0x00002275 File Offset: 0x00000475 + // (set) Token: 0x06000020 RID: 32 RVA: 0x0000227D File Offset: 0x0000047D + [XmlArray("CrossSects")] + public List CrossSections { get; set; } + + // Token: 0x1700000B RID: 11 + // (get) Token: 0x06000021 RID: 33 RVA: 0x00002286 File Offset: 0x00000486 + // (set) Token: 0x06000022 RID: 34 RVA: 0x0000228E File Offset: 0x0000048E + [XmlElement("Profile")] + public Profile Profile { get; set; } + + // Token: 0x1700000C RID: 12 + // (get) Token: 0x06000023 RID: 35 RVA: 0x00002297 File Offset: 0x00000497 + // (set) Token: 0x06000024 RID: 36 RVA: 0x0000229F File Offset: 0x0000049F + [XmlElement("Superelevation")] + public List SuperElevations { get; set; } + + // Token: 0x1700000D RID: 13 + // (get) Token: 0x06000025 RID: 37 RVA: 0x000022A8 File Offset: 0x000004A8 + // (set) Token: 0x06000026 RID: 38 RVA: 0x000022B0 File Offset: 0x000004B0 + [XmlArray("Structures")] + public List Structres { get; set; } + + // Token: 0x1700000E RID: 14 + // (get) Token: 0x06000027 RID: 39 RVA: 0x000022B9 File Offset: 0x000004B9 + // (set) Token: 0x06000028 RID: 40 RVA: 0x000022C1 File Offset: 0x000004C1 + [XmlAttribute("import")] + public bool Import { get; set; } + + // Token: 0x1700000F RID: 15 + // (get) Token: 0x06000029 RID: 41 RVA: 0x000022CA File Offset: 0x000004CA + // (set) Token: 0x0600002A RID: 42 RVA: 0x000022D2 File Offset: 0x000004D2 + [XmlIgnore] + public Roadway Roadway { get; set; } + + // Token: 0x17000010 RID: 16 + // (get) Token: 0x0600002B RID: 43 RVA: 0x000022E3 File Offset: 0x000004E3 + [XmlIgnore] + public IEnumerable SurfaceNames + { + get + { + return this.CrossSections.SelectMany((CrossSection item) => item.SurfaceNames); + } + } + + // Token: 0x17000011 RID: 17 + // (get) Token: 0x0600002C RID: 44 RVA: 0x00002315 File Offset: 0x00000515 + [XmlIgnore] + public IEnumerable PointCodes + { + get + { + return this.CrossSections.SelectMany((CrossSection item) => item.PointCodes); + } + } + + // Token: 0x17000012 RID: 18 + // (get) Token: 0x0600002D RID: 45 RVA: 0x0000233F File Offset: 0x0000053F + [XmlIgnore] + internal string AlignmentId + { + get + { + return ((this.Roadway != null) ? this.Roadway.CorridorID : string.Empty) + this.ID; + } + } + + // Token: 0x17000013 RID: 19 + // (get) Token: 0x0600002E RID: 46 RVA: 0x00002366 File Offset: 0x00000566 + // (set) Token: 0x0600002F RID: 47 RVA: 0x00002382 File Offset: 0x00000582 + [XmlIgnore] + public Point3D GeometricCenter + { + get + { + if (this._geometricCenter == null) + { + this.SetGeometricCenter(); + } + return this._geometricCenter; + } + set + { + this._geometricCenter = null; + } + } + + // Token: 0x17000014 RID: 20 + // (get) Token: 0x06000030 RID: 48 RVA: 0x0000238B File Offset: 0x0000058B + [Obsolete("Property \"GetGeometricCenter\" is deprecated, please use \"GeometricCenter\" instead.")] + [XmlIgnore] + public Point3D GetGeometricCenter + { + get + { + return this.GeometricCenter; + } + } + + // Token: 0x17000015 RID: 21 + // (get) Token: 0x06000031 RID: 49 RVA: 0x000023AC File Offset: 0x000005AC + [XmlIgnore] + public ProfAlign WayProfile + { + get + { + ProfAlign result; + if ((result = this.Profile.ProfileCurve.FirstOrDefault((ProfAlign item) => item.Type == 1)) == null) + { + result = (this.Profile.ProfileCurve.FirstOrDefault((ProfAlign item) => item.Type == 2) ?? this.Profile.ProfileCurve.FirstOrDefault()); + } + return result; + } + } + + // Token: 0x17000016 RID: 22 + // (get) Token: 0x06000032 RID: 50 RVA: 0x00002438 File Offset: 0x00000638 + [XmlIgnore] + public ProfAlign GroundProfile + { + get + { + return this.Profile.ProfileCurve.FirstOrDefault((ProfAlign item) => item.Type == 0) ?? this.Profile.ProfileCurve.FirstOrDefault(); + } + } + + // Token: 0x06000033 RID: 51 RVA: 0x000024D4 File Offset: 0x000006D4 + public IEnumerable GetPointCodes(Side side, int region = -1) + { + if (region >= 0) + { + if (side != Side.Both) + { + return (from item in this.CrossSections + where item.Region == region + select item).SelectMany((CrossSection item) => item.GetPointCodes(side)).Distinct(); + } + return (from item in this.CrossSections + where item.Region == region + select item).SelectMany((CrossSection item) => item.PointCodes).Distinct(); + } + else + { + if (side != Side.Both) + { + return this.CrossSections.SelectMany((CrossSection item) => item.GetPointCodes(side)).Distinct(); + } + return this.PointCodes.Distinct(); + } + } + + // Token: 0x06000034 RID: 52 RVA: 0x000025CC File Offset: 0x000007CC + public void Initialize(string n, double s, double e, double l, string id, string d) + { + this.Name = n; + this.StationStart = s; + this.StationEnd = e; + this.Length = l; + this.ID = id; + this.Description = d; + } + + // Token: 0x06000035 RID: 53 RVA: 0x00002694 File Offset: 0x00000894 + public void ConnectSectionsShape(DesignShape linkShape, DesignShape refShape, CrossSection section, CrossSection refSection = null) + { + int num = 0; + linkShape.CrossSectionPoints.Clear(); + CrossSectionPoint[] array = (from ds in section.DesignShapes + where ds.Name == refShape.Name && ds.Side == refShape.Side + select ds).SelectMany((DesignShape ds) => ds.CrossSectionPoints).ToArray(); + List list; + if (!(refSection != null)) + { + list = new List(); + } + else + { + list = (from ds in refSection.DesignShapes + where ds.Name == refShape.Name && ds.Side == refShape.Side + select ds).SelectMany((DesignShape ds) => ds.CrossSectionPoints).ToList(); + } + List list2 = list; + using (List.Enumerator enumerator = refShape.CrossSectionPoints.GetEnumerator()) + { + while (enumerator.MoveNext()) + { + CrossSectionPoint point = enumerator.Current; + CrossSectionPoint crossSectionPoint = array.FirstOrDefault((CrossSectionPoint p) => p.Code == point.Code); + if (crossSectionPoint != null) + { + linkShape.CrossSectionPoints.Add(new CrossSectionPoint(crossSectionPoint)); + } + else + { + int num2 = list2.IndexOf(point); + if (num2 >= 0) + { + num = num2; + } + CrossSectionPoint crossSectionPoint2 = new CrossSectionPoint((num < array.Length) ? array[num] : array.Last()); + crossSectionPoint2.Code = point.Code; + linkShape.CrossSectionPoints.Add(crossSectionPoint2); + } + num++; + } + } + linkShape.UpdatePointDependentData(); + section.DesignShapes.Add(linkShape); + } + + // Token: 0x06000036 RID: 54 RVA: 0x00002854 File Offset: 0x00000A54 + protected void AddRange(Part part, double start, double end, int i) + { + Range range = new Range + { + Part = i + }; + range.SetRange(start, end); + part.AddRange(range); + } + + // Token: 0x06000037 RID: 55 RVA: 0x000028B8 File Offset: 0x00000AB8 + internal void AddRange(CrossSection section, DesignShape shape, int i) + { + Region region = this.Regions.FirstOrDefault((Region item) => item.Id == section.Region); + if (region != null) + { + Part part = region.Parts.FirstOrDefault((Part item) => item.NameSideSegment == shape.NameSideSegment); + double endStation = part.Ranges.Last().EndStation; + if (section.Station > endStation) + { + this.AddRange(part, endStation, section.Station, i); + return; + } + if (section.Station != endStation) + { + double startStation = part.Ranges.First().StartStation; + if (section.Station < startStation) + { + this.AddRange(part, section.Station, startStation, i); + return; + } + if (section.Station != startStation) + { + part.Ranges.Last().EndStation = section.Station; + this.AddRange(part, section.Station, endStation, i); + } + } + } + } + + // Token: 0x06000038 RID: 56 RVA: 0x00002A14 File Offset: 0x00000C14 + public void SplitDifferentParts() + { + try + { + CrossSection crossSection = (this.CrossSections.Count > 0) ? this.CrossSections[0] : null; + for (int i = 1; i < this.CrossSections.Count; i++) + { + CrossSection crossSection2 = this.CrossSections[i]; + if (crossSection2.Import) + { + bool flag = !crossSection.Import; + bool flag2 = crossSection2.Region != crossSection.Region; + bool flag3 = crossSection2.Station != crossSection.Station; + int count = crossSection2.DesignShapes.Count; + for (int j = 0; j < count; j++) + { + DesignShape shape = crossSection2.DesignShapes[j]; + string pointCodesFlat = shape.PointCodesFlat; + DesignShape designShape = crossSection.DesignShapes.FirstOrDefault((DesignShape ds) => ds.NameSideSegment == shape.NameSideSegment); + bool flag4 = flag; + bool flag5 = designShape != null && designShape.PointCodesFlat != pointCodesFlat && flag3; + if (designShape == null || !designShape.Import || flag5 || flag2) + { + flag4 = shape.Import; + if (flag5) + { + if (shape.Import && crossSection.DesignShapes.Count < crossSection2.DesignShapes.Count) + { + this.ConnectSectionsShape(new DesignShape(designShape) + { + Import = false + }, designShape, crossSection2, crossSection); + } + else if (designShape.Import) + { + DesignShape designShape2 = new DesignShape(shape); + designShape2.Import = true; + this.ConnectSectionsShape(designShape2, shape, crossSection, crossSection2); + this.AddRange(crossSection2, shape, i); + designShape2.Part = i; + } + } + } + if (flag4) + { + this.AddRange(crossSection2, shape, i); + for (int k = i + 1; k < this.CrossSections.Count; k++) + { + DesignShape designShape3 = this.CrossSections[k].DesignShapes.FirstOrDefault((DesignShape ds) => ds.NameSideSegment == shape.NameSideSegment); + if (designShape3 != null) + { + designShape3.Part = i; + } + } + shape.Part = i; + } + } + } + crossSection = crossSection2; + } + } + catch + { + } + } + + // Token: 0x06000039 RID: 57 RVA: 0x00002C80 File Offset: 0x00000E80 + public void RefreshShapes() + { + } + + // Token: 0x0600003A RID: 58 RVA: 0x00002C84 File Offset: 0x00000E84 + protected Point3D CalcGeometricCenter(IEnumerable sections, int count) + { + Point3D point3D = new Point3D(); + if (count != 0) + { + foreach (CrossSection p in sections) + { + point3D += p / (double)count; + } + } + return point3D; + } + + // Token: 0x0600003B RID: 59 RVA: 0x00002CE0 File Offset: 0x00000EE0 + protected void SetGeometricCenter() + { + if (this.CrossSections != null) + { + this._geometricCenter = this.CalcGeometricCenter(this.CrossSections, this.CrossSections.Count); + return; + } + this._geometricCenter = new Point3D(); + } + + // Token: 0x0600003C RID: 60 RVA: 0x00002D40 File Offset: 0x00000F40 + public Point3D GeometricCenterInRange(double startStation, double endStation) + { + CrossSection[] array = (from item in this.CrossSections + where item.Station >= startStation && item.Station <= endStation + select item).ToArray(); + return this.CalcGeometricCenter(array, array.Length); + } + + // Token: 0x0600003D RID: 61 RVA: 0x00002D94 File Offset: 0x00000F94 + public double GetHeightAtStation(double station) + { + double result = 0.0; + ProfAlign profAlign = this.Profile.ProfileCurve.FirstOrDefault((ProfAlign item) => item.Type == 2); + if (profAlign != null) + { + int num = profAlign.PVIs.Count - 1; + int i = 0; + while (i < num) + { + if (profAlign.PVIs[i].First >= station) + { + if (!(profAlign.PVIs[i] is ParaCurve) && !(profAlign.PVIs[i + 1] is ParaCurve)) + { + result = profAlign.PVIs[i].Second + (station - profAlign.PVIs[i].First) * (profAlign.PVIs[i + 1].Second - profAlign.PVIs[i].Second) / (profAlign.PVIs[i + 1].First - profAlign.PVIs[i].First); + break; + } + break; + } + else + { + i++; + } + } + } + return result; + } + + // Token: 0x0600003E RID: 62 RVA: 0x00002EB8 File Offset: 0x000010B8 + public double GetAzimuthAtStation(double station) + { + double num = 0.0; + double num2 = 0.0; + foreach (Interval interval in this.CoordGeom.HorizonCurve) + { + if (num + interval.Length >= station) + { + num2 += interval.GetDirectionAtPoint(station - num); + break; + } + num2 += interval.GetDirectionAtPoint(interval.Length); + num += interval.Length; + } + return num2; + } + + // Token: 0x0600003F RID: 63 RVA: 0x00002F80 File Offset: 0x00001180 + public void ResetImportsAndParts() + { + try + { + this.Import = true; + foreach (CrossSection crossSection in this.CrossSections) + { + crossSection.Import = true; + foreach (DesignShape designShape in crossSection.DesignShapes) + { + designShape.Import = true; + designShape.Part = 0; + } + for (int i = crossSection.DesignShapes.Count - 1; i >= 0; i--) + { + DesignShape shape = crossSection.DesignShapes[i]; + if (crossSection.DesignShapes.Count((DesignShape ds) => ds.NameSide == shape.NameSide) > 1) + { + if (shape.CrossSectionPoints.Count < crossSection.DesignShapes.Max((DesignShape ds) => ds.CrossSectionPoints.Count)) + { + crossSection.DesignShapes.RemoveAt(i); + } + } + } + } + } + catch + { + } + } + + // Token: 0x06000040 RID: 64 RVA: 0x000030F0 File Offset: 0x000012F0 + public void Transform(GeometryTransformations transformations) + { + foreach (Interval interval in this.CoordGeom.HorizonCurve) + { + interval.Transform(transformations); + } + this.StationStart *= transformations.ScaleFactor; + this.StationEnd *= transformations.ScaleFactor; + foreach (Region region in this.Regions) + { + region.StartStation *= transformations.ScaleFactor; + region.EndStation *= transformations.ScaleFactor; + } + foreach (CrossSection crossSection in this.CrossSections) + { + crossSection.Transform(transformations); + } + foreach (ProfAlign profAlign in this.Profile.ProfileCurve) + { + profAlign.Transform(transformations); + } + this.GeometricCenter = null; + } + + // Token: 0x06000041 RID: 65 RVA: 0x00003264 File Offset: 0x00001464 + public void TransformByScale(double scale) + { + Point3D point3D = this.GeometricCenter; + bool flag = point3D.LengthSquared3D != 0.0; + GeometryTransformations geometryTransformations = new GeometryTransformations(); + if (flag) + { + geometryTransformations.Translation(-point3D.X, -point3D.Y, -point3D.Z); + } + geometryTransformations.Scale(scale); + point3D *= scale; + if (flag) + { + geometryTransformations.Translation(point3D.X, point3D.Y, point3D.Z); + } + this.Transform(geometryTransformations); + } + + // Token: 0x06000042 RID: 66 RVA: 0x000032E4 File Offset: 0x000014E4 + public void RemoveSameSections() + { + for (int i = this.CrossSections.Count - 1; i > 0; i--) + { + if (this.CrossSections[i - 1].Station == this.CrossSections[i].Station) + { + this.CrossSections.RemoveAt(i); + } + } + this.GeometricCenter = null; + } + + // Token: 0x06000043 RID: 67 RVA: 0x00003342 File Offset: 0x00001542 + public void AddRegion(Region region) + { + this.Regions.Add(region); + region.Alignment = this; + } + + // Token: 0x06000044 RID: 68 RVA: 0x00003378 File Offset: 0x00001578 + public Region FindRegion(Region reference) + { + return this.Regions.FirstOrDefault((Region item) => item.Name == reference.Name); + } + + // Token: 0x06000045 RID: 69 RVA: 0x000033A9 File Offset: 0x000015A9 + public void RemoveRegion(Region region) + { + if (this.Regions.Remove(region)) + { + region.Alignment = null; + } + } + + // Token: 0x06000046 RID: 70 RVA: 0x000033C0 File Offset: 0x000015C0 + public void ConnectRegions() + { + foreach (Region region in this.Regions) + { + region.Alignment = this; + } + } + + // Token: 0x06000047 RID: 71 RVA: 0x00003414 File Offset: 0x00001614 + public override bool DifferentItem(Alignment alignment) + { + return this.StationStart != alignment.StationStart || this.StationEnd != alignment.StationEnd || this.GeometricCenter != alignment.GeometricCenter; + } + + // Token: 0x06000048 RID: 72 RVA: 0x00003448 File Offset: 0x00001648 + public override bool DifferentDescendants(Alignment alignment) + { + if (this.Regions.Count == alignment.Regions.Count) + { + for (int i = 0; i < this.Regions.Count; i++) + { + if (!this.Regions[i].Equals(alignment.Regions[i])) + { + return true; + } + } + return false; + } + return true; + } + + // Token: 0x04000001 RID: 1 + private Point3D _geometricCenter; + + // Token: 0x04000002 RID: 2 + private string _name; + + // Token: 0x04000003 RID: 3 + private string _description; + + // Token: 0x04000004 RID: 4 + private string _id; + } +} diff --git a/CorridorModel/Alignments.cs b/CorridorModel/Alignments.cs new file mode 100644 index 0000000..7763efe --- /dev/null +++ b/CorridorModel/Alignments.cs @@ -0,0 +1,156 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000005 RID: 5 + [XmlType("Alignments")] + [Serializable] + public class Alignments : ComparableStructure + { + // Token: 0x06000053 RID: 83 RVA: 0x000034A7 File Offset: 0x000016A7 + public Alignments() + { + this.AlignmentList = new List(); + } + + // Token: 0x17000017 RID: 23 + // (get) Token: 0x06000054 RID: 84 RVA: 0x000034BA File Offset: 0x000016BA + // (set) Token: 0x06000055 RID: 85 RVA: 0x000034C2 File Offset: 0x000016C2 + [XmlElement("Alignment")] + public List AlignmentList { get; set; } + + // Token: 0x17000018 RID: 24 + // (get) Token: 0x06000056 RID: 86 RVA: 0x000034CB File Offset: 0x000016CB + // (set) Token: 0x06000057 RID: 87 RVA: 0x000034D3 File Offset: 0x000016D3 + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x06000058 RID: 88 RVA: 0x000034DC File Offset: 0x000016DC + public int IndexOf(Alignment item) + { + return this.AlignmentList.IndexOf(item); + } + + // Token: 0x06000059 RID: 89 RVA: 0x000034EA File Offset: 0x000016EA + public void Insert(int index, Alignment item) + { + this.AlignmentList.Insert(index, item); + } + + // Token: 0x0600005A RID: 90 RVA: 0x000034F9 File Offset: 0x000016F9 + public void RemoveAt(int index) + { + this.AlignmentList.RemoveAt(index); + } + + // Token: 0x17000019 RID: 25 + [XmlIgnore] + public Alignment this[int index] + { + get + { + if (index < this.AlignmentList.Count) + { + return this.AlignmentList[index]; + } + throw new IndexOutOfRangeException(); + } + set + { + if (index < this.AlignmentList.Count) + { + this.AlignmentList[index] = value; + return; + } + if (index == this.AlignmentList.Count) + { + this.AlignmentList.Add(value); + return; + } + throw new IndexOutOfRangeException(); + } + } + + // Token: 0x0600005D RID: 93 RVA: 0x00003567 File Offset: 0x00001767 + public void Add(Alignment item) + { + this.AlignmentList.Add(item); + } + + // Token: 0x0600005E RID: 94 RVA: 0x00003575 File Offset: 0x00001775 + public void Clear() + { + this.AlignmentList.Clear(); + } + + // Token: 0x0600005F RID: 95 RVA: 0x00003582 File Offset: 0x00001782 + public bool Contains(Alignment item) + { + return this.AlignmentList.Contains(item); + } + + // Token: 0x06000060 RID: 96 RVA: 0x00003590 File Offset: 0x00001790 + public void CopyTo(Alignment[] array, int arrayIndex) + { + this.AlignmentList.CopyTo(array, arrayIndex); + } + + // Token: 0x1700001A RID: 26 + // (get) Token: 0x06000061 RID: 97 RVA: 0x0000359F File Offset: 0x0000179F + [XmlIgnore] + public int Count + { + get + { + return this.AlignmentList.Count; + } + } + + // Token: 0x1700001B RID: 27 + // (get) Token: 0x06000062 RID: 98 RVA: 0x000035AC File Offset: 0x000017AC + [XmlIgnore] + public bool IsReadOnly + { + get + { + return false; + } + } + + // Token: 0x06000063 RID: 99 RVA: 0x000035AF File Offset: 0x000017AF + public bool Remove(Alignment item) + { + return this.AlignmentList.Remove(item); + } + + // Token: 0x06000064 RID: 100 RVA: 0x000035BD File Offset: 0x000017BD + public IEnumerator GetEnumerator() + { + return this.AlignmentList.GetEnumerator(); + } + + // Token: 0x06000065 RID: 101 RVA: 0x000035CF File Offset: 0x000017CF + public override bool DifferentItem(Alignments alignments) + { + return false; + } + + // Token: 0x06000066 RID: 102 RVA: 0x000035D4 File Offset: 0x000017D4 + public override bool DifferentDescendants(Alignments alignments) + { + if (this.AlignmentList.Count == alignments.AlignmentList.Count) + { + for (int i = 0; i < this.AlignmentList.Count; i++) + { + if (!this.AlignmentList[i].Equals(alignments.AlignmentList[i])) + { + return true; + } + } + } + return false; + } + } +} diff --git a/CorridorModel/Application.cs b/CorridorModel/Application.cs new file mode 100644 index 0000000..7c6c4e1 --- /dev/null +++ b/CorridorModel/Application.cs @@ -0,0 +1,47 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200002E RID: 46 + [XmlType("Application")] + [Serializable] + public class Application + { + // Token: 0x170000D4 RID: 212 + // (get) Token: 0x06000298 RID: 664 RVA: 0x0000B0C9 File Offset: 0x000092C9 + // (set) Token: 0x06000299 RID: 665 RVA: 0x0000B0D1 File Offset: 0x000092D1 + [XmlAttribute("version")] + public string Version { get; set; } + + // Token: 0x170000D5 RID: 213 + // (get) Token: 0x0600029A RID: 666 RVA: 0x0000B0DA File Offset: 0x000092DA + // (set) Token: 0x0600029B RID: 667 RVA: 0x0000B0E2 File Offset: 0x000092E2 + [XmlAttribute("desc")] + public string Description { get; set; } + + // Token: 0x170000D6 RID: 214 + // (get) Token: 0x0600029C RID: 668 RVA: 0x0000B0EB File Offset: 0x000092EB + // (set) Token: 0x0600029D RID: 669 RVA: 0x0000B0F3 File Offset: 0x000092F3 + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x170000D7 RID: 215 + // (get) Token: 0x0600029E RID: 670 RVA: 0x0000B0FC File Offset: 0x000092FC + // (set) Token: 0x0600029F RID: 671 RVA: 0x0000B104 File Offset: 0x00009304 + [XmlAttribute("timeStamp")] + public DateTime TimeStamp { get; set; } + + // Token: 0x170000D8 RID: 216 + // (get) Token: 0x060002A0 RID: 672 RVA: 0x0000B10D File Offset: 0x0000930D + // (set) Token: 0x060002A1 RID: 673 RVA: 0x0000B115 File Offset: 0x00009315 + [XmlAttribute("manufacturerURL")] + public string ManufacturerURL { get; set; } + + // Token: 0x170000D9 RID: 217 + // (get) Token: 0x060002A2 RID: 674 RVA: 0x0000B11E File Offset: 0x0000931E + // (set) Token: 0x060002A3 RID: 675 RVA: 0x0000B126 File Offset: 0x00009326 + [XmlAttribute("manufacturer")] + public string Manufacturer { get; set; } + } +} diff --git a/CorridorModel/AreaUnit.cs b/CorridorModel/AreaUnit.cs new file mode 100644 index 0000000..a72959d --- /dev/null +++ b/CorridorModel/AreaUnit.cs @@ -0,0 +1,23 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x02000045 RID: 69 + public enum AreaUnit + { + // Token: 0x0400010F RID: 271 + squareMeter, + // Token: 0x04000110 RID: 272 + squareFoot, + // Token: 0x04000111 RID: 273 + squareYard, + // Token: 0x04000112 RID: 274 + acre, + // Token: 0x04000113 RID: 275 + hectare, + // Token: 0x04000114 RID: 276 + squareKilometer, + // Token: 0x04000115 RID: 277 + squareMile + } +} diff --git a/CorridorModel/AsymCurve.cs b/CorridorModel/AsymCurve.cs new file mode 100644 index 0000000..0da5771 --- /dev/null +++ b/CorridorModel/AsymCurve.cs @@ -0,0 +1,10 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x02000014 RID: 20 + [Serializable] + public class AsymCurve : ParaCurve + { + } +} diff --git a/CorridorModel/BaseModel.cs b/CorridorModel/BaseModel.cs new file mode 100644 index 0000000..a36eb24 --- /dev/null +++ b/CorridorModel/BaseModel.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200004E RID: 78 + [XmlType("BaseModel")] + [Serializable] + public class BaseModel + { + // Token: 0x060003BA RID: 954 RVA: 0x0000DB49 File Offset: 0x0000BD49 + public BaseModel() + { + this.Vertices = new List(); + } + + // Token: 0x0400014E RID: 334 + [XmlElement("Vertex")] + public List Vertices; + } +} diff --git a/CorridorModel/BorderLine.cs b/CorridorModel/BorderLine.cs new file mode 100644 index 0000000..52d7d2e --- /dev/null +++ b/CorridorModel/BorderLine.cs @@ -0,0 +1,222 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000006 RID: 6 + [XmlType("BorderLine")] + [Serializable] + public class BorderLine + { + // Token: 0x1700001C RID: 28 + // (get) Token: 0x06000067 RID: 103 RVA: 0x00003631 File Offset: 0x00001831 + // (set) Token: 0x06000068 RID: 104 RVA: 0x00003639 File Offset: 0x00001839 + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x1700001D RID: 29 + // (get) Token: 0x06000069 RID: 105 RVA: 0x00003642 File Offset: 0x00001842 + // (set) Token: 0x0600006A RID: 106 RVA: 0x0000364A File Offset: 0x0000184A + [XmlAttribute("i")] + public int Index { get; set; } + + // Token: 0x1700001E RID: 30 + // (get) Token: 0x0600006B RID: 107 RVA: 0x00003654 File Offset: 0x00001854 + [XmlIgnore] + public string NameIndex + { + get + { + return this.Name + " " + this.Index.ToString(); + } + } + + // Token: 0x1700001F RID: 31 + // (get) Token: 0x0600006C RID: 108 RVA: 0x0000367F File Offset: 0x0000187F + // (set) Token: 0x0600006D RID: 109 RVA: 0x00003687 File Offset: 0x00001887 + [XmlElement("BorderPoint")] + public List Points { get; set; } + + // Token: 0x0600006E RID: 110 RVA: 0x00003690 File Offset: 0x00001890 + public BorderLine() + { + this.Points = new List(); + } + + // Token: 0x0600006F RID: 111 RVA: 0x000036A4 File Offset: 0x000018A4 + public void Transform(GeometryTransformations transformations) + { + foreach (Point3D point in this.Points) + { + transformations.Transform(point); + } + } + + // Token: 0x06000070 RID: 112 RVA: 0x000036F8 File Offset: 0x000018F8 + public static bool operator ==(BorderLine b1, BorderLine b2) + { + if (object.ReferenceEquals(b1, b2)) + { + return true; + } + if (b1 == null || b2 == null) + { + return false; + } + if (b1.Index == b2.Index && b1.Name == b2.Name && b1.Count == b2.Count) + { + for (int i = 0; i < b1.Count; i++) + { + if (b1[i] != b2[i]) + { + return false; + } + } + return true; + } + return false; + } + + // Token: 0x06000071 RID: 113 RVA: 0x00003774 File Offset: 0x00001974 + public static bool operator !=(BorderLine b1, BorderLine b2) + { + if (object.ReferenceEquals(b1, b2)) + { + return false; + } + if (b1 == null || b2 == null) + { + return true; + } + if (b1.Index == b2.Index && b1.Name == b2.Name && b1.Count == b2.Count) + { + for (int i = 0; i < b1.Count; i++) + { + if (b1[i] != b2[i]) + { + return true; + } + } + return false; + } + return true; + } + + // Token: 0x06000072 RID: 114 RVA: 0x000037EE File Offset: 0x000019EE + public override bool Equals(object obj) + { + return this == (BorderLine)obj; + } + + // Token: 0x06000073 RID: 115 RVA: 0x000037FC File Offset: 0x000019FC + public override int GetHashCode() + { + return base.GetHashCode(); + } + + // Token: 0x06000074 RID: 116 RVA: 0x00003804 File Offset: 0x00001A04 + public int IndexOf(Point3D item) + { + return this.Points.IndexOf(item); + } + + // Token: 0x06000075 RID: 117 RVA: 0x00003812 File Offset: 0x00001A12 + public void Insert(int index, Point3D item) + { + this.Points.Insert(index, item); + } + + // Token: 0x06000076 RID: 118 RVA: 0x00003821 File Offset: 0x00001A21 + public void RemoveAt(int index) + { + this.Points.RemoveAt(index); + } + + // Token: 0x17000020 RID: 32 + [XmlIgnore] + public Point3D this[int index] + { + get + { + if (index < this.Points.Count) + { + return this.Points[index]; + } + throw new IndexOutOfRangeException(); + } + set + { + if (index < this.Points.Count) + { + this.Points[index] = value; + return; + } + if (index == this.Points.Count) + { + this.Points.Add(value); + return; + } + throw new IndexOutOfRangeException(); + } + } + + // Token: 0x06000079 RID: 121 RVA: 0x0000388F File Offset: 0x00001A8F + public void Add(Point3D item) + { + this.Points.Add(item); + } + + // Token: 0x0600007A RID: 122 RVA: 0x0000389D File Offset: 0x00001A9D + public void Clear() + { + this.Points.Clear(); + } + + // Token: 0x0600007B RID: 123 RVA: 0x000038AA File Offset: 0x00001AAA + public bool Contains(Point3D item) + { + return this.Points.Contains(item); + } + + // Token: 0x0600007C RID: 124 RVA: 0x000038B8 File Offset: 0x00001AB8 + public void CopyTo(Point3D[] array, int arrayIndex) + { + this.Points.CopyTo(array, arrayIndex); + } + + // Token: 0x17000021 RID: 33 + // (get) Token: 0x0600007D RID: 125 RVA: 0x000038C7 File Offset: 0x00001AC7 + [XmlIgnore] + public int Count + { + get + { + return this.Points.Count; + } + } + + // Token: 0x17000022 RID: 34 + // (get) Token: 0x0600007E RID: 126 RVA: 0x000038D4 File Offset: 0x00001AD4 + [XmlIgnore] + public bool IsReadOnly + { + get + { + return false; + } + } + + // Token: 0x0600007F RID: 127 RVA: 0x000038D7 File Offset: 0x00001AD7 + public bool Remove(Point3D item) + { + return this.Points.Remove(item); + } + + // Token: 0x06000080 RID: 128 RVA: 0x000038E5 File Offset: 0x00001AE5 + public IEnumerator GetEnumerator() + { + return this.Points.GetEnumerator(); + } + } +} diff --git a/CorridorModel/Borders.cs b/CorridorModel/Borders.cs new file mode 100644 index 0000000..5437704 --- /dev/null +++ b/CorridorModel/Borders.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000007 RID: 7 + [XmlType("Borders")] + [Serializable] + public class Borders + { + // Token: 0x17000023 RID: 35 + // (get) Token: 0x06000081 RID: 129 RVA: 0x000038F7 File Offset: 0x00001AF7 + // (set) Token: 0x06000082 RID: 130 RVA: 0x000038FF File Offset: 0x00001AFF + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x17000024 RID: 36 + // (get) Token: 0x06000083 RID: 131 RVA: 0x00003908 File Offset: 0x00001B08 + // (set) Token: 0x06000084 RID: 132 RVA: 0x00003910 File Offset: 0x00001B10 + [XmlElement("BorderLine")] + public List Lines { get; set; } + + // Token: 0x06000085 RID: 133 RVA: 0x00003919 File Offset: 0x00001B19 + public Borders() + { + this.Lines = new List(); + } + + // Token: 0x06000086 RID: 134 RVA: 0x0000392C File Offset: 0x00001B2C + public void Transform(GeometryTransformations transformations) + { + foreach (BorderLine borderLine in this.Lines) + { + borderLine.Transform(transformations); + } + } + + // Token: 0x06000087 RID: 135 RVA: 0x00003980 File Offset: 0x00001B80 + public int IndexOf(BorderLine item) + { + return this.Lines.IndexOf(item); + } + + // Token: 0x06000088 RID: 136 RVA: 0x0000398E File Offset: 0x00001B8E + public void Insert(int index, BorderLine item) + { + this.Lines.Insert(index, item); + } + + // Token: 0x06000089 RID: 137 RVA: 0x0000399D File Offset: 0x00001B9D + public void RemoveAt(int index) + { + this.Lines.RemoveAt(index); + } + + // Token: 0x17000025 RID: 37 + public BorderLine this[int index] + { + get + { + if (index < this.Lines.Count) + { + return this.Lines[index]; + } + throw new IndexOutOfRangeException(); + } + set + { + if (index < this.Lines.Count) + { + this.Lines[index] = value; + return; + } + if (index == this.Lines.Count) + { + this.Lines.Add(value); + return; + } + throw new IndexOutOfRangeException(); + } + } + + // Token: 0x0600008C RID: 140 RVA: 0x00003A0B File Offset: 0x00001C0B + public void Add(BorderLine item) + { + this.Lines.Add(item); + } + + // Token: 0x0600008D RID: 141 RVA: 0x00003A19 File Offset: 0x00001C19 + public void Clear() + { + this.Lines.Clear(); + } + + // Token: 0x0600008E RID: 142 RVA: 0x00003A26 File Offset: 0x00001C26 + public bool Contains(BorderLine item) + { + return this.Lines.Contains(item); + } + + // Token: 0x0600008F RID: 143 RVA: 0x00003A34 File Offset: 0x00001C34 + public void CopyTo(BorderLine[] array, int arrayIndex) + { + this.Lines.CopyTo(array, arrayIndex); + } + + // Token: 0x17000026 RID: 38 + // (get) Token: 0x06000090 RID: 144 RVA: 0x00003A43 File Offset: 0x00001C43 + public int Count + { + get + { + return this.Lines.Count; + } + } + + // Token: 0x17000027 RID: 39 + // (get) Token: 0x06000091 RID: 145 RVA: 0x00003A50 File Offset: 0x00001C50 + public bool IsReadOnly + { + get + { + return false; + } + } + + // Token: 0x06000092 RID: 146 RVA: 0x00003A53 File Offset: 0x00001C53 + public bool Remove(BorderLine item) + { + return this.Lines.Remove(item); + } + + // Token: 0x06000093 RID: 147 RVA: 0x00003A61 File Offset: 0x00001C61 + public IEnumerator GetEnumerator() + { + return this.Lines.GetEnumerator(); + } + } +} diff --git a/CorridorModel/CategoryType.cs b/CorridorModel/CategoryType.cs new file mode 100644 index 0000000..cc739a3 --- /dev/null +++ b/CorridorModel/CategoryType.cs @@ -0,0 +1,19 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x0200004B RID: 75 + public enum CategoryType + { + // Token: 0x04000145 RID: 325 + Abutment, + // Token: 0x04000146 RID: 326 + Pier, + // Token: 0x04000147 RID: 327 + Beam, + // Token: 0x04000148 RID: 328 + Haunch, + // Token: 0x04000149 RID: 329 + Deck + } +} diff --git a/CorridorModel/CgPoint.cs b/CorridorModel/CgPoint.cs new file mode 100644 index 0000000..9d9407d --- /dev/null +++ b/CorridorModel/CgPoint.cs @@ -0,0 +1,52 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000030 RID: 48 + [XmlType("CgPoint")] + public class CgPoint : TextPoint3D + { + // Token: 0x170000DE RID: 222 + // (get) Token: 0x060002AF RID: 687 RVA: 0x0000B3EE File Offset: 0x000095EE + // (set) Token: 0x060002B0 RID: 688 RVA: 0x0000B3F6 File Offset: 0x000095F6 + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x170000DF RID: 223 + // (get) Token: 0x060002B1 RID: 689 RVA: 0x0000B3FF File Offset: 0x000095FF + // (set) Token: 0x060002B2 RID: 690 RVA: 0x0000B407 File Offset: 0x00009607 + [XmlAttribute("code")] + public string Code { get; set; } + + // Token: 0x170000E0 RID: 224 + // (get) Token: 0x060002B3 RID: 691 RVA: 0x0000B410 File Offset: 0x00009610 + // (set) Token: 0x060002B4 RID: 692 RVA: 0x0000B418 File Offset: 0x00009618 + [XmlAttribute("pntRef")] + public string PntRef { get; set; } + + // Token: 0x060002B5 RID: 693 RVA: 0x0000B424 File Offset: 0x00009624 + public static bool operator ==(CgPoint p1, CgPoint p2) + { + return p1 == p2 && (p1 == null || (p1.Name == p2.Name && p1.Code == p2.Code && p1.PntRef == p2.PntRef)); + } + + // Token: 0x060002B6 RID: 694 RVA: 0x0000B47C File Offset: 0x0000967C + public static bool operator !=(CgPoint p1, CgPoint p2) + { + return p1 != p2 || (p1 != null && (p1.Name != p2.Name && p1.Code != p2.Code) && p1.PntRef != p2.PntRef); + } + + // Token: 0x060002B7 RID: 695 RVA: 0x0000B4D2 File Offset: 0x000096D2 + public override bool Equals(object obj) + { + return this == (CgPoint)obj; + } + + // Token: 0x060002B8 RID: 696 RVA: 0x0000B4E0 File Offset: 0x000096E0 + public override int GetHashCode() + { + return base.GetHashCode(); + } + } +} diff --git a/CorridorModel/CgPoints.cs b/CorridorModel/CgPoints.cs new file mode 100644 index 0000000..c35cf27 --- /dev/null +++ b/CorridorModel/CgPoints.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000031 RID: 49 + [XmlType("CgPoints")] + [Serializable] + public class CgPoints + { + // Token: 0x060002BA RID: 698 RVA: 0x0000B4F0 File Offset: 0x000096F0 + public CgPoints() + { + this.cgPoints = new List(); + } + + // Token: 0x170000E1 RID: 225 + // (get) Token: 0x060002BB RID: 699 RVA: 0x0000B503 File Offset: 0x00009703 + // (set) Token: 0x060002BC RID: 700 RVA: 0x0000B50B File Offset: 0x0000970B + [XmlElement("CgPoint")] + public List cgPoints { get; set; } + + // Token: 0x170000E2 RID: 226 + // (get) Token: 0x060002BD RID: 701 RVA: 0x0000B514 File Offset: 0x00009714 + // (set) Token: 0x060002BE RID: 702 RVA: 0x0000B51C File Offset: 0x0000971C + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x170000E3 RID: 227 + // (get) Token: 0x060002BF RID: 703 RVA: 0x0000B525 File Offset: 0x00009725 + // (set) Token: 0x060002C0 RID: 704 RVA: 0x0000B52D File Offset: 0x0000972D + [XmlAttribute("id")] + public string Id { get; set; } + + // Token: 0x060002C1 RID: 705 RVA: 0x0000B536 File Offset: 0x00009736 + public int IndexOf(CgPoint item) + { + return this.cgPoints.IndexOf(item); + } + + // Token: 0x060002C2 RID: 706 RVA: 0x0000B544 File Offset: 0x00009744 + public void Insert(int index, CgPoint item) + { + this.cgPoints.Insert(index, item); + } + + // Token: 0x060002C3 RID: 707 RVA: 0x0000B553 File Offset: 0x00009753 + public void RemoveAt(int index) + { + this.cgPoints.RemoveAt(index); + } + + // Token: 0x170000E4 RID: 228 + [XmlIgnore] + public CgPoint this[int index] + { + get + { + if (index < this.cgPoints.Count) + { + return this.cgPoints[index]; + } + throw new IndexOutOfRangeException(); + } + set + { + if (index < this.cgPoints.Count) + { + this.cgPoints[index] = value; + return; + } + if (index == this.cgPoints.Count) + { + this.cgPoints.Add(value); + return; + } + throw new IndexOutOfRangeException(); + } + } + + // Token: 0x060002C6 RID: 710 RVA: 0x0000B5C1 File Offset: 0x000097C1 + public void Add(CgPoint item) + { + this.cgPoints.Add(item); + } + + // Token: 0x060002C7 RID: 711 RVA: 0x0000B5CF File Offset: 0x000097CF + public void Clear() + { + this.cgPoints.Clear(); + } + + // Token: 0x060002C8 RID: 712 RVA: 0x0000B5DC File Offset: 0x000097DC + public bool Contains(CgPoint item) + { + return this.cgPoints.Contains(item); + } + + // Token: 0x060002C9 RID: 713 RVA: 0x0000B5EA File Offset: 0x000097EA + public void CopyTo(CgPoint[] array, int arrayIndex) + { + this.cgPoints.CopyTo(array, arrayIndex); + } + + // Token: 0x170000E5 RID: 229 + // (get) Token: 0x060002CA RID: 714 RVA: 0x0000B5F9 File Offset: 0x000097F9 + [XmlIgnore] + public int Count + { + get + { + return this.cgPoints.Count; + } + } + + // Token: 0x170000E6 RID: 230 + // (get) Token: 0x060002CB RID: 715 RVA: 0x0000B606 File Offset: 0x00009806 + [XmlIgnore] + public bool IsReadOnly + { + get + { + return false; + } + } + + // Token: 0x060002CC RID: 716 RVA: 0x0000B609 File Offset: 0x00009809 + public bool Remove(CgPoint item) + { + return this.cgPoints.Remove(item); + } + + // Token: 0x060002CD RID: 717 RVA: 0x0000B617 File Offset: 0x00009817 + public IEnumerator GetEnumerator() + { + return this.cgPoints.GetEnumerator(); + } + } +} diff --git a/CorridorModel/CircCurve.cs b/CorridorModel/CircCurve.cs new file mode 100644 index 0000000..33822e2 --- /dev/null +++ b/CorridorModel/CircCurve.cs @@ -0,0 +1,16 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000015 RID: 21 + [Serializable] + public class CircCurve : ParaCurve + { + // Token: 0x17000068 RID: 104 + // (get) Token: 0x0600014B RID: 331 RVA: 0x00008ACE File Offset: 0x00006CCE + // (set) Token: 0x0600014C RID: 332 RVA: 0x00008AD6 File Offset: 0x00006CD6 + [XmlAttribute("radius")] + public double Radius { get; set; } + } +} diff --git a/CorridorModel/ComparableStructure.cs b/CorridorModel/ComparableStructure.cs new file mode 100644 index 0000000..868af16 --- /dev/null +++ b/CorridorModel/ComparableStructure.cs @@ -0,0 +1,33 @@ +using System; +using CorridorModel.Interfaces; + +namespace CorridorModel +{ + // Token: 0x02000003 RID: 3 + public abstract class ComparableStructure : IComparableStructure where T : class + { + // Token: 0x06000004 RID: 4 RVA: 0x00002050 File Offset: 0x00000250 + public override int GetHashCode() + { + return base.GetHashCode(); + } + + // Token: 0x06000005 RID: 5 RVA: 0x00002058 File Offset: 0x00000258 + public override bool Equals(object obj) + { + return this.Equals(obj as T); + } + + // Token: 0x06000006 RID: 6 RVA: 0x0000206B File Offset: 0x0000026B + public bool Equals(T item) + { + return !object.ReferenceEquals(item, null) && !this.DifferentItem(item) && !this.DifferentDescendants(item); + } + + // Token: 0x06000007 RID: 7 + public abstract bool DifferentItem(T item); + + // Token: 0x06000008 RID: 8 + public abstract bool DifferentDescendants(T item); + } +} diff --git a/CorridorModel/CoordGeom.cs b/CorridorModel/CoordGeom.cs new file mode 100644 index 0000000..1bcfa19 --- /dev/null +++ b/CorridorModel/CoordGeom.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + [XmlType("CoordGeom")] + [Serializable] + public class CoordGeom + { + public CoordGeom() + { + this.HorizonCurve = new List(); + } + + [XmlElement("Curve", Type = typeof(Curve))] + [XmlElement("Line", Type = typeof(Line))] + [XmlElement("Spiral", Type = typeof(Spiral))] + public List HorizonCurve { get; set; } + + // Token: 0x06000097 RID: 151 RVA: 0x00003A97 File Offset: 0x00001C97 + public int IndexOf(Interval item) + { + return this.HorizonCurve.IndexOf(item); + } + + // Token: 0x06000098 RID: 152 RVA: 0x00003AA5 File Offset: 0x00001CA5 + public void Insert(int index, Interval item) + { + this.HorizonCurve.Insert(index, item); + } + + // Token: 0x06000099 RID: 153 RVA: 0x00003AB4 File Offset: 0x00001CB4 + public void RemoveAt(int index) + { + this.HorizonCurve.RemoveAt(index); + } + + // Token: 0x17000029 RID: 41 + public Interval this[int index] + { + get + { + if (index < this.HorizonCurve.Count) + { + return this.HorizonCurve[index]; + } + throw new IndexOutOfRangeException(); + } + set + { + if (index < this.HorizonCurve.Count) + { + this.HorizonCurve[index] = value; + return; + } + if (index == this.HorizonCurve.Count) + { + this.HorizonCurve.Add(value); + return; + } + throw new IndexOutOfRangeException(); + } + } + + // Token: 0x0600009C RID: 156 RVA: 0x00003B22 File Offset: 0x00001D22 + public void Add(Interval item) + { + this.HorizonCurve.Add(item); + } + + // Token: 0x0600009D RID: 157 RVA: 0x00003B30 File Offset: 0x00001D30 + public void Clear() + { + this.HorizonCurve.Clear(); + } + + // Token: 0x0600009E RID: 158 RVA: 0x00003B3D File Offset: 0x00001D3D + public bool Contains(Interval item) + { + return this.HorizonCurve.Contains(item); + } + + // Token: 0x0600009F RID: 159 RVA: 0x00003B4B File Offset: 0x00001D4B + public void CopyTo(Interval[] array, int arrayIndex) + { + this.HorizonCurve.CopyTo(array, arrayIndex); + } + + // Token: 0x1700002A RID: 42 + // (get) Token: 0x060000A0 RID: 160 RVA: 0x00003B5A File Offset: 0x00001D5A + public int Count + { + get + { + return this.HorizonCurve.Count; + } + } + + // Token: 0x1700002B RID: 43 + // (get) Token: 0x060000A1 RID: 161 RVA: 0x00003B67 File Offset: 0x00001D67 + public bool IsReadOnly + { + get + { + return false; + } + } + + // Token: 0x060000A2 RID: 162 RVA: 0x00003B6A File Offset: 0x00001D6A + public bool Remove(Interval item) + { + return this.HorizonCurve.Remove(item); + } + + // Token: 0x060000A3 RID: 163 RVA: 0x00003B78 File Offset: 0x00001D78 + public IEnumerator GetEnumerator() + { + return this.HorizonCurve.GetEnumerator(); + } + } +} diff --git a/CorridorModel/CoordinateSystem.cs b/CorridorModel/CoordinateSystem.cs new file mode 100644 index 0000000..6f8742d --- /dev/null +++ b/CorridorModel/CoordinateSystem.cs @@ -0,0 +1,47 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000032 RID: 50 + [XmlType("CoordinateSystem")] + [Serializable] + public class CoordinateSystem + { + // Token: 0x170000E7 RID: 231 + // (get) Token: 0x060002CE RID: 718 RVA: 0x0000B629 File Offset: 0x00009829 + // (set) Token: 0x060002CF RID: 719 RVA: 0x0000B631 File Offset: 0x00009831 + [XmlAttribute("fileLocation")] + public string FileLocation { get; set; } + + // Token: 0x170000E8 RID: 232 + // (get) Token: 0x060002D0 RID: 720 RVA: 0x0000B63A File Offset: 0x0000983A + // (set) Token: 0x060002D1 RID: 721 RVA: 0x0000B642 File Offset: 0x00009842 + [XmlAttribute("horizontalCoordinateSystemName")] + public string HorizontalCoordinateSystemName { get; set; } + + // Token: 0x170000E9 RID: 233 + // (get) Token: 0x060002D2 RID: 722 RVA: 0x0000B64B File Offset: 0x0000984B + // (set) Token: 0x060002D3 RID: 723 RVA: 0x0000B653 File Offset: 0x00009853 + [XmlAttribute("horizontalDatum")] + public string HorizontalDatum { get; set; } + + // Token: 0x170000EA RID: 234 + // (get) Token: 0x060002D4 RID: 724 RVA: 0x0000B65C File Offset: 0x0000985C + // (set) Token: 0x060002D5 RID: 725 RVA: 0x0000B664 File Offset: 0x00009864 + [XmlAttribute("ogcWktCode")] + public string OgcWktCode { get; set; } + + // Token: 0x170000EB RID: 235 + // (get) Token: 0x060002D6 RID: 726 RVA: 0x0000B66D File Offset: 0x0000986D + // (set) Token: 0x060002D7 RID: 727 RVA: 0x0000B675 File Offset: 0x00009875 + [XmlAttribute("epsgCode")] + public string EpsgCode { get; set; } + + // Token: 0x170000EC RID: 236 + // (get) Token: 0x060002D8 RID: 728 RVA: 0x0000B67E File Offset: 0x0000987E + // (set) Token: 0x060002D9 RID: 729 RVA: 0x0000B686 File Offset: 0x00009886 + [XmlAttribute("desc")] + public string Description { get; set; } + } +} diff --git a/CorridorModel/CorridorModel.csproj b/CorridorModel/CorridorModel.csproj new file mode 100644 index 0000000..473ffca --- /dev/null +++ b/CorridorModel/CorridorModel.csproj @@ -0,0 +1,132 @@ + + + + Debug + AnyCPU + {D8FFA8FE-D920-4A55-A7BB-5381642CE016} + Library + Properties + CorridorModel + CorridorModel + v4.5 + 512 + {60DC8134-EBA5-43B8-BCC9-BB4BC16C2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CorridorModel/CrossSection.cs b/CorridorModel/CrossSection.cs new file mode 100644 index 0000000..4da751a --- /dev/null +++ b/CorridorModel/CrossSection.cs @@ -0,0 +1,256 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200001E RID: 30 + [XmlType("CrossSect")] + [Serializable] + public class CrossSection : Point3D + { + // Token: 0x060001B9 RID: 441 RVA: 0x0000935F File Offset: 0x0000755F + public CrossSection() + { + this.DesignShapes = new List(); + this.Surfaces = new List(); + this.Import = true; + } + + // Token: 0x1700008F RID: 143 + // (get) Token: 0x060001BA RID: 442 RVA: 0x00009384 File Offset: 0x00007584 + // (set) Token: 0x060001BB RID: 443 RVA: 0x0000938C File Offset: 0x0000758C + [XmlAttribute("AssemblyID")] + public string AssemblyID { get; set; } + + // Token: 0x17000090 RID: 144 + // (get) Token: 0x060001BC RID: 444 RVA: 0x00009395 File Offset: 0x00007595 + // (set) Token: 0x060001BD RID: 445 RVA: 0x0000939D File Offset: 0x0000759D + [XmlAttribute("r")] + public int Region { get; set; } + + // Token: 0x17000091 RID: 145 + // (get) Token: 0x060001BE RID: 446 RVA: 0x000093A6 File Offset: 0x000075A6 + // (set) Token: 0x060001BF RID: 447 RVA: 0x000093AE File Offset: 0x000075AE + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x17000092 RID: 146 + // (get) Token: 0x060001C0 RID: 448 RVA: 0x000093B7 File Offset: 0x000075B7 + // (set) Token: 0x060001C1 RID: 449 RVA: 0x000093BF File Offset: 0x000075BF + [XmlAttribute("sta")] + public double Station { get; set; } + + // Token: 0x17000093 RID: 147 + // (get) Token: 0x060001C2 RID: 450 RVA: 0x000093C8 File Offset: 0x000075C8 + // (set) Token: 0x060001C3 RID: 451 RVA: 0x000093D0 File Offset: 0x000075D0 + [XmlAttribute("we")] + public double WayElevation { get; set; } + + // Token: 0x17000094 RID: 148 + // (get) Token: 0x060001C4 RID: 452 RVA: 0x000093D9 File Offset: 0x000075D9 + // (set) Token: 0x060001C5 RID: 453 RVA: 0x000093E1 File Offset: 0x000075E1 + [XmlAttribute("ge")] + public double GroundElevation { get; set; } + + // Token: 0x17000095 RID: 149 + // (get) Token: 0x060001C6 RID: 454 RVA: 0x000093EA File Offset: 0x000075EA + // (set) Token: 0x060001C7 RID: 455 RVA: 0x000093F2 File Offset: 0x000075F2 + [XmlElement("DesignCrossSectSurf")] + public List DesignShapes { get; set; } + + // Token: 0x17000096 RID: 150 + // (get) Token: 0x060001C8 RID: 456 RVA: 0x000093FB File Offset: 0x000075FB + // (set) Token: 0x060001C9 RID: 457 RVA: 0x00009403 File Offset: 0x00007603 + [XmlElement("CrossSectSurf")] + public List Surfaces { get; set; } + + // Token: 0x17000097 RID: 151 + // (get) Token: 0x060001CA RID: 458 RVA: 0x0000940C File Offset: 0x0000760C + // (set) Token: 0x060001CB RID: 459 RVA: 0x00009414 File Offset: 0x00007614 + [XmlAttribute("import")] + public bool Import { get; set; } + + // Token: 0x17000098 RID: 152 + // (get) Token: 0x060001CC RID: 460 RVA: 0x00009425 File Offset: 0x00007625 + [XmlIgnore] + public IEnumerable SurfaceNames + { + get + { + return (from item in this.DesignShapes + select item.Name).Distinct(); + } + } + + // Token: 0x17000099 RID: 153 + // (get) Token: 0x060001CD RID: 461 RVA: 0x0000945C File Offset: 0x0000765C + [XmlIgnore] + public IEnumerable PointCodes + { + get + { + return this.DesignShapes.SelectMany((DesignShape item) => item.PointCodes); + } + } + + // Token: 0x060001CE RID: 462 RVA: 0x000094C0 File Offset: 0x000076C0 + public IEnumerable GetPointCodes(Side side) + { + if (side == Side.Both) + { + return this.PointCodes.Distinct(); + } + List list = (from item in this.DesignShapes + where item.Side == side + select item).SelectMany((DesignShape item) => item.PointCodes).Distinct().ToList(); + list.AddRange((from item in this.DesignShapes + where item.Side == Side.Both + select item).SelectMany((DesignShape item) => item.GetPointCodes(side)).Distinct()); + return list.Distinct(); + } + + // Token: 0x060001CF RID: 463 RVA: 0x0000958C File Offset: 0x0000778C + public void Transform(GeometryTransformations transformations) + { + foreach (DesignShape designShape in this.DesignShapes) + { + designShape.Transform(transformations); + } + this.Station *= transformations.ScaleFactor; + this.GroundElevation = this.GroundElevation * transformations.ScaleFactor + transformations.Dz; + this.WayElevation = this.WayElevation * transformations.ScaleFactor + transformations.Dz; + transformations.Transform(this); + } + + // Token: 0x060001D0 RID: 464 RVA: 0x00009648 File Offset: 0x00007848 + public CrossSectionPoint GetPointAtOffset(double offset) + { + CrossSectionPoint crossSectionPoint = null; + foreach (DesignShape designShape in this.DesignShapes) + { + crossSectionPoint = designShape.CrossSectionPoints.FirstOrDefault((CrossSectionPoint item) => item.First == offset); + if (crossSectionPoint != null) + { + return crossSectionPoint; + } + } + return crossSectionPoint; + } + + // Token: 0x060001D1 RID: 465 RVA: 0x0000970A File Offset: 0x0000790A + public CrossSectionPoint GetRightPoint() + { + return this.GetPointAtOffset(this.DesignShapes.Max((DesignShape item) => item.CrossSectionPoints.Max((CrossSectionPoint point) => point.First))); + } + + // Token: 0x060001D2 RID: 466 RVA: 0x0000976C File Offset: 0x0000796C + public CrossSectionPoint GetLeftPoint() + { + return this.GetPointAtOffset(this.DesignShapes.Min((DesignShape item) => item.CrossSectionPoints.Min((CrossSectionPoint point) => point.First))); + } + + // Token: 0x060001D3 RID: 467 RVA: 0x00009828 File Offset: 0x00007A28 + public CrossSectionPoint GetPointByName(string pointCode, bool onLeft) + { + CrossSectionPoint crossSectionPoint = null; + Side side = onLeft ? Side.Left : Side.Right; + foreach (DesignShape designShape in from item in this.DesignShapes + where item.Side == side + select item) + { + crossSectionPoint = designShape.CrossSectionPoints.FirstOrDefault((CrossSectionPoint item) => item.Code == pointCode); + if (crossSectionPoint != null) + { + return crossSectionPoint; + } + } + foreach (DesignShape designShape2 in from item in this.DesignShapes + where item.Side == Side.Both + select item) + { + if (onLeft) + { + crossSectionPoint = designShape2.CrossSectionPoints.FirstOrDefault((CrossSectionPoint item) => item.Code == pointCode && item.First <= 0.0); + } + else + { + crossSectionPoint = designShape2.CrossSectionPoints.FirstOrDefault((CrossSectionPoint item) => item.Code == pointCode && item.First >= 0.0); + } + if (crossSectionPoint != null) + { + return crossSectionPoint; + } + } + return crossSectionPoint; + } + + // Token: 0x060001D4 RID: 468 RVA: 0x00009990 File Offset: 0x00007B90 + public CrossSectionPoint GetPointByNames(IList pointCodes, bool onLeft) + { + CrossSectionPoint crossSectionPoint = null; + for (int i = 0; i < pointCodes.Count; i++) + { + string text = pointCodes[i]; + crossSectionPoint = this.GetPointByName(text, onLeft); + if (crossSectionPoint != null) + { + if (i > 0) + { + pointCodes.RemoveAt(i); + pointCodes.Insert(0, text); + } + return crossSectionPoint; + } + } + return crossSectionPoint; + } + + // Token: 0x060001D5 RID: 469 RVA: 0x000099E0 File Offset: 0x00007BE0 + public static bool ValuesEqual(CrossSection p1, CrossSection p2) + { + return p1.Region == p2.Region && p1.Name == p2.Name && Point3D.ValuesEqual(p1, p2); + } + + // Token: 0x060001D6 RID: 470 RVA: 0x00009A0C File Offset: 0x00007C0C + public static bool operator ==(CrossSection p1, CrossSection p2) + { + bool? flag = LamdXMLEx.ReferenceComparison(p1, p2); + if (flag != null) + { + return flag.Value; + } + return CrossSection.ValuesEqual(p1, p2); + } + + // Token: 0x060001D7 RID: 471 RVA: 0x00009A3C File Offset: 0x00007C3C + public static bool operator !=(CrossSection p1, CrossSection p2) + { + bool? flag = LamdXMLEx.ReferenceComparison(p1, p2); + return !((flag == null) ? CrossSection.ValuesEqual(p1, p2) : flag.Value); + } + + // Token: 0x060001D8 RID: 472 RVA: 0x00009A70 File Offset: 0x00007C70 + public override bool Equals(object obj) + { + CrossSection crossSection = obj as CrossSection; + return !(crossSection == null) && CrossSection.ValuesEqual(this, crossSection); + } + + // Token: 0x060001D9 RID: 473 RVA: 0x00009A96 File Offset: 0x00007C96 + public override int GetHashCode() + { + return base.GetHashCode(); + } + + // Token: 0x060001DA RID: 474 RVA: 0x00009AA0 File Offset: 0x00007CA0 + public void ConnectShapes() + { + foreach (DesignShape designShape in this.DesignShapes) + { + designShape.CrossSection = this; + } + } + } +} diff --git a/CorridorModel/CrossSectionPoint.cs b/CorridorModel/CrossSectionPoint.cs new file mode 100644 index 0000000..3b54eae --- /dev/null +++ b/CorridorModel/CrossSectionPoint.cs @@ -0,0 +1,202 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200001F RID: 31 + [XmlType("CrossSectPnt")] + [Serializable] + public class CrossSectionPoint : TextPoint2D + { + // Token: 0x060001E4 RID: 484 RVA: 0x00009AF4 File Offset: 0x00007CF4 + public CrossSectionPoint() + { + this.Code = null; + this.Edge = (this.Index = 0); + } + + // Token: 0x060001E5 RID: 485 RVA: 0x00009B1E File Offset: 0x00007D1E + public CrossSectionPoint(CrossSectionPoint source) : base(source) + { + this.Code = source.Code; + this.Edge = source.Edge; + this.Index = source.Index; + } + + // Token: 0x1700009A RID: 154 + // (get) Token: 0x060001E6 RID: 486 RVA: 0x00009B4B File Offset: 0x00007D4B + // (set) Token: 0x060001E7 RID: 487 RVA: 0x00009B53 File Offset: 0x00007D53 + [XmlAttribute("code")] + public string Code { get; set; } + + // Token: 0x1700009B RID: 155 + // (get) Token: 0x060001E8 RID: 488 RVA: 0x00009B5C File Offset: 0x00007D5C + // (set) Token: 0x060001E9 RID: 489 RVA: 0x00009B64 File Offset: 0x00007D64 + [XmlAttribute("edge")] + public int Edge { get; set; } + + // Token: 0x1700009C RID: 156 + // (get) Token: 0x060001EA RID: 490 RVA: 0x00009B6D File Offset: 0x00007D6D + // (set) Token: 0x060001EB RID: 491 RVA: 0x00009B75 File Offset: 0x00007D75 + [XmlAttribute("i")] + public int Index { get; set; } + + // Token: 0x1700009D RID: 157 + // (get) Token: 0x060001EC RID: 492 RVA: 0x00009B80 File Offset: 0x00007D80 + [XmlIgnore] + public string CodeIndex + { + get + { + return this.Code + " " + this.Index.ToString(); + } + } + + // Token: 0x060001ED RID: 493 RVA: 0x00009BAB File Offset: 0x00007DAB + public static bool ValuesEqual(CrossSectionPoint p1, CrossSectionPoint p2) + { + return p1.Code == p2.Code && TextPoint2D.ValuesEqual(p1, p2); + } + + // Token: 0x060001EE RID: 494 RVA: 0x00009BC9 File Offset: 0x00007DC9 + public static bool operator ==(CrossSectionPoint p1, CrossSectionPoint p2) + { + return object.ReferenceEquals(p1, p2) || (!object.ReferenceEquals(p1, null) && !object.ReferenceEquals(p2, null) && CrossSectionPoint.ValuesEqual(p1, p2)); + } + + // Token: 0x060001EF RID: 495 RVA: 0x00009BF1 File Offset: 0x00007DF1 + public static bool operator !=(CrossSectionPoint p1, CrossSectionPoint p2) + { + return !object.ReferenceEquals(p1, p2) && (object.ReferenceEquals(p1, null) || object.ReferenceEquals(p2, null) || !CrossSectionPoint.ValuesEqual(p1, p2)); + } + + // Token: 0x060001F0 RID: 496 RVA: 0x00009C1C File Offset: 0x00007E1C + public override bool Equals(object obj) + { + return this.Equals(obj as CrossSectionPoint); + } + + // Token: 0x060001F1 RID: 497 RVA: 0x00009C2A File Offset: 0x00007E2A + public bool Equals(CrossSectionPoint csp) + { + return !object.ReferenceEquals(csp, null) && CrossSectionPoint.ValuesEqual(this, csp); + } + + // Token: 0x060001F2 RID: 498 RVA: 0x00009C3E File Offset: 0x00007E3E + public override int GetHashCode() + { + return base.GetHashCode(); + } + + // Token: 0x060001F3 RID: 499 RVA: 0x00009C48 File Offset: 0x00007E48 + public static CrossSectionPoint operator +(CrossSectionPoint p1, CrossSectionPoint p2) + { + if (p1 != null) + { + if (p2 != null) + { + return new CrossSectionPoint + { + X = p1.X + p2.X, + Y = p1.Y + p2.Y, + Z = p1.Z + p2.Z, + _first = p1._first + p2._first, + Second = p1._second + p2._second + }; + } + return p1; + } + else + { + if (p2 != null) + { + return p2; + } + return null; + } + } + + // Token: 0x060001F4 RID: 500 RVA: 0x00009CCC File Offset: 0x00007ECC + public static CrossSectionPoint operator -(CrossSectionPoint p1, CrossSectionPoint p2) + { + if (p1 != null) + { + if (p2 != null) + { + return new CrossSectionPoint + { + X = p1.X - p2.X, + Y = p1.Y - p2.Y, + Z = p1.Z - p2.Z, + _first = p1._first - p2._first, + Second = p1._second - p2._second + }; + } + return p1; + } + else + { + if (p2 != null) + { + return new CrossSectionPoint + { + X = -p2.X, + Y = -p2.Y, + Z = -p2.Z, + _first = -p1._first, + Second = -p2._second + }; + } + return null; + } + } + + // Token: 0x060001F5 RID: 501 RVA: 0x00009D98 File Offset: 0x00007F98 + public static CrossSectionPoint operator *(double f1, CrossSectionPoint p2) + { + if (p2 != null) + { + return new CrossSectionPoint + { + X = f1 * p2.X, + Y = f1 * p2.Y, + Z = f1 * p2.Z, + _first = f1 * p2._first, + Second = f1 * p2._second + }; + } + return null; + } + + // Token: 0x060001F6 RID: 502 RVA: 0x00009E90 File Offset: 0x00008090 + public string SeekCode(CrossSection crossSection) + { + string[] array = crossSection.DesignShapes.SelectMany((DesignShape ds) => from p in ds.CrossSectionPoints + where p != this && p.Text == base.Text && p.X == base.X && p.Y == base.Y && p.Z == base.Z + select p.Code).ToArray(); + if (array.Length <= 0) + { + return null; + } + return array[0]; + } + + // Token: 0x02000020 RID: 32 + public class SectionPointComparer : IEqualityComparer + { + // Token: 0x060001FA RID: 506 RVA: 0x00009EC5 File Offset: 0x000080C5 + public bool Equals(CrossSectionPoint x, CrossSectionPoint y) + { + return x.First == y.First && x.Second == y.Second; + } + + // Token: 0x060001FB RID: 507 RVA: 0x00009EE5 File Offset: 0x000080E5 + public int GetHashCode(CrossSectionPoint obj) + { + return obj.GetHashCode(); + } + } + } +} diff --git a/CorridorModel/Curve.cs b/CorridorModel/Curve.cs new file mode 100644 index 0000000..e5aa437 --- /dev/null +++ b/CorridorModel/Curve.cs @@ -0,0 +1,1051 @@ +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Runtime.CompilerServices; +using System.Xml.Serialization; +using Microsoft.CSharp.RuntimeBinder; + +namespace CorridorModel +{ + // Token: 0x0200000A RID: 10 + [XmlType("Curve")] + [Serializable] + public class Curve : Interval + { + // Token: 0x060000AF RID: 175 RVA: 0x00003CDC File Offset: 0x00001EDC + public Curve() + { + base._points = new List(4); + base._points.Add(new TextPoint2D()); + base._points.Add(new TextPoint2D()); + base._points.Add(new TextPoint2D()); + base._points.Add(new TextPoint2D()); + } + + // Token: 0x060000B0 RID: 176 RVA: 0x00003D3C File Offset: 0x00001F3C + public Curve(Curve entity) : this() + { + base.Length = entity.Length; + this.Tangent = entity.Tangent; + this.Radius = entity.Radius; + this.MidOrd = entity.MidOrd; + this.External = entity.External; + this.DirStart = entity.DirStart; + this.DirEnd = entity.DirEnd; + this.Delta = entity.Delta; + this.Chord = entity.Chord; + this.Rot = entity.Rot; + this.CrvType = entity.CrvType; + base.Start = entity.Start; + base.End = entity.End; + this.PI = entity.PI; + this.Center = entity.Center; + } + + // Token: 0x060000B1 RID: 177 RVA: 0x00003E04 File Offset: 0x00002004 + public Curve(dynamic entity, dynamic baseline, dynamic profile) : this() + { + if (Curve.ctor.pSite1 == null) + { + Curve.ctor.pSite1 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target = Curve.ctor.pSite1.Target; + CallSite pSite = Curve.ctor.pSite1; + if (Curve.ctor.pSite2 == null) + { + Curve.ctor.pSite2 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "Length", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + base.Length = target(pSite, Curve.ctor.pSite2.Target(Curve.ctor.pSite2, entity)); + if (Curve.ctor.pSite3 == null) + { + Curve.ctor.pSite3 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target2 = Curve.ctor.pSite3.Target; + CallSite pSite2 = Curve.ctor.pSite3; + if (Curve.ctor.pSite4 == null) + { + Curve.ctor.pSite4 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "ExternalTangent", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.Tangent = target2(pSite2, Curve.ctor.pSite4.Target(Curve.ctor.pSite4, entity)); + if (Curve.ctor.pSite5 == null) + { + Curve.ctor.pSite5 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target3 = Curve.ctor.pSite5.Target; + CallSite pSite3 = Curve.ctor.pSite5; + if (Curve.ctor.pSite6 == null) + { + Curve.ctor.pSite6 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "Radius", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.Radius = target3(pSite3, Curve.ctor.pSite6.Target(Curve.ctor.pSite6, entity)); + if (Curve.ctor.pSite7 == null) + { + Curve.ctor.pSite7 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target4 = Curve.ctor.pSite7.Target; + CallSite pSite4 = Curve.ctor.pSite7; + if (Curve.ctor.pSite8 == null) + { + Curve.ctor.pSite8 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "MidOrdinate", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.MidOrd = target4(pSite4, Curve.ctor.pSite8.Target(Curve.ctor.pSite8, entity)); + if (Curve.ctor.pSite9 == null) + { + Curve.ctor.pSite9 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target5 = Curve.ctor.pSite9.Target; + CallSite pSite5 = Curve.ctor.pSite9; + if (Curve.ctor.pSitea == null) + { + Curve.ctor.pSitea = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "ExternalSecant", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.External = target5(pSite5, Curve.ctor.pSitea.Target(Curve.ctor.pSitea, entity)); + if (Curve.ctor.pSiteb == null) + { + Curve.ctor.pSiteb = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target6 = Curve.ctor.pSiteb.Target; + CallSite pSiteb = Curve.ctor.pSiteb; + if (Curve.ctor.pSitec == null) + { + Curve.ctor.pSitec = CallSite>.Create(Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.Divide, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + Func target7 = Curve.ctor.pSitec.Target; + CallSite pSitec = Curve.ctor.pSitec; + if (Curve.ctor.pSited == null) + { + Curve.ctor.pSited = CallSite>.Create(Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.Multiply, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + Func target8 = Curve.ctor.pSited.Target; + CallSite pSited = Curve.ctor.pSited; + if (Curve.ctor.pSitee == null) + { + Curve.ctor.pSitee = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "StartDirection", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.DirStart = target6(pSiteb, target7(pSitec, target8(pSited, Curve.ctor.pSitee.Target(Curve.ctor.pSitee, entity), 180.0), 3.1415926535897931)); + if (Curve.ctor.pSitef == null) + { + Curve.ctor.pSitef = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target9 = Curve.ctor.pSitef.Target; + CallSite pSitef = Curve.ctor.pSitef; + if (Curve.ctor.pSite10 == null) + { + Curve.ctor.pSite10 = CallSite>.Create(Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.Divide, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + Func target10 = Curve.ctor.pSite10.Target; + CallSite pSite6 = Curve.ctor.pSite10; + if (Curve.ctor.pSite11 == null) + { + Curve.ctor.pSite11 = CallSite>.Create(Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.Multiply, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + Func target11 = Curve.ctor.pSite11.Target; + CallSite pSite7 = Curve.ctor.pSite11; + if (Curve.ctor.pSite12 == null) + { + Curve.ctor.pSite12 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "EndDirection", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.DirEnd = target9(pSitef, target10(pSite6, target11(pSite7, Curve.ctor.pSite12.Target(Curve.ctor.pSite12, entity), 180.0), 3.1415926535897931)); + if (Curve.ctor.pSite13 == null) + { + Curve.ctor.pSite13 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target12 = Curve.ctor.pSite13.Target; + CallSite pSite8 = Curve.ctor.pSite13; + if (Curve.ctor.pSite14 == null) + { + Curve.ctor.pSite14 = CallSite>.Create(Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.Divide, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + Func target13 = Curve.ctor.pSite14.Target; + CallSite pSite9 = Curve.ctor.pSite14; + if (Curve.ctor.pSite15 == null) + { + Curve.ctor.pSite15 = CallSite>.Create(Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.Multiply, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + Func target14 = Curve.ctor.pSite15.Target; + CallSite pSite10 = Curve.ctor.pSite15; + if (Curve.ctor.pSite16 == null) + { + Curve.ctor.pSite16 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "Delta", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.Delta = target12(pSite8, target13(pSite9, target14(pSite10, Curve.ctor.pSite16.Target(Curve.ctor.pSite16, entity), 180.0), 3.1415926535897931)); + if (Curve.ctor.pSite17 == null) + { + Curve.ctor.pSite17 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target15 = Curve.ctor.pSite17.Target; + CallSite pSite11 = Curve.ctor.pSite17; + if (Curve.ctor.pSite18 == null) + { + Curve.ctor.pSite18 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "ChordLength", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.Chord = target15(pSite11, Curve.ctor.pSite18.Target(Curve.ctor.pSite18, entity)); + if (Curve.ctor.pSite19 == null) + { + Curve.ctor.pSite19 = CallSite>.Create(Binder.UnaryOperation(CSharpBinderFlags.None, ExpressionType.IsTrue, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target16 = Curve.ctor.pSite19.Target; + CallSite pSite12 = Curve.ctor.pSite19; + if (Curve.ctor.pSite1a == null) + { + Curve.ctor.pSite1a = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "Clockwise", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.Rot = (target16(pSite12, Curve.ctor.pSite1a.Target(Curve.ctor.pSite1a, entity)) ? "cw" : "ccw"); + if (Curve.ctor.pSite1b == null) + { + Curve.ctor.pSite1b = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(string), typeof(Curve))); + } + Func target17 = Curve.ctor.pSite1b.Target; + CallSite pSite1b = Curve.ctor.pSite1b; + if (Curve.ctor.pSite1c == null) + { + Curve.ctor.pSite1c = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "ToString", null, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target18 = Curve.ctor.pSite1c.Target; + CallSite pSite1c = Curve.ctor.pSite1c; + if (Curve.ctor.pSite1d == null) + { + Curve.ctor.pSite1d = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "Type", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.CrvType = target17(pSite1b, target18(pSite1c, Curve.ctor.pSite1d.Target(Curve.ctor.pSite1d, entity))); + if (Curve.ctor.pSite1e == null) + { + Curve.ctor.pSite1e = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target19 = Curve.ctor.pSite1e.Target; + CallSite pSite1e = Curve.ctor.pSite1e; + if (Curve.ctor.pSite1f == null) + { + Curve.ctor.pSite1f = CallSite>.Create(Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.Multiply, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + Func target20 = Curve.ctor.pSite1f.Target; + CallSite pSite1f = Curve.ctor.pSite1f; + if (Curve.ctor.pSite20 == null) + { + Curve.ctor.pSite20 = CallSite>.Create(Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.Add, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target21 = Curve.ctor.pSite20.Target; + CallSite pSite13 = Curve.ctor.pSite20; + if (Curve.ctor.pSite21 == null) + { + Curve.ctor.pSite21 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "StartingStation", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + object arg = Curve.ctor.pSite21.Target(Curve.ctor.pSite21, entity); + if (Curve.ctor.pSite22 == null) + { + Curve.ctor.pSite22 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "EndingStation", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + double num = target19(pSite1e, target20(pSite1f, target21(pSite13, arg, Curve.ctor.pSite22.Target(Curve.ctor.pSite22, entity)), 0.5)); + if (Curve.ctor.pSite23 == null) + { + Curve.ctor.pSite23 = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "StationOffsetElevationToXYZ", null, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target22 = Curve.ctor.pSite23.Target; + CallSite pSite14 = Curve.ctor.pSite23; + double[] array = new double[3]; + double[] array2 = array; + int num2 = 0; + if (Curve.ctor.pSite24 == null) + { + Curve.ctor.pSite24 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target23 = Curve.ctor.pSite24.Target; + CallSite pSite15 = Curve.ctor.pSite24; + if (Curve.ctor.pSite25 == null) + { + Curve.ctor.pSite25 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "StartingStation", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array2[num2] = target23(pSite15, Curve.ctor.pSite25.Target(Curve.ctor.pSite25, entity)); + double[] array3 = array; + int num3 = 2; + if (Curve.ctor.pSite26 == null) + { + Curve.ctor.pSite26 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target24 = Curve.ctor.pSite26.Target; + CallSite pSite16 = Curve.ctor.pSite26; + if (Curve.ctor.pSite27 == null) + { + Curve.ctor.pSite27 = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "ElevationAt", null, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target25 = Curve.ctor.pSite27.Target; + CallSite pSite17 = Curve.ctor.pSite27; + if (Curve.ctor.pSite28 == null) + { + Curve.ctor.pSite28 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "StartingStation", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array3[num3] = target24(pSite16, target25(pSite17, profile, Curve.ctor.pSite28.Target(Curve.ctor.pSite28, entity))); + object obj = target22(pSite14, baseline, array); + if (Curve.ctor.pSite29 == null) + { + Curve.ctor.pSite29 = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "StationOffsetElevationToXYZ", null, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target26 = Curve.ctor.pSite29.Target; + CallSite pSite18 = Curve.ctor.pSite29; + double[] array4 = new double[3]; + double[] array5 = array4; + int num4 = 0; + if (Curve.ctor.pSite2a == null) + { + Curve.ctor.pSite2a = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target27 = Curve.ctor.pSite2a.Target; + CallSite pSite2a = Curve.ctor.pSite2a; + if (Curve.ctor.pSite2b == null) + { + Curve.ctor.pSite2b = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "EndingStation", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array5[num4] = target27(pSite2a, Curve.ctor.pSite2b.Target(Curve.ctor.pSite2b, entity)); + double[] array6 = array4; + int num5 = 2; + if (Curve.ctor.pSite2c == null) + { + Curve.ctor.pSite2c = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target28 = Curve.ctor.pSite2c.Target; + CallSite pSite2c = Curve.ctor.pSite2c; + if (Curve.ctor.pSite2d == null) + { + Curve.ctor.pSite2d = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "ElevationAt", null, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target29 = Curve.ctor.pSite2d.Target; + CallSite pSite2d = Curve.ctor.pSite2d; + if (Curve.ctor.pSite2e == null) + { + Curve.ctor.pSite2e = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "EndingStation", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array6[num5] = target28(pSite2c, target29(pSite2d, profile, Curve.ctor.pSite2e.Target(Curve.ctor.pSite2e, entity))); + object obj2 = target26(pSite18, baseline, array4); + if (Curve.ctor.pSite2f == null) + { + Curve.ctor.pSite2f = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "StationOffsetElevationToXYZ", null, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target30 = Curve.ctor.pSite2f.Target; + CallSite pSite2f = Curve.ctor.pSite2f; + double[] array7 = new double[3]; + double[] array8 = array7; + int num6 = 0; + if (Curve.ctor.pSite30 == null) + { + Curve.ctor.pSite30 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target31 = Curve.ctor.pSite30.Target; + CallSite pSite19 = Curve.ctor.pSite30; + if (Curve.ctor.pSite31 == null) + { + Curve.ctor.pSite31 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "PIStation", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array8[num6] = target31(pSite19, Curve.ctor.pSite31.Target(Curve.ctor.pSite31, entity)); + double[] array9 = array7; + int num7 = 2; + if (Curve.ctor.pSite32 == null) + { + Curve.ctor.pSite32 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target32 = Curve.ctor.pSite32.Target; + CallSite pSite20 = Curve.ctor.pSite32; + if (Curve.ctor.pSite33 == null) + { + Curve.ctor.pSite33 = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "ElevationAt", null, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target33 = Curve.ctor.pSite33.Target; + CallSite pSite21 = Curve.ctor.pSite33; + if (Curve.ctor.pSite34 == null) + { + Curve.ctor.pSite34 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "PIStation", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array9[num7] = target32(pSite20, target33(pSite21, profile, Curve.ctor.pSite34.Target(Curve.ctor.pSite34, entity))); + object obj3 = target30(pSite2f, baseline, array7); + if (Curve.ctor.pSite35 == null) + { + Curve.ctor.pSite35 = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "StationOffsetElevationToXYZ", null, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target34 = Curve.ctor.pSite35.Target; + CallSite pSite22 = Curve.ctor.pSite35; + double[] array10 = new double[3]; + array10[0] = num; + double[] array11 = array10; + int num8 = 2; + if (Curve.ctor.pSite36 == null) + { + Curve.ctor.pSite36 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target35 = Curve.ctor.pSite36.Target; + CallSite pSite23 = Curve.ctor.pSite36; + if (Curve.ctor.pSite37 == null) + { + Curve.ctor.pSite37 = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "ElevationAt", null, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + array11[num8] = target35(pSite23, Curve.ctor.pSite37.Target(Curve.ctor.pSite37, profile, num)); + object obj4 = target34(pSite22, baseline, array10); + if (Curve.ctor.pSite38 == null) + { + Curve.ctor.pSite38 = CallSite>.Create(Binder.InvokeConstructor(CSharpBinderFlags.None, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.IsStaticType, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target36 = Curve.ctor.pSite38.Target; + CallSite pSite24 = Curve.ctor.pSite38; + Type typeFromHandle = typeof(TextPoint2D); + object arg2 = obj; + double[] array12 = new double[2]; + double[] array13 = array12; + int num9 = 0; + if (Curve.ctor.pSite39 == null) + { + Curve.ctor.pSite39 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target37 = Curve.ctor.pSite39.Target; + CallSite pSite25 = Curve.ctor.pSite39; + if (Curve.ctor.pSite3a == null) + { + Curve.ctor.pSite3a = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "StartEasting", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array13[num9] = target37(pSite25, Curve.ctor.pSite3a.Target(Curve.ctor.pSite3a, entity)); + double[] array14 = array12; + int num10 = 1; + if (Curve.ctor.pSite3b == null) + { + Curve.ctor.pSite3b = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target38 = Curve.ctor.pSite3b.Target; + CallSite pSite3b = Curve.ctor.pSite3b; + if (Curve.ctor.pSite3c == null) + { + Curve.ctor.pSite3c = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "StartNorthing", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array14[num10] = target38(pSite3b, Curve.ctor.pSite3c.Target(Curve.ctor.pSite3c, entity)); + base.Start = target36(pSite24, typeFromHandle, arg2, array12); + if (Curve.ctor.pSite3d == null) + { + Curve.ctor.pSite3d = CallSite>.Create(Binder.InvokeConstructor(CSharpBinderFlags.None, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.IsStaticType, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target39 = Curve.ctor.pSite3d.Target; + CallSite pSite3d = Curve.ctor.pSite3d; + Type typeFromHandle2 = typeof(TextPoint2D); + object arg3 = obj2; + double[] array15 = new double[2]; + double[] array16 = array15; + int num11 = 0; + if (Curve.ctor.pSite3e == null) + { + Curve.ctor.pSite3e = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target40 = Curve.ctor.pSite3e.Target; + CallSite pSite3e = Curve.ctor.pSite3e; + if (Curve.ctor.pSite3f == null) + { + Curve.ctor.pSite3f = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "EndEasting", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array16[num11] = target40(pSite3e, Curve.ctor.pSite3f.Target(Curve.ctor.pSite3f, entity)); + double[] array17 = array15; + int num12 = 1; + if (Curve.ctor.pSite40 == null) + { + Curve.ctor.pSite40 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target41 = Curve.ctor.pSite40.Target; + CallSite pSite26 = Curve.ctor.pSite40; + if (Curve.ctor.pSite41 == null) + { + Curve.ctor.pSite41 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "EndNorthing", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array17[num12] = target41(pSite26, Curve.ctor.pSite41.Target(Curve.ctor.pSite41, entity)); + base.End = target39(pSite3d, typeFromHandle2, arg3, array15); + if (Curve.ctor.pSite42 == null) + { + Curve.ctor.pSite42 = CallSite>.Create(Binder.InvokeConstructor(CSharpBinderFlags.None, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.IsStaticType, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target42 = Curve.ctor.pSite42.Target; + CallSite pSite27 = Curve.ctor.pSite42; + Type typeFromHandle3 = typeof(TextPoint2D); + object arg4 = obj3; + double[] array18 = new double[2]; + double[] array19 = array18; + int num13 = 0; + if (Curve.ctor.pSite43 == null) + { + Curve.ctor.pSite43 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target43 = Curve.ctor.pSite43.Target; + CallSite pSite28 = Curve.ctor.pSite43; + if (Curve.ctor.pSite44 == null) + { + Curve.ctor.pSite44 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "PIEasting", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array19[num13] = target43(pSite28, Curve.ctor.pSite44.Target(Curve.ctor.pSite44, entity)); + double[] array20 = array18; + int num14 = 1; + if (Curve.ctor.pSite45 == null) + { + Curve.ctor.pSite45 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target44 = Curve.ctor.pSite45.Target; + CallSite pSite29 = Curve.ctor.pSite45; + if (Curve.ctor.pSite46 == null) + { + Curve.ctor.pSite46 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "PINorthing", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array20[num14] = target44(pSite29, Curve.ctor.pSite46.Target(Curve.ctor.pSite46, entity)); + this.PI = target42(pSite27, typeFromHandle3, arg4, array18); + if (Curve.ctor.pSite47 == null) + { + Curve.ctor.pSite47 = CallSite>.Create(Binder.InvokeConstructor(CSharpBinderFlags.None, typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.IsStaticType, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target45 = Curve.ctor.pSite47.Target; + CallSite pSite30 = Curve.ctor.pSite47; + Type typeFromHandle4 = typeof(TextPoint2D); + object arg5 = obj4; + double[] array21 = new double[2]; + double[] array22 = array21; + int num15 = 0; + if (Curve.ctor.pSite48 == null) + { + Curve.ctor.pSite48 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target46 = Curve.ctor.pSite48.Target; + CallSite pSite31 = Curve.ctor.pSite48; + if (Curve.ctor.pSite49 == null) + { + Curve.ctor.pSite49 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "CenterEasting", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array22[num15] = target46(pSite31, Curve.ctor.pSite49.Target(Curve.ctor.pSite49, entity)); + double[] array23 = array21; + int num16 = 1; + if (Curve.ctor.pSite4a == null) + { + Curve.ctor.pSite4a = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Curve))); + } + Func target47 = Curve.ctor.pSite4a.Target; + CallSite pSite4a = Curve.ctor.pSite4a; + if (Curve.ctor.pSite4b == null) + { + Curve.ctor.pSite4b = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "CenterNorthing", typeof(Curve), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array23[num16] = target47(pSite4a, Curve.ctor.pSite4b.Target(Curve.ctor.pSite4b, entity)); + this.Center = target45(pSite30, typeFromHandle4, arg5, array21); + while (this.DirStart < 0.0) + { + this.DirStart += 360.0; + } + while (this.DirStart >= 360.0) + { + this.DirStart -= 360.0; + } + while (this.DirEnd < 0.0) + { + this.DirStart += 360.0; + } + while (this.DirEnd >= 360.0) + { + this.DirStart -= 360.0; + } + this.Delta = this.DirEnd - this.DirStart; + } + + // Token: 0x17000030 RID: 48 + // (get) Token: 0x060000B2 RID: 178 RVA: 0x000056C7 File Offset: 0x000038C7 + // (set) Token: 0x060000B3 RID: 179 RVA: 0x000056CF File Offset: 0x000038CF + [XmlAttribute("tangent")] + public double Tangent { get; set; } + + // Token: 0x17000031 RID: 49 + // (get) Token: 0x060000B4 RID: 180 RVA: 0x000056D8 File Offset: 0x000038D8 + // (set) Token: 0x060000B5 RID: 181 RVA: 0x000056E0 File Offset: 0x000038E0 + [XmlAttribute("radius")] + public double Radius { get; set; } + + // Token: 0x17000032 RID: 50 + // (get) Token: 0x060000B6 RID: 182 RVA: 0x000056E9 File Offset: 0x000038E9 + // (set) Token: 0x060000B7 RID: 183 RVA: 0x000056F1 File Offset: 0x000038F1 + [XmlAttribute("midOrd")] + public double MidOrd { get; set; } + + // Token: 0x17000033 RID: 51 + // (get) Token: 0x060000B8 RID: 184 RVA: 0x000056FA File Offset: 0x000038FA + // (set) Token: 0x060000B9 RID: 185 RVA: 0x00005702 File Offset: 0x00003902 + [XmlAttribute("external")] + public double External { get; set; } + + // Token: 0x17000034 RID: 52 + // (get) Token: 0x060000BA RID: 186 RVA: 0x0000570B File Offset: 0x0000390B + // (set) Token: 0x060000BB RID: 187 RVA: 0x00005713 File Offset: 0x00003913 + [XmlAttribute("dirStart")] + public double DirStart { get; set; } + + // Token: 0x17000035 RID: 53 + // (get) Token: 0x060000BC RID: 188 RVA: 0x0000571C File Offset: 0x0000391C + // (set) Token: 0x060000BD RID: 189 RVA: 0x00005724 File Offset: 0x00003924 + [XmlAttribute("dirEnd")] + public double DirEnd { get; set; } + + // Token: 0x17000036 RID: 54 + // (get) Token: 0x060000BE RID: 190 RVA: 0x0000572D File Offset: 0x0000392D + // (set) Token: 0x060000BF RID: 191 RVA: 0x00005735 File Offset: 0x00003935 + [XmlAttribute("delta")] + public double Delta { get; set; } + + // Token: 0x17000037 RID: 55 + // (get) Token: 0x060000C0 RID: 192 RVA: 0x0000573E File Offset: 0x0000393E + // (set) Token: 0x060000C1 RID: 193 RVA: 0x00005746 File Offset: 0x00003946 + [XmlAttribute("chord")] + public double Chord { get; set; } + + // Token: 0x17000038 RID: 56 + // (get) Token: 0x060000C2 RID: 194 RVA: 0x0000574F File Offset: 0x0000394F + // (set) Token: 0x060000C3 RID: 195 RVA: 0x00005757 File Offset: 0x00003957 + [XmlAttribute("rot")] + public string Rot { get; set; } + + // Token: 0x17000039 RID: 57 + // (get) Token: 0x060000C4 RID: 196 RVA: 0x00005760 File Offset: 0x00003960 + // (set) Token: 0x060000C5 RID: 197 RVA: 0x00005768 File Offset: 0x00003968 + [XmlAttribute("crvType")] + public string CrvType { get; set; } + + // Token: 0x1700003A RID: 58 + // (get) Token: 0x060000C6 RID: 198 RVA: 0x00005771 File Offset: 0x00003971 + // (set) Token: 0x060000C7 RID: 199 RVA: 0x0000577F File Offset: 0x0000397F + [XmlElement("Center")] + public TextPoint2D Center + { + get + { + return base._points[2]; + } + set + { + base._points[2] = value; + } + } + + // Token: 0x1700003B RID: 59 + // (get) Token: 0x060000C8 RID: 200 RVA: 0x0000578E File Offset: 0x0000398E + // (set) Token: 0x060000C9 RID: 201 RVA: 0x0000579C File Offset: 0x0000399C + [XmlElement("PI")] + public TextPoint2D PI + { + get + { + return base._points[3]; + } + set + { + base._points[3] = value; + } + } + + // Token: 0x060000CA RID: 202 RVA: 0x000057AB File Offset: 0x000039AB + public override double GetDirectionAtPoint(double station) + { + if (station == base.Length) + { + return this.DirEnd; + } + if (station == 0.0) + { + return this.DirStart; + } + return this.DirStart + this.Delta * station / base.Length; + } + + // Token: 0x02000060 RID: 96 + [CompilerGenerated] + private static class ctor + { + // Token: 0x04000173 RID: 371 + public static CallSite> pSite1; + + // Token: 0x04000174 RID: 372 + public static CallSite> pSite2; + + // Token: 0x04000175 RID: 373 + public static CallSite> pSite3; + + // Token: 0x04000176 RID: 374 + public static CallSite> pSite4; + + // Token: 0x04000177 RID: 375 + public static CallSite> pSite5; + + // Token: 0x04000178 RID: 376 + public static CallSite> pSite6; + + // Token: 0x04000179 RID: 377 + public static CallSite> pSite7; + + // Token: 0x0400017A RID: 378 + public static CallSite> pSite8; + + // Token: 0x0400017B RID: 379 + public static CallSite> pSite9; + + // Token: 0x0400017C RID: 380 + public static CallSite> pSitea; + + // Token: 0x0400017D RID: 381 + public static CallSite> pSiteb; + + // Token: 0x0400017E RID: 382 + public static CallSite> pSitec; + + // Token: 0x0400017F RID: 383 + public static CallSite> pSited; + + // Token: 0x04000180 RID: 384 + public static CallSite> pSitee; + + // Token: 0x04000181 RID: 385 + public static CallSite> pSitef; + + // Token: 0x04000182 RID: 386 + public static CallSite> pSite10; + + // Token: 0x04000183 RID: 387 + public static CallSite> pSite11; + + // Token: 0x04000184 RID: 388 + public static CallSite> pSite12; + + // Token: 0x04000185 RID: 389 + public static CallSite> pSite13; + + // Token: 0x04000186 RID: 390 + public static CallSite> pSite14; + + // Token: 0x04000187 RID: 391 + public static CallSite> pSite15; + + // Token: 0x04000188 RID: 392 + public static CallSite> pSite16; + + // Token: 0x04000189 RID: 393 + public static CallSite> pSite17; + + // Token: 0x0400018A RID: 394 + public static CallSite> pSite18; + + // Token: 0x0400018B RID: 395 + public static CallSite> pSite19; + + // Token: 0x0400018C RID: 396 + public static CallSite> pSite1a; + + // Token: 0x0400018D RID: 397 + public static CallSite> pSite1b; + + // Token: 0x0400018E RID: 398 + public static CallSite> pSite1c; + + // Token: 0x0400018F RID: 399 + public static CallSite> pSite1d; + + // Token: 0x04000190 RID: 400 + public static CallSite> pSite1e; + + // Token: 0x04000191 RID: 401 + public static CallSite> pSite1f; + + // Token: 0x04000192 RID: 402 + public static CallSite> pSite20; + + // Token: 0x04000193 RID: 403 + public static CallSite> pSite21; + + // Token: 0x04000194 RID: 404 + public static CallSite> pSite22; + + // Token: 0x04000195 RID: 405 + public static CallSite> pSite23; + + // Token: 0x04000196 RID: 406 + public static CallSite> pSite24; + + // Token: 0x04000197 RID: 407 + public static CallSite> pSite25; + + // Token: 0x04000198 RID: 408 + public static CallSite> pSite26; + + // Token: 0x04000199 RID: 409 + public static CallSite> pSite27; + + // Token: 0x0400019A RID: 410 + public static CallSite> pSite28; + + // Token: 0x0400019B RID: 411 + public static CallSite> pSite29; + + // Token: 0x0400019C RID: 412 + public static CallSite> pSite2a; + + // Token: 0x0400019D RID: 413 + public static CallSite> pSite2b; + + // Token: 0x0400019E RID: 414 + public static CallSite> pSite2c; + + // Token: 0x0400019F RID: 415 + public static CallSite> pSite2d; + + // Token: 0x040001A0 RID: 416 + public static CallSite> pSite2e; + + // Token: 0x040001A1 RID: 417 + public static CallSite> pSite2f; + + // Token: 0x040001A2 RID: 418 + public static CallSite> pSite30; + + // Token: 0x040001A3 RID: 419 + public static CallSite> pSite31; + + // Token: 0x040001A4 RID: 420 + public static CallSite> pSite32; + + // Token: 0x040001A5 RID: 421 + public static CallSite> pSite33; + + // Token: 0x040001A6 RID: 422 + public static CallSite> pSite34; + + // Token: 0x040001A7 RID: 423 + public static CallSite> pSite35; + + // Token: 0x040001A8 RID: 424 + public static CallSite> pSite36; + + // Token: 0x040001A9 RID: 425 + public static CallSite> pSite37; + + // Token: 0x040001AA RID: 426 + public static CallSite> pSite38; + + // Token: 0x040001AB RID: 427 + public static CallSite> pSite39; + + // Token: 0x040001AC RID: 428 + public static CallSite> pSite3a; + + // Token: 0x040001AD RID: 429 + public static CallSite> pSite3b; + + // Token: 0x040001AE RID: 430 + public static CallSite> pSite3c; + + // Token: 0x040001AF RID: 431 + public static CallSite> pSite3d; + + // Token: 0x040001B0 RID: 432 + public static CallSite> pSite3e; + + // Token: 0x040001B1 RID: 433 + public static CallSite> pSite3f; + + // Token: 0x040001B2 RID: 434 + public static CallSite> pSite40; + + // Token: 0x040001B3 RID: 435 + public static CallSite> pSite41; + + // Token: 0x040001B4 RID: 436 + public static CallSite> pSite42; + + // Token: 0x040001B5 RID: 437 + public static CallSite> pSite43; + + // Token: 0x040001B6 RID: 438 + public static CallSite> pSite44; + + // Token: 0x040001B7 RID: 439 + public static CallSite> pSite45; + + // Token: 0x040001B8 RID: 440 + public static CallSite> pSite46; + + // Token: 0x040001B9 RID: 441 + public static CallSite> pSite47; + + // Token: 0x040001BA RID: 442 + public static CallSite> pSite48; + + // Token: 0x040001BB RID: 443 + public static CallSite> pSite49; + + // Token: 0x040001BC RID: 444 + public static CallSite> pSite4a; + + // Token: 0x040001BD RID: 445 + public static CallSite> pSite4b; + } + } +} diff --git a/CorridorModel/Definition.cs b/CorridorModel/Definition.cs new file mode 100644 index 0000000..113f5d8 --- /dev/null +++ b/CorridorModel/Definition.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000035 RID: 53 + [XmlType("Definition")] + [Serializable] + public class Definition + { + // Token: 0x170000EF RID: 239 + // (get) Token: 0x060002E2 RID: 738 RVA: 0x0000B742 File Offset: 0x00009942 + // (set) Token: 0x060002E3 RID: 739 RVA: 0x0000B74A File Offset: 0x0000994A + [XmlAttribute("elevMin")] + public double ElevationMin { get; set; } + + // Token: 0x170000F0 RID: 240 + // (get) Token: 0x060002E4 RID: 740 RVA: 0x0000B753 File Offset: 0x00009953 + // (set) Token: 0x060002E5 RID: 741 RVA: 0x0000B75B File Offset: 0x0000995B + [XmlAttribute("elevMax")] + public double ElevationMax { get; set; } + + // Token: 0x170000F1 RID: 241 + // (get) Token: 0x060002E6 RID: 742 RVA: 0x0000B764 File Offset: 0x00009964 + // (set) Token: 0x060002E7 RID: 743 RVA: 0x0000B76C File Offset: 0x0000996C + [XmlAttribute("area3DSurf")] + public double Area3DSurface { get; set; } + + // Token: 0x170000F2 RID: 242 + // (get) Token: 0x060002E8 RID: 744 RVA: 0x0000B775 File Offset: 0x00009975 + // (set) Token: 0x060002E9 RID: 745 RVA: 0x0000B77D File Offset: 0x0000997D + [XmlAttribute("area2DSurf")] + public double Area2DSurface { get; set; } + + // Token: 0x170000F3 RID: 243 + // (get) Token: 0x060002EA RID: 746 RVA: 0x0000B786 File Offset: 0x00009986 + // (set) Token: 0x060002EB RID: 747 RVA: 0x0000B78E File Offset: 0x0000998E + [XmlAttribute("surfType")] + public string SurfaceType { get; set; } + + // Token: 0x170000F4 RID: 244 + // (get) Token: 0x060002EC RID: 748 RVA: 0x0000B797 File Offset: 0x00009997 + // (set) Token: 0x060002ED RID: 749 RVA: 0x0000B79F File Offset: 0x0000999F + [XmlArray("Pnts")] + public List Points { get; set; } + + // Token: 0x170000F5 RID: 245 + // (get) Token: 0x060002EE RID: 750 RVA: 0x0000B7A8 File Offset: 0x000099A8 + // (set) Token: 0x060002EF RID: 751 RVA: 0x0000B7B0 File Offset: 0x000099B0 + [XmlArray("Faces")] + public List Faces { get; set; } + + // Token: 0x060002F0 RID: 752 RVA: 0x0000B7B9 File Offset: 0x000099B9 + public Definition() + { + this.Points = new List(); + this.Faces = new List(); + } + } +} diff --git a/CorridorModel/DefinitionMode.cs b/CorridorModel/DefinitionMode.cs new file mode 100644 index 0000000..182b275 --- /dev/null +++ b/CorridorModel/DefinitionMode.cs @@ -0,0 +1,15 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200002A RID: 42 + [XmlType("DefinitionMode")] + public enum DefinitionMode + { + // Token: 0x04000098 RID: 152 + AllCrossSectionsInRegion, + // Token: 0x04000099 RID: 153 + OnlyContainedOrClosestCrossSections + } +} diff --git a/CorridorModel/DesignShape.cs b/CorridorModel/DesignShape.cs new file mode 100644 index 0000000..b0d6f07 --- /dev/null +++ b/CorridorModel/DesignShape.cs @@ -0,0 +1,388 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Xml.Serialization; +using CorridorModel.Interfaces; + +namespace CorridorModel +{ + // Token: 0x02000023 RID: 35 + [XmlType("DesignCrossSectSurf")] + [Serializable] + public class DesignShape : ObjectWithNameSideSegmentPart, IComparableStructure + { + // Token: 0x0600020E RID: 526 RVA: 0x0000A077 File Offset: 0x00008277 + public DesignShape() + { + this.CrossSectionPoints = new List(); + this.Import = true; + } + + // Token: 0x0600020F RID: 527 RVA: 0x0000A094 File Offset: 0x00008294 + public DesignShape(DesignShape refShape) : base(refShape) + { + this.CrossSectionPoints = new List(refShape.CrossSectionPoints); + this.SurfaceID = refShape.SurfaceID; + this.Area = refShape.Area; + this.ClosedArea = refShape.ClosedArea; + this.BorderColorARGB = refShape.BorderColorARGB; + this.FillColorARGB = refShape.FillColorARGB; + this.Import = refShape.Import; + } + + // Token: 0x170000A7 RID: 167 + // (get) Token: 0x06000210 RID: 528 RVA: 0x0000A101 File Offset: 0x00008301 + // (set) Token: 0x06000211 RID: 529 RVA: 0x0000A109 File Offset: 0x00008309 + [XmlElement("CrossSectPnt")] + public List CrossSectionPoints { get; set; } + + // Token: 0x170000A8 RID: 168 + // (get) Token: 0x06000212 RID: 530 RVA: 0x0000A112 File Offset: 0x00008312 + // (set) Token: 0x06000213 RID: 531 RVA: 0x0000A11A File Offset: 0x0000831A + [XmlAttribute("closedArea")] + public bool ClosedArea { get; set; } + + // Token: 0x170000A9 RID: 169 + // (get) Token: 0x06000214 RID: 532 RVA: 0x0000A123 File Offset: 0x00008323 + // (set) Token: 0x06000215 RID: 533 RVA: 0x0000A12B File Offset: 0x0000832B + [XmlAttribute("area")] + public double Area { get; set; } + + // Token: 0x170000AA RID: 170 + // (get) Token: 0x06000216 RID: 534 RVA: 0x0000A134 File Offset: 0x00008334 + // (set) Token: 0x06000217 RID: 535 RVA: 0x0000A13C File Offset: 0x0000833C + [XmlAttribute("bARGB")] + public int BorderColorARGB { get; set; } + + // Token: 0x170000AB RID: 171 + // (get) Token: 0x06000218 RID: 536 RVA: 0x0000A145 File Offset: 0x00008345 + // (set) Token: 0x06000219 RID: 537 RVA: 0x0000A14D File Offset: 0x0000834D + [XmlAttribute("fARGB")] + public int FillColorARGB { get; set; } + + // Token: 0x170000AC RID: 172 + // (get) Token: 0x0600021A RID: 538 RVA: 0x0000A156 File Offset: 0x00008356 + // (set) Token: 0x0600021B RID: 539 RVA: 0x0000A15E File Offset: 0x0000835E + [XmlAttribute("import")] + public bool Import { get; set; } + + // Token: 0x170000AD RID: 173 + // (get) Token: 0x0600021C RID: 540 RVA: 0x0000A167 File Offset: 0x00008367 + // (set) Token: 0x0600021D RID: 541 RVA: 0x0000A16F File Offset: 0x0000836F + [XmlAttribute("surfID")] + public string SurfaceID { get; set; } + + // Token: 0x170000AE RID: 174 + // (get) Token: 0x0600021E RID: 542 RVA: 0x0000A180 File Offset: 0x00008380 + [XmlIgnore] + public IEnumerable PointCodes + { + get + { + return from item in this.CrossSectionPoints + select item.Code; + } + } + + // Token: 0x170000AF RID: 175 + // (get) Token: 0x0600021F RID: 543 RVA: 0x0000A1AC File Offset: 0x000083AC + [XmlIgnore] + public string PointCodesFlat + { + get + { + string text = string.Empty; + foreach (string str in this.PointCodes) + { + text = text + str + " "; + } + return text; + } + } + + // Token: 0x170000B0 RID: 176 + // (get) Token: 0x06000220 RID: 544 RVA: 0x0000A208 File Offset: 0x00008408 + // (set) Token: 0x06000221 RID: 545 RVA: 0x0000A210 File Offset: 0x00008410 + [XmlIgnore] + public CrossSection CrossSection { get; internal set; } + + // Token: 0x170000B1 RID: 177 + // (get) Token: 0x06000222 RID: 546 RVA: 0x0000A219 File Offset: 0x00008419 + [XmlIgnore] + public double Station + { + get + { + if (!(this.CrossSection != null)) + { + return double.NaN; + } + return this.CrossSection.Station; + } + } + + // Token: 0x06000223 RID: 547 RVA: 0x0000A23E File Offset: 0x0000843E + public int IndexOf(CrossSectionPoint item) + { + return this.CrossSectionPoints.IndexOf(item); + } + + // Token: 0x06000224 RID: 548 RVA: 0x0000A24C File Offset: 0x0000844C + public void Insert(int index, CrossSectionPoint item) + { + this.CrossSectionPoints.Insert(index, item); + } + + // Token: 0x06000225 RID: 549 RVA: 0x0000A25B File Offset: 0x0000845B + public void RemoveAt(int index) + { + this.CrossSectionPoints.RemoveAt(index); + } + + // Token: 0x170000B2 RID: 178 + public CrossSectionPoint this[int index] + { + get + { + if (index < this.CrossSectionPoints.Count) + { + return this.CrossSectionPoints[index]; + } + throw new IndexOutOfRangeException(); + } + set + { + if (index < this.CrossSectionPoints.Count) + { + this.CrossSectionPoints[index] = value; + return; + } + if (index == this.CrossSectionPoints.Count) + { + this.CrossSectionPoints.Add(value); + return; + } + throw new IndexOutOfRangeException(); + } + } + + // Token: 0x06000228 RID: 552 RVA: 0x0000A2C9 File Offset: 0x000084C9 + public void Add(CrossSectionPoint item) + { + this.CrossSectionPoints.Add(item); + } + + // Token: 0x06000229 RID: 553 RVA: 0x0000A2D7 File Offset: 0x000084D7 + public void Clear() + { + this.CrossSectionPoints.Clear(); + } + + // Token: 0x0600022A RID: 554 RVA: 0x0000A2E4 File Offset: 0x000084E4 + public bool Contains(CrossSectionPoint item) + { + return this.CrossSectionPoints.Contains(item); + } + + // Token: 0x0600022B RID: 555 RVA: 0x0000A2F2 File Offset: 0x000084F2 + public void CopyTo(CrossSectionPoint[] array, int arrayIndex) + { + this.CrossSectionPoints.CopyTo(array, arrayIndex); + } + + // Token: 0x170000B3 RID: 179 + // (get) Token: 0x0600022C RID: 556 RVA: 0x0000A301 File Offset: 0x00008501 + public int Count + { + get + { + return this.CrossSectionPoints.Count; + } + } + + // Token: 0x170000B4 RID: 180 + // (get) Token: 0x0600022D RID: 557 RVA: 0x0000A30E File Offset: 0x0000850E + public bool IsReadOnly + { + get + { + return false; + } + } + + // Token: 0x0600022E RID: 558 RVA: 0x0000A311 File Offset: 0x00008511 + public bool Remove(CrossSectionPoint item) + { + return this.CrossSectionPoints.Remove(item); + } + + // Token: 0x0600022F RID: 559 RVA: 0x0000A31F File Offset: 0x0000851F + public IEnumerator GetEnumerator() + { + return this.CrossSectionPoints.GetEnumerator(); + } + + // Token: 0x06000230 RID: 560 RVA: 0x0000A354 File Offset: 0x00008554 + public void SetSide() + { + if (this.Count > 0) + { + Side side; + if (this.CrossSectionPoints.Count((CrossSectionPoint p) => p.First == 0.0) != this.Count) + { + if (this.CrossSectionPoints.Max((CrossSectionPoint p) => p.First) > 0.0) + { + side = ((this.CrossSectionPoints.Min((CrossSectionPoint p) => p.First) >= 0.0) ? Side.Right : Side.Both); + } + else + { + side = Side.Left; + } + } + else + { + side = Side.Both; + } + base.Side = side; + } + } + + // Token: 0x06000231 RID: 561 RVA: 0x0000A450 File Offset: 0x00008650 + public IEnumerable GetPointCodes(Side side) + { + if (side == Side.Left) + { + return (from item in this.CrossSectionPoints + where item.First <= 0.0 + select item.Code).Distinct(); + } + if (side == Side.Right) + { + return (from item in this.CrossSectionPoints + where item.First >= 0.0 + select item.Code).Distinct(); + } + return this.PointCodes.Distinct(); + } + + // Token: 0x06000232 RID: 562 RVA: 0x0000A510 File Offset: 0x00008710 + public bool NameSideEquals(DesignShape ds) + { + return ds.Name == base.Name && ds.Part == base.Part && ds.Side == base.Side; + } + + // Token: 0x06000233 RID: 563 RVA: 0x0000A543 File Offset: 0x00008743 + public bool NameSideSegmentEquals(DesignShape ds) + { + return this.NameSideEquals(ds) && ds.Segment == base.Segment; + } + + // Token: 0x06000234 RID: 564 RVA: 0x0000A5B8 File Offset: 0x000087B8 + public void SetSegment(CrossSection thisSection, CrossSection prevSection) + { + bool flag = true; + if (prevSection != null) + { + string pcf = this.PointCodesFlat; + base.Segment = thisSection.DesignShapes.Count((DesignShape ds) => ds.NameSideEquals(this)); + DesignShape designShape = (from ds in prevSection.DesignShapes + where ds.NameSideEquals(this) && ds.PointCodesFlat == pcf + orderby Math.Abs(ds.Segment - base.Segment) + select ds).FirstOrDefault(); + if (designShape != null) + { + base.Segment = designShape.Segment; + flag = false; + } + } + if (flag || thisSection.DesignShapes.Count((DesignShape ds) => ds.NameSideSegmentEquals(this)) > 0) + { + base.Segment = thisSection.DesignShapes.Count((DesignShape ds) => ds.NameSideEquals(this)); + } + } + + // Token: 0x06000235 RID: 565 RVA: 0x0000A6A0 File Offset: 0x000088A0 + public bool SetClosedArea() + { + if (this.CrossSectionPoints.Count > 3) + { + return this.ClosedArea = (this.CrossSectionPoints.LastIndexOf(this.CrossSectionPoints.First()) > 0); + } + return this.ClosedArea = false; + } + + // Token: 0x06000236 RID: 566 RVA: 0x0000A6E8 File Offset: 0x000088E8 + public void SetArea() + { + this.Area = 0.0; + if (this.ClosedArea) + { + int num = this.CrossSectionPoints.LastIndexOf(this.CrossSectionPoints.First()) + 1; + for (int i = 0; i < num; i++) + { + int index = (i + 1) % num; + this.Area += this.CrossSectionPoints[i].First * this.CrossSectionPoints[index].Second - this.CrossSectionPoints[index].First * this.CrossSectionPoints[i].Second; + } + this.Area /= 2.0; + } + } + + // Token: 0x06000237 RID: 567 RVA: 0x0000A7A4 File Offset: 0x000089A4 + public void UpdatePointDependentData() + { + this.SetSide(); + this.SetClosedArea(); + this.SetArea(); + } + + // Token: 0x06000238 RID: 568 RVA: 0x0000A7BC File Offset: 0x000089BC + public void Transform(GeometryTransformations transformations) + { + foreach (CrossSectionPoint crossSectionPoint in this.CrossSectionPoints) + { + crossSectionPoint.Transform(transformations, false); + } + } + + // Token: 0x06000239 RID: 569 RVA: 0x0000A810 File Offset: 0x00008A10 + public override bool Equals(object obj) + { + return this.Equals(obj as DesignShape); + } + + // Token: 0x0600023A RID: 570 RVA: 0x0000A81E File Offset: 0x00008A1E + public bool Equals(DesignShape shape) + { + return !object.ReferenceEquals(shape, null) && !this.DifferentItem(shape) && !this.DifferentDescendants(shape); + } + + // Token: 0x0600023B RID: 571 RVA: 0x0000A842 File Offset: 0x00008A42 + public override int GetHashCode() + { + return base.GetHashCode(); + } + + // Token: 0x0600023C RID: 572 RVA: 0x0000A84A File Offset: 0x00008A4A + public bool DifferentItem(DesignShape shape) + { + return this.Station != shape.Station || this.Area != shape.Area; + } + + // Token: 0x0600023D RID: 573 RVA: 0x0000A870 File Offset: 0x00008A70 + public bool DifferentDescendants(DesignShape shape) + { + if (this.CrossSectionPoints.Count == shape.CrossSectionPoints.Count) + { + for (int i = 0; i < this.CrossSectionPoints.Count; i++) + { + if (!this.CrossSectionPoints[i].Equals(shape.CrossSectionPoints[i])) + { + return true; + } + } + return false; + } + return true; + } + } +} diff --git a/CorridorModel/DesignSpeed.cs b/CorridorModel/DesignSpeed.cs new file mode 100644 index 0000000..be27aed --- /dev/null +++ b/CorridorModel/DesignSpeed.cs @@ -0,0 +1,35 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000036 RID: 54 + [XmlType("DesignSpeed")] + [Serializable] + public class DesignSpeed + { + // Token: 0x170000F6 RID: 246 + // (get) Token: 0x060002F1 RID: 753 RVA: 0x0000B7D7 File Offset: 0x000099D7 + // (set) Token: 0x060002F2 RID: 754 RVA: 0x0000B7DF File Offset: 0x000099DF + [XmlAttribute("staStart")] + public double staStart { get; set; } + + // Token: 0x170000F7 RID: 247 + // (get) Token: 0x060002F3 RID: 755 RVA: 0x0000B7E8 File Offset: 0x000099E8 + // (set) Token: 0x060002F4 RID: 756 RVA: 0x0000B7F0 File Offset: 0x000099F0 + [XmlAttribute("speed")] + public double speed { get; set; } + + // Token: 0x170000F8 RID: 248 + // (get) Token: 0x060002F5 RID: 757 RVA: 0x0000B7F9 File Offset: 0x000099F9 + // (set) Token: 0x060002F6 RID: 758 RVA: 0x0000B801 File Offset: 0x00009A01 + [XmlAttribute("speedNumber")] + public int speedNumber { get; set; } + + // Token: 0x170000F9 RID: 249 + // (get) Token: 0x060002F7 RID: 759 RVA: 0x0000B80A File Offset: 0x00009A0A + // (set) Token: 0x060002F8 RID: 760 RVA: 0x0000B812 File Offset: 0x00009A12 + [XmlAttribute("comment")] + public string comment { get; set; } + } +} diff --git a/CorridorModel/DiameterUnit.cs b/CorridorModel/DiameterUnit.cs new file mode 100644 index 0000000..f6641c0 --- /dev/null +++ b/CorridorModel/DiameterUnit.cs @@ -0,0 +1,29 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x02000042 RID: 66 + public enum DiameterUnit + { + // Token: 0x040000FD RID: 253 + meter, + // Token: 0x040000FE RID: 254 + millimeter, + // Token: 0x040000FF RID: 255 + centimeter, + // Token: 0x04000100 RID: 256 + decimeter, + // Token: 0x04000101 RID: 257 + kilometer, + // Token: 0x04000102 RID: 258 + inch, + // Token: 0x04000103 RID: 259 + foot, + // Token: 0x04000104 RID: 260 + yard, + // Token: 0x04000105 RID: 261 + mile, + // Token: 0x04000106 RID: 262 + USSurveyFoot + } +} diff --git a/CorridorModel/DirectionUnit.cs b/CorridorModel/DirectionUnit.cs new file mode 100644 index 0000000..3891a7d --- /dev/null +++ b/CorridorModel/DirectionUnit.cs @@ -0,0 +1,15 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x02000041 RID: 65 + public enum DirectionUnit + { + // Token: 0x040000F9 RID: 249 + decimal_degrees, + // Token: 0x040000FA RID: 250 + grads, + // Token: 0x040000FB RID: 251 + radians + } +} diff --git a/CorridorModel/ElementModel.cs b/CorridorModel/ElementModel.cs new file mode 100644 index 0000000..6daf46a --- /dev/null +++ b/CorridorModel/ElementModel.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + [XmlType("Element")] + [Serializable] + public class ElementModel : ShapeModel + { + public ElementModel() + { + this.Holes = new List(); + } + + [XmlElement("Hole")] + public List Holes; + } +} diff --git a/CorridorModel/Face.cs b/CorridorModel/Face.cs new file mode 100644 index 0000000..c32e504 --- /dev/null +++ b/CorridorModel/Face.cs @@ -0,0 +1,12 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000037 RID: 55 + [XmlType("F")] + [Serializable] + public class Face + { + } +} diff --git a/CorridorModel/FeatureLine.cs b/CorridorModel/FeatureLine.cs new file mode 100644 index 0000000..b014972 --- /dev/null +++ b/CorridorModel/FeatureLine.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200000B RID: 11 + [XmlType("FeatureLine")] + [Serializable] + public class FeatureLine + { + // Token: 0x060000CB RID: 203 RVA: 0x000057E6 File Offset: 0x000039E6 + public FeatureLine() + { + this.Points = new List(); + } + + // Token: 0x1700003C RID: 60 + // (get) Token: 0x060000CC RID: 204 RVA: 0x000057F9 File Offset: 0x000039F9 + // (set) Token: 0x060000CD RID: 205 RVA: 0x00005801 File Offset: 0x00003A01 + [XmlAttribute("type")] + public LineType Type { get; set; } + + // Token: 0x1700003D RID: 61 + // (get) Token: 0x060000CE RID: 206 RVA: 0x0000580A File Offset: 0x00003A0A + // (set) Token: 0x060000CF RID: 207 RVA: 0x00005812 File Offset: 0x00003A12 + [XmlAttribute("name")] + public string CodeName { get; set; } + + // Token: 0x1700003E RID: 62 + // (get) Token: 0x060000D0 RID: 208 RVA: 0x0000581B File Offset: 0x00003A1B + // (set) Token: 0x060000D1 RID: 209 RVA: 0x00005823 File Offset: 0x00003A23 + [XmlElement("Point")] + public List Points { get; set; } + + // Token: 0x1700003F RID: 63 + // (get) Token: 0x060000D2 RID: 210 RVA: 0x0000582C File Offset: 0x00003A2C + // (set) Token: 0x060000D3 RID: 211 RVA: 0x00005834 File Offset: 0x00003A34 + [XmlAttribute("colorARGB")] + public int ColorARGB { get; set; } + + // Token: 0x17000040 RID: 64 + // (get) Token: 0x060000D4 RID: 212 RVA: 0x0000583D File Offset: 0x00003A3D + // (set) Token: 0x060000D5 RID: 213 RVA: 0x00005845 File Offset: 0x00003A45 + [XmlAttribute("colorIndex")] + public short ColorIndex { get; set; } + } +} diff --git a/CorridorModel/FeatureLinePoint.cs b/CorridorModel/FeatureLinePoint.cs new file mode 100644 index 0000000..899acb9 --- /dev/null +++ b/CorridorModel/FeatureLinePoint.cs @@ -0,0 +1,29 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200000F RID: 15 + [XmlType("FLPoint")] + [Serializable] + public class FeatureLinePoint : TextPoint2D + { + // Token: 0x06000125 RID: 293 RVA: 0x00006C3D File Offset: 0x00004E3D + public FeatureLinePoint() + { + this.IsBreak = false; + } + + // Token: 0x06000126 RID: 294 RVA: 0x00006C4C File Offset: 0x00004E4C + public FeatureLinePoint(FeatureLinePoint source) : base(source) + { + this.IsBreak = source.IsBreak; + } + + // Token: 0x1700005B RID: 91 + // (get) Token: 0x06000127 RID: 295 RVA: 0x00006C61 File Offset: 0x00004E61 + // (set) Token: 0x06000128 RID: 296 RVA: 0x00006C69 File Offset: 0x00004E69 + [XmlAttribute("isBreak")] + public bool IsBreak { get; set; } + } +} diff --git a/CorridorModel/GenerationRange.cs b/CorridorModel/GenerationRange.cs new file mode 100644 index 0000000..780bacd --- /dev/null +++ b/CorridorModel/GenerationRange.cs @@ -0,0 +1,87 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200001C RID: 28 + [XmlType] + [Serializable] + public abstract class GenerationRange : AGenerationRange + { + // Token: 0x17000080 RID: 128 + // (get) Token: 0x06000193 RID: 403 RVA: 0x00008E5E File Offset: 0x0000705E + // (set) Token: 0x06000194 RID: 404 RVA: 0x00008E66 File Offset: 0x00007066 + [XmlAttribute("startG")] + public override double GenerationStartStation + { + get + { + return this._genStart; + } + set + { + this._genStart = value; + } + } + + // Token: 0x17000081 RID: 129 + // (get) Token: 0x06000195 RID: 405 RVA: 0x00008E6F File Offset: 0x0000706F + // (set) Token: 0x06000196 RID: 406 RVA: 0x00008E77 File Offset: 0x00007077 + [XmlAttribute("endG")] + public override double GenerationEndStation + { + get + { + return this._genEnd; + } + set + { + this._genEnd = value; + } + } + + // Token: 0x17000082 RID: 130 + // (get) Token: 0x06000197 RID: 407 RVA: 0x00008E80 File Offset: 0x00007080 + // (set) Token: 0x06000198 RID: 408 RVA: 0x00008E88 File Offset: 0x00007088 + [XmlAttribute("start")] + public override double StartStation + { + get + { + return this._start; + } + set + { + this._start = value; + } + } + + // Token: 0x17000083 RID: 131 + // (get) Token: 0x06000199 RID: 409 RVA: 0x00008E91 File Offset: 0x00007091 + // (set) Token: 0x0600019A RID: 410 RVA: 0x00008E99 File Offset: 0x00007099 + [XmlAttribute("end")] + public override double EndStation + { + get + { + return this._end; + } + set + { + this._end = value; + } + } + + // Token: 0x04000056 RID: 86 + protected double _genStart; + + // Token: 0x04000057 RID: 87 + protected double _genEnd; + + // Token: 0x04000058 RID: 88 + protected double _start; + + // Token: 0x04000059 RID: 89 + protected double _end; + } +} diff --git a/CorridorModel/GenerationRangeInstance.cs b/CorridorModel/GenerationRangeInstance.cs new file mode 100644 index 0000000..d93007d --- /dev/null +++ b/CorridorModel/GenerationRangeInstance.cs @@ -0,0 +1,36 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000028 RID: 40 + [XmlType] + [Serializable] + public abstract class GenerationRangeInstance : GenerationRange, IGenerationRangeInstance, IGenerationRange, IInstance + { + // Token: 0x06000253 RID: 595 RVA: 0x0000A90A File Offset: 0x00008B0A + protected GenerationRangeInstance() + { + this._instance = -1; + } + + // Token: 0x170000B9 RID: 185 + // (get) Token: 0x06000254 RID: 596 RVA: 0x0000A919 File Offset: 0x00008B19 + // (set) Token: 0x06000255 RID: 597 RVA: 0x0000A921 File Offset: 0x00008B21 + [XmlAttribute("i")] + public int Instance + { + get + { + return this._instance; + } + set + { + this._instance = value; + } + } + + // Token: 0x04000093 RID: 147 + protected int _instance; + } +} diff --git a/CorridorModel/GeometryTransformations.cs b/CorridorModel/GeometryTransformations.cs new file mode 100644 index 0000000..16b5d00 --- /dev/null +++ b/CorridorModel/GeometryTransformations.cs @@ -0,0 +1,407 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Media.Media3D; + +namespace CorridorModel +{ + // Token: 0x02000049 RID: 73 + public class GeometryTransformations + { + // Token: 0x17000135 RID: 309 + // (get) Token: 0x06000395 RID: 917 RVA: 0x0000D144 File Offset: 0x0000B344 + public Matrix3D Matrix + { + get + { + return this._matrix; + } + } + + // Token: 0x17000136 RID: 310 + // (get) Token: 0x06000396 RID: 918 RVA: 0x0000D14C File Offset: 0x0000B34C + public double Phi + { + get + { + return this._phi; + } + } + + // Token: 0x17000137 RID: 311 + // (get) Token: 0x06000397 RID: 919 RVA: 0x0000D154 File Offset: 0x0000B354 + public double Theta + { + get + { + return this._theta; + } + } + + // Token: 0x17000138 RID: 312 + // (get) Token: 0x06000398 RID: 920 RVA: 0x0000D15C File Offset: 0x0000B35C + public double ScaleFactor + { + get + { + return this._scale; + } + } + + // Token: 0x17000139 RID: 313 + // (get) Token: 0x06000399 RID: 921 RVA: 0x0000D164 File Offset: 0x0000B364 + public double Dx + { + get + { + return this._dx; + } + } + + // Token: 0x1700013A RID: 314 + // (get) Token: 0x0600039A RID: 922 RVA: 0x0000D16C File Offset: 0x0000B36C + public double Dy + { + get + { + return this._dy; + } + } + + // Token: 0x1700013B RID: 315 + // (get) Token: 0x0600039B RID: 923 RVA: 0x0000D174 File Offset: 0x0000B374 + public double Dz + { + get + { + return this._dz; + } + } + + // Token: 0x0600039C RID: 924 RVA: 0x0000D17C File Offset: 0x0000B37C + public GeometryTransformations() + { + this.ResetFactors(); + this._matrix = Matrix3D.Identity; + } + + // Token: 0x0600039D RID: 925 RVA: 0x0000D198 File Offset: 0x0000B398 + public void Invert() + { + this._scale = 1.0 / this._scale; + this._phi = -this._phi; + this._theta = -this._theta; + this._dx = -this._dx; + this._dy = -this._dy; + this._dz = -this._dz; + this._matrix.Invert(); + } + + // Token: 0x0600039E RID: 926 RVA: 0x0000D208 File Offset: 0x0000B408 + public void Transform(Point3D point) + { + if (!this._matrix.IsIdentity) + { + double x = point.X; + double y = point.Y; + double z = point.Z; + point.X = x * this._matrix.M11 + y * this._matrix.M21 + z * this._matrix.M31 + this._matrix.OffsetX; + point.Y = x * this._matrix.M12 + y * this._matrix.M22 + z * this._matrix.M32 + this._matrix.OffsetY; + point.Z = x * this._matrix.M13 + y * this._matrix.M23 + z * this._matrix.M33 + this._matrix.OffsetZ; + if (!this._matrix.IsAffine) + { + double num = x * this._matrix.M14 + y * this._matrix.M24 + z * this._matrix.M34 + this._matrix.M44; + point.X /= num; + point.Y /= num; + point.Z /= num; + } + } + } + + // Token: 0x0600039F RID: 927 RVA: 0x0000D358 File Offset: 0x0000B558 + protected void ResetFactors() + { + this._scale = 1.0; + this._phi = (this._theta = 0.0); + this._dx = (this._dy = (this._dz = 0.0)); + } + + // Token: 0x060003A0 RID: 928 RVA: 0x0000D3AD File Offset: 0x0000B5AD + public void Reset() + { + this.ResetFactors(); + this._matrix.SetIdentity(); + } + + // Token: 0x060003A1 RID: 929 RVA: 0x0000D3C0 File Offset: 0x0000B5C0 + public void Translation(Point3D point = null) + { + if (point != null) + { + this.Translation(point.X, point.Y, point.Z); + } + } + + // Token: 0x060003A2 RID: 930 RVA: 0x0000D3E4 File Offset: 0x0000B5E4 + public void Translation(double x = 0.0, double y = 0.0, double z = 0.0) + { + if (x != 0.0 || y != 0.0 || z != 0.0) + { + this._dx += x; + this._dy += y; + this._dz += z; + this._matrix.Translate(new Vector3D(x, y, z)); + } + } + + // Token: 0x060003A3 RID: 931 RVA: 0x0000D454 File Offset: 0x0000B654 + private void Scale(double sx, double sy, double sz) + { + if (sx != 1.0 || sy != 1.0 || sz != 1.0) + { + this._scale = double.NaN; + this._matrix.Scale(new Vector3D(sx, sy, sz)); + } + } + + // Token: 0x060003A4 RID: 932 RVA: 0x0000D4A7 File Offset: 0x0000B6A7 + public void Scale(double s = 1.0) + { + if (s != 1.0) + { + this._scale *= s; + this._matrix.Scale(new Vector3D(s, s, s)); + } + } + + // Token: 0x060003A5 RID: 933 RVA: 0x0000D4D8 File Offset: 0x0000B6D8 + public void RotatePhi(double phi = 0.0) + { + if (phi != 0.0) + { + this._matrix.Rotate(new Quaternion(new Vector3D(0.0, 0.0, 1.0), this._phi += phi * 57.295779513082323)); + } + } + + // Token: 0x060003A6 RID: 934 RVA: 0x0000D53C File Offset: 0x0000B73C + public void RotateTheta(double theta = 0.0, Point3D point = null) + { + if (theta != 0.0) + { + if (point == null) + { + point = new Point3D + { + X = 1.0, + Y = 0.0, + Z = 0.0 + }; + } + Vector3D vector = Vector3D.CrossProduct(new Vector3D(point.X, point.Y, 0.0), new Vector3D(point.X, point.Y, 1.0)); + this.Rotation(vector, this._theta += theta * 57.295779513082323); + } + } + + // Token: 0x060003A7 RID: 935 RVA: 0x0000D5F3 File Offset: 0x0000B7F3 + public void Rotation(Vector3D vector, double angle) + { + this._matrix.Rotate(new Quaternion(vector, angle)); + } + + // Token: 0x060003A8 RID: 936 RVA: 0x0000D607 File Offset: 0x0000B807 + private void Rotation(double gammaAngle, double betaAngle, double alphaAngle) + { + this.RotationX(alphaAngle); + this.RotationY(betaAngle); + this.RotationZ(gammaAngle); + } + + // Token: 0x060003A9 RID: 937 RVA: 0x0000D620 File Offset: 0x0000B820 + private void RotationZ(double gammaAngle) + { + if (gammaAngle != 0.0) + { + this._matrix.Rotate(new Quaternion(new Vector3D(0.0, 0.0, 1.0), gammaAngle * 57.295779513082323)); + } + } + + // Token: 0x060003AA RID: 938 RVA: 0x0000D674 File Offset: 0x0000B874 + private void RotationY(double betaAngle) + { + if (betaAngle != 0.0) + { + this._matrix.Rotate(new Quaternion(new Vector3D(0.0, 1.0, 0.0), betaAngle * 57.295779513082323)); + } + } + + // Token: 0x060003AB RID: 939 RVA: 0x0000D6C8 File Offset: 0x0000B8C8 + private void RotationX(double alphaAngle) + { + if (alphaAngle != 0.0) + { + this._matrix.Rotate(new Quaternion(new Vector3D(1.0, 0.0, 0.0), alphaAngle * 57.295779513082323)); + } + } + + // Token: 0x060003AC RID: 940 RVA: 0x0000D71C File Offset: 0x0000B91C + public void SetTransformations(Point3D source1, Point3D source2, Point3D destination1, Point3D destination2, double scaleDefault = 1.0, bool autoScale = true, bool resetMatrix = true) + { + Point3D point3D = source2 - source1; + Point3D point3D2 = destination2 - destination1; + Vector3D vector = new Vector3D(point3D.X, point3D.Y, point3D.Z); + Vector3D vector2 = new Vector3D(point3D2.X, point3D2.Y, point3D2.Z); + double num = Vector3D.AngleBetween(vector, vector2); + double num2 = scaleDefault; + if (autoScale) + { + num2 *= vector2.Length / vector.Length; + } + if (resetMatrix) + { + this.Reset(); + } + this._phi = (point3D2.Phi - point3D.Phi) * 57.295779513082323; + this._theta = (point3D2.Theta - point3D.Theta) * 57.295779513082323; + this.Translation(-source1.X, -source1.Y, -source1.Z); + if (num != 0.0) + { + Vector3D vector3 = Vector3D.CrossProduct(vector, vector2); + this.Rotation(vector3, num); + } + this.Scale(num2); + this.Translation(destination1.X, destination1.Y, destination1.Z); + } + + // Token: 0x060003AD RID: 941 RVA: 0x0000D830 File Offset: 0x0000BA30 + public void SetTransformations(Point3D[] source, Point3D[] destination, double scale = 1.0, bool resetMatrix = true) + { + if (resetMatrix) + { + this.Reset(); + } + else + { + this._phi = 0.0; + this._theta = 0.0; + } + Point3D point3D = source[0]; + Point3D p = destination[0]; + this.Translation(-point3D.X, -point3D.Y, -point3D.Z); + for (int i = 1; i < Math.Min(source.Length, destination.Length); i++) + { + Point3D point3D2 = source[i] - point3D; + Point3D point3D3 = destination[i] - p; + Vector3D vector = new Vector3D(point3D2.X, point3D2.Y, point3D2.Z); + Vector3D vector2 = new Vector3D(point3D3.X, point3D3.Y, point3D3.Z); + double num = Vector3D.AngleBetween(vector, vector2); + this._phi += point3D3.Phi - point3D2.Phi; + this._theta += point3D3.Theta - point3D2.Theta; + if (num != 0.0) + { + Vector3D vector3 = Vector3D.CrossProduct(vector, vector2); + this.Rotation(vector3, num); + } + } + this._phi *= 57.295779513082323; + this._theta *= 57.295779513082323; + this.Scale(scale); + this.Translation(destination[0].X, destination[0].Y, destination[0].Z); + } + + // Token: 0x060003AE RID: 942 RVA: 0x0000D9A4 File Offset: 0x0000BBA4 + public void SetTransformations(Point3D point, double phi, double theta, double scale = 1.0, bool resetMatrix = true) + { + if (resetMatrix) + { + this.Reset(); + } + this.RotateTheta(theta, point); + this.RotatePhi(phi); + this.Scale(scale); + } + + // Token: 0x1700013C RID: 316 + // (get) Token: 0x060003AF RID: 943 RVA: 0x0000D9C7 File Offset: 0x0000BBC7 + public bool IsIdentity + { + get + { + return this._matrix.IsIdentity; + } + } + + // Token: 0x060003B0 RID: 944 RVA: 0x0000D9D4 File Offset: 0x0000BBD4 + public static bool IsPointInsidePolygon(Point2D point, IEnumerable vertices) + { + int num = 0; + int num2 = vertices.Count(); + for (int i = 0; i < num2; i++) + { + Point2D point2D = vertices.ElementAt(i); + Point2D point2D2 = vertices.ElementAt((i + 1) % num2); + if ((point.Y - point2D.Y) * (point.Y - point2D2.Y) <= 0.0) + { + Point2D point2D3 = point2D2 - point2D; + if (point2D3.X == 0.0) + { + if (point2D.X == point.X) + { + return true; + } + num++; + } + else if (point2D.X >= point.X || point2D2.X >= point.X) + { + double num3 = point2D3.Y / point2D3.X; + double num4 = point2D.Y - num3 * point2D.X; + double num5 = -(num4 - point.Y) / num3; + if (num5 == point.X) + { + return true; + } + if (point.X < num5) + { + num++; + } + } + } + } + return num % 2 != 0; + } + + // Token: 0x1700013D RID: 317 + // (get) Token: 0x060003B1 RID: 945 RVA: 0x0000DADF File Offset: 0x0000BCDF + [Obsolete("Property \"Scale1\" is deprecated, please use \"ScaleFactor\" instead.")] + public double Scale1 + { + get + { + return this._scale; + } + } + + // Token: 0x0400013C RID: 316 + public const double AngleScale = 57.295779513082323; + + // Token: 0x0400013D RID: 317 + private Matrix3D _matrix; + + // Token: 0x0400013E RID: 318 + private double _phi; + + // Token: 0x0400013F RID: 319 + private double _theta; + + // Token: 0x04000140 RID: 320 + private double _scale; + + // Token: 0x04000141 RID: 321 + private double _dx; + + // Token: 0x04000142 RID: 322 + private double _dy; + + // Token: 0x04000143 RID: 323 + private double _dz; + } +} diff --git a/CorridorModel/IGenerationRange.cs b/CorridorModel/IGenerationRange.cs new file mode 100644 index 0000000..72901b5 --- /dev/null +++ b/CorridorModel/IGenerationRange.cs @@ -0,0 +1,31 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x0200001A RID: 26 + public interface IGenerationRange + { + // Token: 0x17000078 RID: 120 + // (get) Token: 0x0600017F RID: 383 + // (set) Token: 0x06000180 RID: 384 + double GenerationStartStation { get; set; } + + // Token: 0x17000079 RID: 121 + // (get) Token: 0x06000181 RID: 385 + // (set) Token: 0x06000182 RID: 386 + double GenerationEndStation { get; set; } + + // Token: 0x1700007A RID: 122 + // (get) Token: 0x06000183 RID: 387 + // (set) Token: 0x06000184 RID: 388 + double StartStation { get; set; } + + // Token: 0x1700007B RID: 123 + // (get) Token: 0x06000185 RID: 389 + // (set) Token: 0x06000186 RID: 390 + double EndStation { get; set; } + + // Token: 0x06000187 RID: 391 + Tuple GetGenerationScopeIntersection(IGenerationRange parent); + } +} diff --git a/CorridorModel/IGenerationRangeInstance.cs b/CorridorModel/IGenerationRangeInstance.cs new file mode 100644 index 0000000..40ed161 --- /dev/null +++ b/CorridorModel/IGenerationRangeInstance.cs @@ -0,0 +1,9 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x02000027 RID: 39 + public interface IGenerationRangeInstance : IGenerationRange, IInstance + { + } +} diff --git a/CorridorModel/IInstance.cs b/CorridorModel/IInstance.cs new file mode 100644 index 0000000..b55bfa6 --- /dev/null +++ b/CorridorModel/IInstance.cs @@ -0,0 +1,9 @@ +using System; + +namespace CorridorModel +{ + public interface IInstance + { + int Instance { get; set; } + } +} diff --git a/CorridorModel/Imperial.cs b/CorridorModel/Imperial.cs new file mode 100644 index 0000000..476c615 --- /dev/null +++ b/CorridorModel/Imperial.cs @@ -0,0 +1,30 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200003D RID: 61 + [XmlType("Imperial")] + [Serializable] + public class Imperial : Unit + { + // Token: 0x06000344 RID: 836 RVA: 0x0000C0A4 File Offset: 0x0000A2A4 + public Imperial() + { + this.Initialize(); + } + + // Token: 0x06000345 RID: 837 RVA: 0x0000C0B2 File Offset: 0x0000A2B2 + public override void Initialize() + { + base._directionUnit = CorridorModel.DirectionUnit.decimal_degrees; + base._angularUnit = CorridorModel.DirectionUnit.decimal_degrees; + base.DiameterUnit = DiameterUnit.inch; + base.PressureUnit = PressureUnit.inchHG; + base.TemperatureUnit = TemperatureUnit.fahrenheit; + base.AreaUnit = AreaUnit.squareFoot; + base.VolumeUnit = VolumeUnit.cubicYard; + base.LinearUnit = LinearUnit.USSurveyFoot; + } + } +} diff --git a/CorridorModel/Interfaces/IComparableStructure.cs b/CorridorModel/Interfaces/IComparableStructure.cs new file mode 100644 index 0000000..fd4aca9 --- /dev/null +++ b/CorridorModel/Interfaces/IComparableStructure.cs @@ -0,0 +1,17 @@ +using System; + +namespace CorridorModel.Interfaces +{ + // Token: 0x02000002 RID: 2 + public interface IComparableStructure + { + // Token: 0x06000001 RID: 1 + bool Equals(T item); + + // Token: 0x06000002 RID: 2 + bool DifferentItem(T item); + + // Token: 0x06000003 RID: 3 + bool DifferentDescendants(T item); + } +} diff --git a/CorridorModel/Interval.cs b/CorridorModel/Interval.cs new file mode 100644 index 0000000..20e7521 --- /dev/null +++ b/CorridorModel/Interval.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000009 RID: 9 + [XmlInclude(typeof(Curve))] + [XmlInclude(typeof(Spiral))] + [XmlInclude(typeof(Line))] + [Serializable] + public abstract class Interval + { + [XmlAttribute("length")] + public double Length { get; set; } + + [XmlElement("Start")] + public TextPoint2D Start + { + get + { + return this._points[0]; + } + set + { + this._points[0] = value; + } + } + + [XmlElement("End")] + public TextPoint2D End + { + get + { + return this._points[1]; + } + set + { + this._points[1] = value; + } + } + + [XmlIgnore] + internal List _points { get; set; } + + public void Transform(GeometryTransformations transformations) + { + this.Length *= transformations.ScaleFactor; + Line line = this as Line; + if (line != null) + { + line.Dir += transformations.Phi; + } + else + { + Curve curve = this as Curve; + if (curve != null) + { + curve.DirStart += transformations.Phi; + curve.DirEnd += transformations.Phi; + curve.Radius *= transformations.ScaleFactor; + } + else + { + Spiral spiral = this as Spiral; + if (spiral != null) + { + spiral.Dir += transformations.Theta; + } + } + } + foreach (TextPoint2D textPoint2D in this._points) + { + textPoint2D.Transform(transformations, false); + } + } + + public abstract double GetDirectionAtPoint(double station); + } +} diff --git a/CorridorModel/LamdXMLEx.cs b/CorridorModel/LamdXMLEx.cs new file mode 100644 index 0000000..33ba588 --- /dev/null +++ b/CorridorModel/LamdXMLEx.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace CorridorModel +{ + public static class LamdXMLEx + { + public static bool? ReferenceComparison(object o1, object o2) + { + if (object.ReferenceEquals(o1, o2)) + { + return new bool?(true); + } + if (o1 == null || o2 == null) + { + return new bool?(false); + } + return null; + } + + public static DesignShape ByName(this List shapes, string name) + { + return shapes.FirstOrDefault((DesignShape shape) => shape.Name.Trim().Equals(name, StringComparison.OrdinalIgnoreCase)); + } + } +} diff --git a/CorridorModel/Line.cs b/CorridorModel/Line.cs new file mode 100644 index 0000000..369de11 --- /dev/null +++ b/CorridorModel/Line.cs @@ -0,0 +1,406 @@ +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Runtime.CompilerServices; +using System.Xml.Serialization; +using Microsoft.CSharp.RuntimeBinder; + +namespace CorridorModel +{ + // Token: 0x02000010 RID: 16 + [XmlType("Line")] + [Serializable] + public class Line : Interval + { + // Token: 0x06000129 RID: 297 RVA: 0x00006C72 File Offset: 0x00004E72 + public Line() + { + base._points = new List(2); + base._points.Add(new TextPoint2D()); + base._points.Add(new TextPoint2D()); + } + + // Token: 0x0600012A RID: 298 RVA: 0x00006CA6 File Offset: 0x00004EA6 + public Line(Line entity) : this() + { + this.Dir = entity.Dir; + base.Length = entity.Length; + base.Start = entity.Start; + base.End = entity.End; + } + + // Token: 0x0600012B RID: 299 RVA: 0x00006CE0 File Offset: 0x00004EE0 + public Line(dynamic entity, dynamic baseline, dynamic profile) : this() + { + if (Line.ctor.p__Site1 == null) + { + Line.ctor.p__Site1 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Line))); + } + Func target = Line.ctor.p__Site1.Target; + CallSite p__Site = Line.ctor.p__Site1; + if (Line.ctor.p__Site2 == null) + { + Line.ctor.p__Site2 = CallSite>.Create(Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.Divide, typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + Func target2 = Line.ctor.p__Site2.Target; + CallSite p__Site2 = Line.ctor.p__Site2; + if (Line.ctor.p__Site3 == null) + { + Line.ctor.p__Site3 = CallSite>.Create(Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.Multiply, typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + Func target3 = Line.ctor.p__Site3.Target; + CallSite p__Site3 = Line.ctor.p__Site3; + if (Line.ctor.p__Site4 == null) + { + Line.ctor.p__Site4 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "Direction", typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.Dir = target(p__Site, target2(p__Site2, target3(p__Site3, Line.ctor.p__Site4.Target(Line.ctor.p__Site4, entity), 180.0), 3.1415926535897931)); + if (Line.ctor.p__Site5 == null) + { + Line.ctor.p__Site5 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Line))); + } + Func target4 = Line.ctor.p__Site5.Target; + CallSite p__Site4 = Line.ctor.p__Site5; + if (Line.ctor.p__Site6 == null) + { + Line.ctor.p__Site6 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "Length", typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + base.Length = target4(p__Site4, Line.ctor.p__Site6.Target(Line.ctor.p__Site6, entity)); + double num = 0.0; + double num2 = 0.0; + try + { + if (Line.ctor.p__Site7 == null) + { + Line.ctor.p__Site7 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Line))); + } + Func target5 = Line.ctor.p__Site7.Target; + CallSite p__Site5 = Line.ctor.p__Site7; + if (Line.ctor.p__Site8 == null) + { + Line.ctor.p__Site8 = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "ElevationAt", null, typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target6 = Line.ctor.p__Site8.Target; + CallSite p__Site6 = Line.ctor.p__Site8; + if (Line.ctor.p__Site9 == null) + { + Line.ctor.p__Site9 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "StartingStation", typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + num = target5(p__Site5, target6(p__Site6, profile, Line.ctor.p__Site9.Target(Line.ctor.p__Site9, entity))); + } + catch + { + } + try + { + if (Line.ctor.p__Sitea == null) + { + Line.ctor.p__Sitea = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Line))); + } + Func target7 = Line.ctor.p__Sitea.Target; + CallSite p__Sitea = Line.ctor.p__Sitea; + if (Line.ctor.p__Siteb == null) + { + Line.ctor.p__Siteb = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "ElevationAt", null, typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target8 = Line.ctor.p__Siteb.Target; + CallSite p__Siteb = Line.ctor.p__Siteb; + if (Line.ctor.p__Sitec == null) + { + Line.ctor.p__Sitec = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "EndingStation", typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + num2 = target7(p__Sitea, target8(p__Siteb, profile, Line.ctor.p__Sitec.Target(Line.ctor.p__Sitec, entity))); + } + catch + { + } + if (Line.ctor.p__Sited == null) + { + Line.ctor.p__Sited = CallSite>.Create(Binder.InvokeConstructor(CSharpBinderFlags.None, typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.IsStaticType, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target9 = Line.ctor.p__Sited.Target; + CallSite p__Sited = Line.ctor.p__Sited; + Type typeFromHandle = typeof(TextPoint2D); + if (Line.ctor.p__Sitee == null) + { + Line.ctor.p__Sitee = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "StationOffsetElevationToXYZ", null, typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target10 = Line.ctor.p__Sitee.Target; + CallSite p__Sitee = Line.ctor.p__Sitee; + double[] array = new double[3]; + double[] array2 = array; + int num3 = 0; + if (Line.ctor.p__Sitef == null) + { + Line.ctor.p__Sitef = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Line))); + } + Func target11 = Line.ctor.p__Sitef.Target; + CallSite p__Sitef = Line.ctor.p__Sitef; + if (Line.ctor.p__Site10 == null) + { + Line.ctor.p__Site10 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "StartingStation", typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array2[num3] = target11(p__Sitef, Line.ctor.p__Site10.Target(Line.ctor.p__Site10, entity)); + array[2] = num; + object arg = target10(p__Sitee, baseline, array); + double[] array3 = new double[2]; + double[] array4 = array3; + int num4 = 0; + if (Line.ctor.p__Site11 == null) + { + Line.ctor.p__Site11 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Line))); + } + Func target12 = Line.ctor.p__Site11.Target; + CallSite p__Site7 = Line.ctor.p__Site11; + if (Line.ctor.p__Site12 == null) + { + Line.ctor.p__Site12 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "StartEasting", typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array4[num4] = target12(p__Site7, Line.ctor.p__Site12.Target(Line.ctor.p__Site12, entity)); + double[] array5 = array3; + int num5 = 1; + if (Line.ctor.p__Site13 == null) + { + Line.ctor.p__Site13 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Line))); + } + Func target13 = Line.ctor.p__Site13.Target; + CallSite p__Site8 = Line.ctor.p__Site13; + if (Line.ctor.p__Site14 == null) + { + Line.ctor.p__Site14 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "StartNorthing", typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array5[num5] = target13(p__Site8, Line.ctor.p__Site14.Target(Line.ctor.p__Site14, entity)); + base.Start = target9(p__Sited, typeFromHandle, arg, array3); + if (Line.ctor.p__Site15 == null) + { + Line.ctor.p__Site15 = CallSite>.Create(Binder.InvokeConstructor(CSharpBinderFlags.None, typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.IsStaticType, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target14 = Line.ctor.p__Site15.Target; + CallSite p__Site9 = Line.ctor.p__Site15; + Type typeFromHandle2 = typeof(TextPoint2D); + if (Line.ctor.p__Site16 == null) + { + Line.ctor.p__Site16 = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "StationOffsetElevationToXYZ", null, typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target15 = Line.ctor.p__Site16.Target; + CallSite p__Site10 = Line.ctor.p__Site16; + double[] array6 = new double[3]; + double[] array7 = array6; + int num6 = 0; + if (Line.ctor.p__Site17 == null) + { + Line.ctor.p__Site17 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Line))); + } + Func target16 = Line.ctor.p__Site17.Target; + CallSite p__Site11 = Line.ctor.p__Site17; + if (Line.ctor.p__Site18 == null) + { + Line.ctor.p__Site18 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "EndingStation", typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array7[num6] = target16(p__Site11, Line.ctor.p__Site18.Target(Line.ctor.p__Site18, entity)); + array6[2] = num2; + object arg2 = target15(p__Site10, baseline, array6); + double[] array8 = new double[2]; + double[] array9 = array8; + int num7 = 0; + if (Line.ctor.p__Site19 == null) + { + Line.ctor.p__Site19 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Line))); + } + Func target17 = Line.ctor.p__Site19.Target; + CallSite p__Site12 = Line.ctor.p__Site19; + if (Line.ctor.p__Site1a == null) + { + Line.ctor.p__Site1a = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "EndEasting", typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array9[num7] = target17(p__Site12, Line.ctor.p__Site1a.Target(Line.ctor.p__Site1a, entity)); + double[] array10 = array8; + int num8 = 1; + if (Line.ctor.p__Site1b == null) + { + Line.ctor.p__Site1b = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Line))); + } + Func target18 = Line.ctor.p__Site1b.Target; + CallSite p__Site1b = Line.ctor.p__Site1b; + if (Line.ctor.p__Site1c == null) + { + Line.ctor.p__Site1c = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "EndNorthing", typeof(Line), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array10[num8] = target18(p__Site1b, Line.ctor.p__Site1c.Target(Line.ctor.p__Site1c, entity)); + base.End = target14(p__Site9, typeFromHandle2, arg2, array8); + while (this.Dir < 0.0) + { + this.Dir += 360.0; + } + while (this.Dir >= 360.0) + { + this.Dir -= 360.0; + } + } + + // Token: 0x1700005C RID: 92 + // (get) Token: 0x0600012C RID: 300 RVA: 0x00007678 File Offset: 0x00005878 + // (set) Token: 0x0600012D RID: 301 RVA: 0x00007680 File Offset: 0x00005880 + [XmlAttribute("dir")] + public double Dir { get; set; } + + // Token: 0x0600012E RID: 302 RVA: 0x00007689 File Offset: 0x00005889 + public override double GetDirectionAtPoint(double station) + { + return this.Dir; + } + + // Token: 0x02000062 RID: 98 + [CompilerGenerated] + private static class ctor + { + // Token: 0x040001CB RID: 459 + public static CallSite> p__Site1; + + // Token: 0x040001CC RID: 460 + public static CallSite> p__Site2; + + // Token: 0x040001CD RID: 461 + public static CallSite> p__Site3; + + // Token: 0x040001CE RID: 462 + public static CallSite> p__Site4; + + // Token: 0x040001CF RID: 463 + public static CallSite> p__Site5; + + // Token: 0x040001D0 RID: 464 + public static CallSite> p__Site6; + + // Token: 0x040001D1 RID: 465 + public static CallSite> p__Site7; + + // Token: 0x040001D2 RID: 466 + public static CallSite> p__Site8; + + // Token: 0x040001D3 RID: 467 + public static CallSite> p__Site9; + + // Token: 0x040001D4 RID: 468 + public static CallSite> p__Sitea; + + // Token: 0x040001D5 RID: 469 + public static CallSite> p__Siteb; + + // Token: 0x040001D6 RID: 470 + public static CallSite> p__Sitec; + + // Token: 0x040001D7 RID: 471 + public static CallSite> p__Sited; + + // Token: 0x040001D8 RID: 472 + public static CallSite> p__Sitee; + + // Token: 0x040001D9 RID: 473 + public static CallSite> p__Sitef; + + // Token: 0x040001DA RID: 474 + public static CallSite> p__Site10; + + // Token: 0x040001DB RID: 475 + public static CallSite> p__Site11; + + // Token: 0x040001DC RID: 476 + public static CallSite> p__Site12; + + // Token: 0x040001DD RID: 477 + public static CallSite> p__Site13; + + // Token: 0x040001DE RID: 478 + public static CallSite> p__Site14; + + // Token: 0x040001DF RID: 479 + public static CallSite> p__Site15; + + // Token: 0x040001E0 RID: 480 + public static CallSite> p__Site16; + + // Token: 0x040001E1 RID: 481 + public static CallSite> p__Site17; + + // Token: 0x040001E2 RID: 482 + public static CallSite> p__Site18; + + // Token: 0x040001E3 RID: 483 + public static CallSite> p__Site19; + + // Token: 0x040001E4 RID: 484 + public static CallSite> p__Site1a; + + // Token: 0x040001E5 RID: 485 + public static CallSite> p__Site1b; + + // Token: 0x040001E6 RID: 486 + public static CallSite> p__Site1c; + } + } +} diff --git a/CorridorModel/LineType.cs b/CorridorModel/LineType.cs new file mode 100644 index 0000000..b517680 --- /dev/null +++ b/CorridorModel/LineType.cs @@ -0,0 +1,13 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x02000011 RID: 17 + public enum LineType + { + // Token: 0x04000040 RID: 64 + Main, + // Token: 0x04000041 RID: 65 + Offset + } +} diff --git a/CorridorModel/LinearUnit.cs b/CorridorModel/LinearUnit.cs new file mode 100644 index 0000000..4f85f5c --- /dev/null +++ b/CorridorModel/LinearUnit.cs @@ -0,0 +1,29 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x02000047 RID: 71 + public enum LinearUnit + { + // Token: 0x0400011C RID: 284 + meter, + // Token: 0x0400011D RID: 285 + milimeter, + // Token: 0x0400011E RID: 286 + centimeter, + // Token: 0x0400011F RID: 287 + decimeter, + // Token: 0x04000120 RID: 288 + kilometer, + // Token: 0x04000121 RID: 289 + inch, + // Token: 0x04000122 RID: 290 + foot, + // Token: 0x04000123 RID: 291 + yard, + // Token: 0x04000124 RID: 292 + mile, + // Token: 0x04000125 RID: 293 + USSurveyFoot + } +} diff --git a/CorridorModel/Location.cs b/CorridorModel/Location.cs new file mode 100644 index 0000000..24d99b7 --- /dev/null +++ b/CorridorModel/Location.cs @@ -0,0 +1,19 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200004F RID: 79 + [XmlType("Location")] + [Serializable] + public class Location : Point3D + { + // Token: 0x0400014F RID: 335 + [XmlAttribute("Phi")] + public double RotationPlane; + + // Token: 0x04000150 RID: 336 + [XmlAttribute("Theta")] + public double RotationVertical; + } +} diff --git a/CorridorModel/LoftShapeModel.cs b/CorridorModel/LoftShapeModel.cs new file mode 100644 index 0000000..45307ad --- /dev/null +++ b/CorridorModel/LoftShapeModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000052 RID: 82 + [XmlType("LoftShape")] + public class LoftShapeModel : ShapeModel + { + // Token: 0x04000154 RID: 340 + [XmlAttribute("depth")] + public double Depth; + } +} diff --git a/CorridorModel/Metric.cs b/CorridorModel/Metric.cs new file mode 100644 index 0000000..6f0b8fa --- /dev/null +++ b/CorridorModel/Metric.cs @@ -0,0 +1,30 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200003E RID: 62 + [XmlType("Metric")] + [Serializable] + public class Metric : Unit + { + // Token: 0x06000346 RID: 838 RVA: 0x0000C0ED File Offset: 0x0000A2ED + public Metric() + { + this.Initialize(); + } + + // Token: 0x06000347 RID: 839 RVA: 0x0000C0FB File Offset: 0x0000A2FB + public override void Initialize() + { + base._directionUnit = CorridorModel.DirectionUnit.decimal_degrees; + base._angularUnit = CorridorModel.DirectionUnit.decimal_degrees; + base.DiameterUnit = DiameterUnit.meter; + base.PressureUnit = PressureUnit.inchHG; + base.TemperatureUnit = TemperatureUnit.celsius; + base.AreaUnit = AreaUnit.squareMeter; + base.VolumeUnit = VolumeUnit.cubicMeter; + base.LinearUnit = LinearUnit.meter; + } + } +} diff --git a/CorridorModel/Model.cs b/CorridorModel/Model.cs new file mode 100644 index 0000000..0c72fd4 --- /dev/null +++ b/CorridorModel/Model.cs @@ -0,0 +1,477 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.Serialization.Formatters.Binary; +using System.Text; +using System.Xml; +using System.Xml.Serialization; + +namespace CorridorModel +{ + [XmlRoot("LandXML")] + [Serializable] + public class Model + { + [XmlAttribute("language")] + public string Language { get; set; } + + [XmlAttribute("readOnly")] + public bool ReadOnly { get; set; } + + [XmlAttribute("version")] + public string Version { get; set; } + + [XmlAttribute("time")] + public string Time { get; set; } + + [XmlAttribute("date")] + public string Date { get; set; } + + [XmlAttribute("schemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")] + public string xsi_schemaLocation { get; set; } + [XmlAttribute("t")] + public bool Transformed { get; set; } + + + [XmlElement("Units")] + public Units Units { get; set; } + + + [XmlElement("CoordinateSystem")] + public CoordinateSystem CoordinateSystem { get; set; } + + + [XmlElement("Project")] + public Project Project { get; set; } + + + [XmlElement("Application")] + public Application Application { get; set; } + + + [XmlElement("BasePoint")] + public Point3D BasePoint { get; set; } + + + [XmlElement("CgPoints")] + public List CgPoints { get; set; } + + [XmlElement("Alignments")] + public Alignments Alignments { get; set; } + + [XmlArray("Roadways")] + public List Roadways { get; set; } + + [XmlArray("Surfaces")] + public List Surfaces { get; set; } + + [XmlElement("SourcePoint")] + public List SourcePoints { get; set; } + + [XmlElement("TargetPoint")] + public List TargetPoints { get; set; } + + [XmlIgnore] + public string Name + { + get + { + string text = string.Empty; + foreach (Roadway roadway in this.Roadways) + { + text = text + roadway.Name + " "; + } + if (text != string.Empty) + { + return text.TrimEnd(new char[0]); + } + if (this.Project == null) + { + return string.Empty; + } + return this.Project.Name; + } + } + + private static XmlSerializerNamespaces Namespaces() + { + XmlSerializerNamespaces xmlSerializerNamespaces = new XmlSerializerNamespaces(); + xmlSerializerNamespaces.Add("xsi", "http://www.w3.org/2001/XMLSchema-instance"); + return xmlSerializerNamespaces; + } + + public bool Serialize(string filename) + { + bool result = true; + try + { + using (FileStream fileStream = new FileStream(filename, FileMode.Create)) + { + XmlSerializer xmlSerializer = new XmlSerializer(typeof(Model), "http://www.landxml.org/schema/LandXML-1.2"); + xmlSerializer.Serialize(fileStream, this, Model.Namespaces()); + } + } + catch + { + result = false; + } + return result; + } + + public bool Serialize(Stream stream) + { + bool result = true; + try + { + using (XmlWriter xmlWriter = XmlWriter.Create(stream, new XmlWriterSettings + { + NewLineHandling = NewLineHandling.Entitize, + NewLineChars = Environment.NewLine, + Encoding = Encoding.UTF8, + Indent = true + })) + { + XmlSerializer xmlSerializer = new XmlSerializer(typeof(Model), "http://www.landxml.org/schema/LandXML-1.2"); + xmlSerializer.Serialize(xmlWriter, this, Model.Namespaces()); + } + } + catch + { + result = false; + } + return result; + } + + + public static Model Deserialize(string filename) + { + Model result; + try + { + using (FileStream fileStream = new FileStream(filename, FileMode.Open)) + { + result = Model.Deserialize(fileStream); + } + } + catch + { + result = null; + } + return result; + } + + public static Model Deserialize(Stream stream) + { + Model model = null; + try + { + XmlSerializer xmlSerializer = new XmlSerializer(typeof(Model), "http://www.landxml.org/schema/LandXML-1.2"); + model = (xmlSerializer.Deserialize(stream) as Model); + model.ConnectHierarchy(); + } + catch + { + model = null; + } + return model; + } + + public bool SerializeBinary(string filename) + { + bool result = true; + try + { + using (FileStream fileStream = new FileStream(filename, FileMode.Create)) + { + BinaryFormatter binaryFormatter = new BinaryFormatter(); + binaryFormatter.Serialize(fileStream, this); + } + } + catch + { + result = false; + } + return result; + } + + public static Model DeserializeBinary(string filename) + { + Model model = null; + try + { + using (FileStream fileStream = new FileStream(filename, FileMode.OpenOrCreate)) + { + BinaryFormatter binaryFormatter = new BinaryFormatter(); + model = (binaryFormatter.Deserialize(fileStream) as Model); + model.ConnectHierarchy(); + } + } + catch + { + } + return model; + } + + public IEnumerable SurfaceNames + { + get + { + return this.Alignments.AlignmentList.SelectMany((Alignment item) => item.SurfaceNames).Distinct(); + } + } + + public IEnumerable PointCodes + { + get + { + return this.Alignments.AlignmentList.SelectMany((Alignment item) => item.PointCodes); + } + } + + public Model() + { + this.CgPoints = new List(); + this.Roadways = new List(); + this.Surfaces = new List(); + this.SourcePoints = new List(); + this.TargetPoints = new List(); + this.CoordinateSystem = new CoordinateSystem(); + this.Alignments = new Alignments(); + this.Project = new Project(); + this.Units = new Units(); + this.xsi_schemaLocation = "http://www.landxml.org/schema/LandXML-1.2 http://www.landxml.org/schema/LandXML-1.2/LandXML-1.2.xsd"; + } + + public void Initialize(string projectName, string fileName, Application app, int units = 0, string version = "1.2") + { + this.Language = "English"; + this.ReadOnly = false; + this.Version = version; + this.Date = string.Concat(new object[] + { + DateTime.Now.Year, + "-", + DateTime.Now.Month, + "-", + DateTime.Now.Day + }); + this.Time = string.Concat(new object[] + { + DateTime.Now.Hour, + ":", + DateTime.Now.Minute, + ":", + DateTime.Now.Second + }); + this.Units.Clear(); + switch (units) + { + case 0: + this.Units.Add(new Imperial()); + break; + default: + this.Units.Add(new Metric()); + break; + } + this.Units[0].Initialize(); + this.Project.Name = projectName; + this.Project.File = fileName; + this.Application = app; + } + + public void RefreshShapes() + { + foreach (Alignment alignment in this.Alignments.AlignmentList) + { + alignment.RefreshShapes(); + } + } + + public Point3D GeometricCenter + { + get + { + int count = this.Alignments.Count; + Point3D point3D = new Point3D(); + if (count != 0) + { + foreach (Alignment alignment in this.Alignments) + { + point3D += alignment.GeometricCenter / (double)count; + } + } + return point3D; + } + } + + public void SetBasePoint(bool center = true) + { + Point3D point3D = (this.SourcePoints.Count > 0) ? this.SourcePoints[0] : null; + if (point3D == null) + { + if (center) + { + point3D = this.GeometricCenter; + } + else if (this.Alignments.Count > 0) + { + Alignment alignment = this.Alignments[0]; + if (alignment.CrossSections.Count > 0) + { + point3D = new Point3D(alignment.CrossSections[0]); + } + } + } + if (point3D != null && point3D != new Point3D()) + { + this.BasePoint = point3D; + foreach (Alignment alignment2 in this.Alignments) + { + foreach (Interval interval in alignment2.CoordGeom) + { + foreach (TextPoint2D textPoint2D in interval._points) + { + textPoint2D.setText(textPoint2D.Y - point3D.Y, textPoint2D.X - point3D.X); + textPoint2D.X -= point3D.X; + textPoint2D.Y -= point3D.Y; + textPoint2D.Z -= point3D.Z; + } + } + foreach (CrossSection crossSection in alignment2.CrossSections) + { + crossSection.X -= point3D.X; + crossSection.Y -= point3D.Y; + crossSection.Z -= point3D.Z; + foreach (DesignShape designShape in crossSection.DesignShapes) + { + foreach (CrossSectionPoint crossSectionPoint in designShape.CrossSectionPoints) + { + crossSectionPoint.X -= point3D.X; + crossSectionPoint.Y -= point3D.Y; + crossSectionPoint.Z -= point3D.Z; + } + } + } + foreach (ProfAlign profAlign in alignment2.Profile) + { + foreach (TextPoint2D textPoint2D2 in profAlign.PVIs) + { + textPoint2D2.X -= point3D.X; + textPoint2D2.Y -= point3D.Y; + textPoint2D2.Z -= point3D.Z; + } + } + } + } + } + + public GeometryTransformations Transformations + { + get + { + GeometryTransformations geometryTransformations = new GeometryTransformations(); + geometryTransformations.SetTransformations(this.SourcePoints[0], this.SourcePoints[1], this.TargetPoints[0], this.TargetPoints[1], 1.0, true, true); + if (this.Transformed) + { + geometryTransformations.Invert(); + } + return geometryTransformations; + } + } + + public int TransformByReferencePoints() + { + int result = 0; + try + { + if (this.SourcePoints != null && this.TargetPoints != null && this.SourcePoints.Count >= 2 && this.TargetPoints.Count >= 2) + { + GeometryTransformations transformations = this.Transformations; + this.Transform(transformations); + this.Transformed = !this.Transformed; + result = (this.Transformed ? 1 : -1); + } + } + catch + { + result = 2; + } + return result; + } + + public void Transform(GeometryTransformations transformations) + { + foreach (Alignment alignment in this.Alignments) + { + alignment.Transform(transformations); + } + foreach (Roadway roadway in this.Roadways) + { + roadway.StationStart *= transformations.ScaleFactor; + roadway.StationEnd *= transformations.ScaleFactor; + } + if (this.BasePoint != null) + { + transformations.Transform(this.BasePoint); + } + } + + [Obsolete("Method \"Transform\" is deprecated, please use \"TransformByReferencePoints\" instead.")] + public int Transform() + { + return this.TransformByReferencePoints(); + } + + [Obsolete("Property \"GetGeometricCenter\" is deprecated, please use \"GeometricCenter\" instead.")] + public Point3D GetGeometricCenter + { + get + { + return this.GeometricCenter; + } + } + + public override string ToString() + { + return this.Name; + } + + public void ConnectRoadways() + { + foreach (Roadway roadway in this.Roadways) + { + roadway.LandXml = this; + } + } + + public void ConnectHierarchy() + { + this.ConnectRoadways(); + foreach (Roadway roadway in this.Roadways) + { + roadway.ConnectAlignments(); + } + foreach (Alignment alignment in this.Alignments) + { + alignment.ConnectRegions(); + foreach (Region region in alignment.Regions) + { + region.ConnectParts(); + foreach (Part part in region.Parts) + { + part.ConnectRange(); + } + } + foreach (CrossSection crossSection in alignment.CrossSections) + { + crossSection.ConnectShapes(); + } + } + } + + private const string defaultNamespace = "http://www.landxml.org/schema/LandXML-1.2"; + + private const string xsiNamespace = "http://www.w3.org/2001/XMLSchema-instance"; + } +} diff --git a/CorridorModel/ObjectWithNameSideSegment.cs b/CorridorModel/ObjectWithNameSideSegment.cs new file mode 100644 index 0000000..e862151 --- /dev/null +++ b/CorridorModel/ObjectWithNameSideSegment.cs @@ -0,0 +1,79 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000021 RID: 33 + [XmlType] + [Serializable] + public abstract class ObjectWithNameSideSegment + { + // Token: 0x060001FD RID: 509 RVA: 0x00009EF5 File Offset: 0x000080F5 + public ObjectWithNameSideSegment() + { + } + + // Token: 0x060001FE RID: 510 RVA: 0x00009EFD File Offset: 0x000080FD + public ObjectWithNameSideSegment(ObjectWithNameSideSegment reference) + { + this.Name = reference.Name; + this.Side = reference.Side; + this.Segment = reference.Segment; + } + + // Token: 0x1700009E RID: 158 + // (get) Token: 0x060001FF RID: 511 RVA: 0x00009F29 File Offset: 0x00008129 + // (set) Token: 0x06000200 RID: 512 RVA: 0x00009F31 File Offset: 0x00008131 + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x1700009F RID: 159 + // (get) Token: 0x06000201 RID: 513 RVA: 0x00009F3A File Offset: 0x0000813A + // (set) Token: 0x06000202 RID: 514 RVA: 0x00009F42 File Offset: 0x00008142 + [XmlAttribute("side")] + public Side Side { get; set; } + + // Token: 0x170000A0 RID: 160 + // (get) Token: 0x06000203 RID: 515 RVA: 0x00009F4B File Offset: 0x0000814B + [XmlIgnore] + public string NameSide + { + get + { + return this.Name + " " + this.Side.ToString(); + } + } + + // Token: 0x170000A1 RID: 161 + // (get) Token: 0x06000204 RID: 516 RVA: 0x00009F6D File Offset: 0x0000816D + // (set) Token: 0x06000205 RID: 517 RVA: 0x00009F75 File Offset: 0x00008175 + [XmlAttribute("s")] + public int Segment { get; set; } + + // Token: 0x170000A2 RID: 162 + // (get) Token: 0x06000206 RID: 518 RVA: 0x00009F7E File Offset: 0x0000817E + [XmlIgnore] + public string NameSideSegment + { + get + { + return this.NameSide + this.SegmentName; + } + } + + // Token: 0x170000A3 RID: 163 + // (get) Token: 0x06000207 RID: 519 RVA: 0x00009F94 File Offset: 0x00008194 + [XmlIgnore] + public string SegmentName + { + get + { + if (this.Segment == 0) + { + return string.Empty; + } + return " s" + this.Segment.ToString(); + } + } + } +} diff --git a/CorridorModel/ObjectWithNameSideSegmentPart.cs b/CorridorModel/ObjectWithNameSideSegmentPart.cs new file mode 100644 index 0000000..057099f --- /dev/null +++ b/CorridorModel/ObjectWithNameSideSegmentPart.cs @@ -0,0 +1,50 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000022 RID: 34 + [XmlType] + [Serializable] + public abstract class ObjectWithNameSideSegmentPart : ObjectWithNameSideSegment + { + // Token: 0x06000208 RID: 520 RVA: 0x00009FC7 File Offset: 0x000081C7 + public ObjectWithNameSideSegmentPart() + { + } + + // Token: 0x06000209 RID: 521 RVA: 0x00009FCF File Offset: 0x000081CF + public ObjectWithNameSideSegmentPart(ObjectWithNameSideSegmentPart reference) : base(reference) + { + this.Part = reference.Part; + } + + // Token: 0x170000A4 RID: 164 + // (get) Token: 0x0600020A RID: 522 RVA: 0x00009FE4 File Offset: 0x000081E4 + // (set) Token: 0x0600020B RID: 523 RVA: 0x00009FEC File Offset: 0x000081EC + [XmlAttribute("p")] + public int Part { get; set; } + + // Token: 0x170000A5 RID: 165 + // (get) Token: 0x0600020C RID: 524 RVA: 0x00009FF8 File Offset: 0x000081F8 + [XmlIgnore] + public string NameSidePart + { + get + { + return base.NameSide + ((this.Part != 0) ? (" p" + this.Part.ToString()) : string.Empty); + } + } + + // Token: 0x170000A6 RID: 166 + // (get) Token: 0x0600020D RID: 525 RVA: 0x0000A038 File Offset: 0x00008238 + [XmlIgnore] + public string NameSideSegmentPart + { + get + { + return base.NameSideSegment + ((this.Part != 0) ? (" p" + this.Part.ToString()) : string.Empty); + } + } + } +} diff --git a/CorridorModel/ParaCurve.cs b/CorridorModel/ParaCurve.cs new file mode 100644 index 0000000..02dde12 --- /dev/null +++ b/CorridorModel/ParaCurve.cs @@ -0,0 +1,12 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + [Serializable] + public class ParaCurve : TextPoint2D + { + [XmlAttribute("length")] + public double CurveLength { get; set; } + } +} diff --git a/CorridorModel/Part.cs b/CorridorModel/Part.cs new file mode 100644 index 0000000..d7ec039 --- /dev/null +++ b/CorridorModel/Part.cs @@ -0,0 +1,292 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Xml.Serialization; +using CorridorModel.Interfaces; + +namespace CorridorModel +{ + // Token: 0x0200002B RID: 43 + [XmlType("Part")] + [Serializable] + public class Part : ObjectWithNameSideSegment, IGenerationRangeInstance, IGenerationRange, IInstance, IComparableStructure + { + // Token: 0x06000267 RID: 615 RVA: 0x0000AB5D File Offset: 0x00008D5D + public Part() + { + this.Ranges = new List(); + this._instance = -1; + } + + // Token: 0x06000268 RID: 616 RVA: 0x0000AB77 File Offset: 0x00008D77 + public Part(ObjectWithNameSideSegment reference) : base(reference) + { + this.Ranges = new List(); + } + + // Token: 0x170000C1 RID: 193 + // (get) Token: 0x06000269 RID: 617 RVA: 0x0000AB8B File Offset: 0x00008D8B + // (set) Token: 0x0600026A RID: 618 RVA: 0x0000AB93 File Offset: 0x00008D93 + [XmlAttribute] + public int Id { get; set; } + + // Token: 0x170000C2 RID: 194 + // (get) Token: 0x0600026B RID: 619 RVA: 0x0000AB9C File Offset: 0x00008D9C + [XmlIgnore] + public string FullName + { + get + { + return this.Type.ToString() + " - " + base.NameSideSegment; + } + } + + // Token: 0x170000C3 RID: 195 + // (get) Token: 0x0600026C RID: 620 RVA: 0x0000ABBE File Offset: 0x00008DBE + // (set) Token: 0x0600026D RID: 621 RVA: 0x0000ABC6 File Offset: 0x00008DC6 + [XmlAttribute("import")] + public bool Import { get; set; } + + // Token: 0x170000C4 RID: 196 + // (get) Token: 0x0600026E RID: 622 RVA: 0x0000ABCF File Offset: 0x00008DCF + // (set) Token: 0x0600026F RID: 623 RVA: 0x0000ABD7 File Offset: 0x00008DD7 + [XmlAttribute("bARGB")] + public int BorderColorARGB { get; set; } + + // Token: 0x170000C5 RID: 197 + // (get) Token: 0x06000270 RID: 624 RVA: 0x0000ABE0 File Offset: 0x00008DE0 + // (set) Token: 0x06000271 RID: 625 RVA: 0x0000ABE8 File Offset: 0x00008DE8 + [XmlAttribute("fARGB")] + public int FillColorARGB { get; set; } + + // Token: 0x170000C6 RID: 198 + // (get) Token: 0x06000272 RID: 626 RVA: 0x0000ABF1 File Offset: 0x00008DF1 + // (set) Token: 0x06000273 RID: 627 RVA: 0x0000ABF9 File Offset: 0x00008DF9 + [XmlElement("Range")] + public List Ranges { get; set; } + + // Token: 0x170000C7 RID: 199 + // (get) Token: 0x06000274 RID: 628 RVA: 0x0000AC02 File Offset: 0x00008E02 + // (set) Token: 0x06000275 RID: 629 RVA: 0x0000AC0A File Offset: 0x00008E0A + [XmlAttribute] + public PartType Type { get; set; } + + // Token: 0x170000C8 RID: 200 + // (get) Token: 0x06000276 RID: 630 RVA: 0x0000AC13 File Offset: 0x00008E13 + // (set) Token: 0x06000277 RID: 631 RVA: 0x0000AC1B File Offset: 0x00008E1B + [XmlAttribute] + public int Instance + { + get + { + return this._instance; + } + set + { + this._instance = value; + } + } + + // Token: 0x170000C9 RID: 201 + // (get) Token: 0x06000278 RID: 632 RVA: 0x0000AC24 File Offset: 0x00008E24 + // (set) Token: 0x06000279 RID: 633 RVA: 0x0000AC2C File Offset: 0x00008E2C + [XmlIgnore] + public Region Region { get; internal set; } + + // Token: 0x170000CA RID: 202 + // (get) Token: 0x0600027A RID: 634 RVA: 0x0000AC38 File Offset: 0x00008E38 + [XmlIgnore] + public string PartId + { + get + { + return ((this.Region != null) ? this.Region.RegionId : string.Empty) + " " + this.Id.ToString(); + } + } + + // Token: 0x170000CB RID: 203 + // (get) Token: 0x0600027B RID: 635 RVA: 0x0000ACC4 File Offset: 0x00008EC4 + [XmlIgnore] + public IEnumerable Shapes + { + get + { + if (this.Region == null) + { + return new DesignShape[0]; + } + if (this.Region.Alignment == null) + { + return new DesignShape[0]; + } + return from section in this.Region.Alignment.CrossSections + where section.Region == this.Region.Id + select section.DesignShapes.FirstOrDefault((DesignShape shape) => shape.NameSideSegment == base.NameSideSegment) into shape + where shape != null + select shape; + } + } + + // Token: 0x170000CC RID: 204 + // (get) Token: 0x0600027C RID: 636 RVA: 0x0000AD48 File Offset: 0x00008F48 + // (set) Token: 0x0600027D RID: 637 RVA: 0x0000AD50 File Offset: 0x00008F50 + [XmlAttribute("start")] + public double StartStation { get; set; } + + // Token: 0x170000CD RID: 205 + // (get) Token: 0x0600027E RID: 638 RVA: 0x0000AD59 File Offset: 0x00008F59 + // (set) Token: 0x0600027F RID: 639 RVA: 0x0000AD61 File Offset: 0x00008F61 + [XmlAttribute("end")] + public double EndStation { get; set; } + + // Token: 0x170000CE RID: 206 + // (get) Token: 0x06000280 RID: 640 RVA: 0x0000AD6A File Offset: 0x00008F6A + [XmlIgnore] + public double Length + { + get + { + return this.EndStation - this.StartStation; + } + } + + // Token: 0x170000CF RID: 207 + // (get) Token: 0x06000281 RID: 641 RVA: 0x0000AD79 File Offset: 0x00008F79 + // (set) Token: 0x06000282 RID: 642 RVA: 0x0000ADAB File Offset: 0x00008FAB + [XmlIgnore] + public double GenerationStartStation + { + get + { + if (this.Ranges != null && this.Ranges.Count > 0) + { + return this.Ranges.First().GenerationStartStation; + } + return double.NaN; + } + set + { + if (this.Ranges != null && this.Ranges.Count > 0) + { + this.Ranges.First().GenerationStartStation = value; + } + } + } + + // Token: 0x170000D0 RID: 208 + // (get) Token: 0x06000283 RID: 643 RVA: 0x0000ADD4 File Offset: 0x00008FD4 + // (set) Token: 0x06000284 RID: 644 RVA: 0x0000AE06 File Offset: 0x00009006 + [XmlIgnore] + public double GenerationEndStation + { + get + { + if (this.Ranges != null && this.Ranges.Count > 0) + { + return this.Ranges.Last().GenerationEndStation; + } + return double.NaN; + } + set + { + if (this.Ranges != null && this.Ranges.Count > 0) + { + this.Ranges.Last().GenerationEndStation = value; + } + } + } + + // Token: 0x170000D1 RID: 209 + // (get) Token: 0x06000285 RID: 645 RVA: 0x0000AE2F File Offset: 0x0000902F + [XmlIgnore] + public double GenerationLength + { + get + { + return this.GenerationEndStation - this.GenerationStartStation; + } + } + + // Token: 0x06000286 RID: 646 RVA: 0x0000AE40 File Offset: 0x00009040 + public void ConnectRange() + { + foreach (Range range in this.Ranges) + { + range.Parent = this; + } + } + + // Token: 0x06000287 RID: 647 RVA: 0x0000AE94 File Offset: 0x00009094 + public void AddRange(Range range) + { + if (range != null) + { + if (this.Ranges.Count == 1 && this.Ranges.First().GenerationStartStation == this.StartStation && this.Ranges.Last().GenerationEndStation == this.EndStation) + { + this.Ranges.Clear(); + } + this.Ranges.Add(range); + if (range.Part == 0 && (this.GenerationStartStation != range.GenerationStartStation || this.GenerationEndStation != range.GenerationEndStation)) + { + range.Part = this.Ranges.Count; + } + } + } + + // Token: 0x06000288 RID: 648 RVA: 0x0000AF54 File Offset: 0x00009154 + public Range FindRange(Range reference) + { + return this.Ranges.FirstOrDefault((Range item) => item.NameSideSegmentPart == reference.NameSideSegmentPart); + } + + // Token: 0x06000289 RID: 649 RVA: 0x0000AF85 File Offset: 0x00009185 + public Tuple GetGenerationScopeIntersection(IGenerationRange parent) + { + return new Tuple(Math.Max(parent.GenerationStartStation, this.GenerationStartStation), Math.Min(parent.GenerationEndStation, this.GenerationEndStation)); + } + + // Token: 0x0600028A RID: 650 RVA: 0x0000AFAE File Offset: 0x000091AE + public override bool Equals(object obj) + { + return this.Equals(obj as Part); + } + + // Token: 0x0600028B RID: 651 RVA: 0x0000AFBC File Offset: 0x000091BC + public bool Equals(Part part) + { + return !object.ReferenceEquals(part, null) && !this.DifferentItem(part) && !this.DifferentDescendants(part); + } + + // Token: 0x0600028C RID: 652 RVA: 0x0000AFE0 File Offset: 0x000091E0 + public override int GetHashCode() + { + return base.GetHashCode(); + } + + // Token: 0x0600028D RID: 653 RVA: 0x0000AFE8 File Offset: 0x000091E8 + public bool DifferentItem(Part part) + { + return this.Import != part.Import || this.StartStation != part.StartStation || this.EndStation != part.EndStation || this.GenerationStartStation != part.GenerationStartStation || this.GenerationEndStation != part.GenerationEndStation; + } + + // Token: 0x0600028E RID: 654 RVA: 0x0000B040 File Offset: 0x00009240 + public bool DifferentDescendants(Part part) + { + if (this.Ranges.Count == part.Ranges.Count) + { + for (int i = 0; i < this.Ranges.Count; i++) + { + if (!this.Ranges[i].Equals(part.Ranges[i])) + { + return true; + } + } + return false; + } + return true; + } + + // Token: 0x0400009A RID: 154 + protected int _instance; + } +} diff --git a/CorridorModel/PartType.cs b/CorridorModel/PartType.cs new file mode 100644 index 0000000..f320c74 --- /dev/null +++ b/CorridorModel/PartType.cs @@ -0,0 +1,15 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200002C RID: 44 + [XmlType("PartType")] + public enum PartType + { + // Token: 0x040000A6 RID: 166 + Shape, + // Token: 0x040000A7 RID: 167 + Link + } +} diff --git a/CorridorModel/Point.cs b/CorridorModel/Point.cs new file mode 100644 index 0000000..5e6d394 --- /dev/null +++ b/CorridorModel/Point.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000038 RID: 56 + [XmlType("P")] + [Serializable] + public class Point : TextPoint3D + { + // Token: 0x170000FA RID: 250 + // (get) Token: 0x060002FB RID: 763 RVA: 0x0000B82B File Offset: 0x00009A2B + // (set) Token: 0x060002FC RID: 764 RVA: 0x0000B833 File Offset: 0x00009A33 + [XmlAttribute("id")] + public string Id { get; set; } + } +} diff --git a/CorridorModel/Point2D.cs b/CorridorModel/Point2D.cs new file mode 100644 index 0000000..c3da739 --- /dev/null +++ b/CorridorModel/Point2D.cs @@ -0,0 +1,303 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200000C RID: 12 + [XmlType("Point2D")] + [Serializable] + public class Point2D + { + // Token: 0x060000D6 RID: 214 RVA: 0x0000584E File Offset: 0x00003A4E + public Point2D() + { + this.X = 0.0; + this.Y = 0.0; + } + + // Token: 0x060000D7 RID: 215 RVA: 0x00005874 File Offset: 0x00003A74 + public Point2D(Point2D source) + { + this.X = source.X; + this.Y = source.Y; + } + + // Token: 0x060000D8 RID: 216 RVA: 0x00005894 File Offset: 0x00003A94 + public Point2D(double x, double y = 0.0) + { + this.X = x; + this.Y = y; + } + + // Token: 0x060000D9 RID: 217 RVA: 0x000058AA File Offset: 0x00003AAA + public Point2D(Point2D source, double dx, double dy = 0.0) + { + this.X = source.X + dx; + this.Y = source.Y + dy; + } + + // Token: 0x17000041 RID: 65 + // (get) Token: 0x060000DA RID: 218 RVA: 0x000058CE File Offset: 0x00003ACE + // (set) Token: 0x060000DB RID: 219 RVA: 0x000058D6 File Offset: 0x00003AD6 + [XmlAttribute("x")] + public double X { get; set; } + + // Token: 0x17000042 RID: 66 + // (get) Token: 0x060000DC RID: 220 RVA: 0x000058DF File Offset: 0x00003ADF + // (set) Token: 0x060000DD RID: 221 RVA: 0x000058E7 File Offset: 0x00003AE7 + [XmlAttribute("y")] + public double Y { get; set; } + + // Token: 0x17000043 RID: 67 + // (get) Token: 0x060000DE RID: 222 RVA: 0x000058F0 File Offset: 0x00003AF0 + [XmlIgnore] + public double Length + { + get + { + return Math.Sqrt(this.LengthSquared); + } + } + + // Token: 0x17000044 RID: 68 + // (get) Token: 0x060000DF RID: 223 RVA: 0x000058FD File Offset: 0x00003AFD + [XmlIgnore] + public double Length2D + { + get + { + return Math.Sqrt(this.LengthSquared2D); + } + } + + // Token: 0x17000045 RID: 69 + // (get) Token: 0x060000E0 RID: 224 RVA: 0x0000590A File Offset: 0x00003B0A + [XmlIgnore] + public virtual double LengthSquared + { + get + { + return this.LengthSquared2D; + } + } + + // Token: 0x17000046 RID: 70 + // (get) Token: 0x060000E1 RID: 225 RVA: 0x00005912 File Offset: 0x00003B12 + [XmlIgnore] + public double LengthSquared2D + { + get + { + return this.X * this.X + this.Y * this.Y; + } + } + + // Token: 0x17000047 RID: 71 + // (get) Token: 0x060000E2 RID: 226 RVA: 0x00005930 File Offset: 0x00003B30 + [XmlIgnore] + public double Gamma + { + get + { + double num = (this.Y != 0.0) ? ((this.X != 0.0) ? Math.Asin(this.Y / this.Length2D) : ((double)Math.Sign(this.Y) * 3.1415926535897931 * 0.5)) : 0.0; + if (this.X >= 0.0) + { + return num; + } + return 3.1415926535897931 - num; + } + } + + // Token: 0x17000048 RID: 72 + // (get) Token: 0x060000E3 RID: 227 RVA: 0x000059C0 File Offset: 0x00003BC0 + [XmlIgnore] + public double SinGamma + { + get + { + if (this.Y == 0.0) + { + return 0.0; + } + if (this.X == 0.0) + { + return 1.0; + } + return this.Y / this.Length2D; + } + } + + // Token: 0x060000E4 RID: 228 RVA: 0x00005A10 File Offset: 0x00003C10 + public static Point2D operator +(Point2D p1, Point2D p2) + { + if (p1 != null) + { + if (p2 != null) + { + return new Point2D + { + X = p1.X + p2.X, + Y = p1.Y + p2.Y + }; + } + return p1; + } + else + { + if (p2 != null) + { + return p2; + } + return null; + } + } + + // Token: 0x060000E5 RID: 229 RVA: 0x00005A5C File Offset: 0x00003C5C + public static Point2D operator -(Point2D p1, Point2D p2) + { + if (p1 != null) + { + if (p2 != null) + { + return new Point2D + { + X = p1.X - p2.X, + Y = p1.Y - p2.Y + }; + } + return p1; + } + else + { + if (p2 != null) + { + return new Point2D + { + X = -p2.X, + Y = -p2.Y + }; + } + return null; + } + } + + // Token: 0x060000E6 RID: 230 RVA: 0x00005AC8 File Offset: 0x00003CC8 + public static Point2D operator *(Point2D p1, double f) + { + if (p1 == null) + { + return null; + } + if (f != 0.0) + { + return new Point2D + { + X = p1.X * f, + Y = p1.Y * f + }; + } + return new Point2D(); + } + + // Token: 0x060000E7 RID: 231 RVA: 0x00005B0F File Offset: 0x00003D0F + public static double operator *(Point2D p1, Point2D p2) + { + if (p1 == null) + { + return 0.0; + } + if (p2 != null) + { + return p1.X * p2.X + p1.Y * p2.Y; + } + return 0.0; + } + + // Token: 0x060000E8 RID: 232 RVA: 0x00005B48 File Offset: 0x00003D48 + public static Point2D operator /(Point2D p1, double f) + { + if (p1 == null) + { + return null; + } + if (f != 0.0) + { + return new Point2D + { + X = p1.X / f, + Y = p1.Y / f + }; + } + throw new ArgumentException(); + } + + // Token: 0x060000E9 RID: 233 RVA: 0x00005B90 File Offset: 0x00003D90 + public static Point3D operator ^(Point2D p1, Point2D p2) + { + if (p1 == null) + { + return new Point3D(); + } + if (p2 != null) + { + return new Point3D + { + Z = p1.X * p2.Y - p1.Y * p2.X + }; + } + return new Point3D(); + } + + // Token: 0x060000EA RID: 234 RVA: 0x00005BD8 File Offset: 0x00003DD8 + public static bool ValuesEqual(Point2D p1, Point2D p2) + { + double num = ((Math.Abs(p1.X) > Math.Abs(p2.X)) ? Math.Abs(p1.X) : Math.Abs(p2.X)) * Point2D.precision; + if (Math.Abs(p1.X - p2.X) <= num) + { + double num2 = ((Math.Abs(p1.Y) > Math.Abs(p2.Y)) ? Math.Abs(p1.Y) : Math.Abs(p2.Y)) * Point2D.precision; + return Math.Abs(p1.Y - p2.Y) <= num2; + } + return false; + } + + // Token: 0x060000EB RID: 235 RVA: 0x00005C82 File Offset: 0x00003E82 + public static bool operator ==(Point2D p1, Point2D p2) + { + return object.ReferenceEquals(p1, p2) || (!object.ReferenceEquals(p1, null) && !object.ReferenceEquals(p2, null) && Point2D.ValuesEqual(p1, p2)); + } + + // Token: 0x060000EC RID: 236 RVA: 0x00005CAA File Offset: 0x00003EAA + public static bool operator !=(Point2D p1, Point2D p2) + { + return !object.ReferenceEquals(p1, p2) && (object.ReferenceEquals(p1, null) || object.ReferenceEquals(p2, null) || !Point2D.ValuesEqual(p1, p2)); + } + + // Token: 0x060000ED RID: 237 RVA: 0x00005CD5 File Offset: 0x00003ED5 + public override bool Equals(object obj) + { + return this.Equals(obj as Point2D); + } + + // Token: 0x060000EE RID: 238 RVA: 0x00005CE3 File Offset: 0x00003EE3 + public bool Equals(Point2D p2d) + { + return !object.ReferenceEquals(p2d, null) && Point2D.ValuesEqual(this, p2d); + } + + // Token: 0x060000EF RID: 239 RVA: 0x00005CF7 File Offset: 0x00003EF7 + public override int GetHashCode() + { + return base.GetHashCode(); + } + + // Token: 0x04000034 RID: 52 + public const double Pi = 3.1415926535897931; + + // Token: 0x04000035 RID: 53 + [XmlIgnore] + public static double precision = 1E-12; + + // Token: 0x04000036 RID: 54 + public static double precision2 = Point2D.precision * Point2D.precision; + } +} diff --git a/CorridorModel/Point3D.cs b/CorridorModel/Point3D.cs new file mode 100644 index 0000000..94bcdb8 --- /dev/null +++ b/CorridorModel/Point3D.cs @@ -0,0 +1,324 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200000D RID: 13 + [XmlType("Point3D")] + [Serializable] + public class Point3D : Point2D + { + // Token: 0x060000F1 RID: 241 RVA: 0x00005D1F File Offset: 0x00003F1F + public Point3D() + { + this.Z = 0.0; + } + + // Token: 0x060000F2 RID: 242 RVA: 0x00005D36 File Offset: 0x00003F36 + public Point3D(Point3D source) : base(source) + { + this.Z = source.Z; + } + + // Token: 0x060000F3 RID: 243 RVA: 0x00005D4B File Offset: 0x00003F4B + public Point3D(double x, double y = 0.0, double z = 0.0) : base(x, y) + { + this.Z = z; + } + + // Token: 0x060000F4 RID: 244 RVA: 0x00005D5C File Offset: 0x00003F5C + public Point3D(Point3D source, double dx, double dy = 0.0, double dz = 0.0) : base(source, dx, dy) + { + this.Z = source.Z + dz; + } + + // Token: 0x17000049 RID: 73 + // (get) Token: 0x060000F5 RID: 245 RVA: 0x00005D76 File Offset: 0x00003F76 + // (set) Token: 0x060000F6 RID: 246 RVA: 0x00005D7E File Offset: 0x00003F7E + [XmlAttribute("z")] + public double Z { get; set; } + + // Token: 0x1700004A RID: 74 + // (get) Token: 0x060000F7 RID: 247 RVA: 0x00005D88 File Offset: 0x00003F88 + [XmlIgnore] + public double Alpha + { + get + { + return ((this.Z != 0.0) ? ((base.Y != 0.0) ? Math.Asin(this.Z / Math.Sqrt(base.Y * base.Y + this.Z * this.Z)) : ((double)Math.Sign(this.Z) * 3.1415926535897931 * 0.5)) : 0.0) + ((base.Y < 0.0) ? 3.1415926535897931 : 0.0); + } + } + + // Token: 0x1700004B RID: 75 + // (get) Token: 0x060000F8 RID: 248 RVA: 0x00005E38 File Offset: 0x00004038 + [XmlIgnore] + public double Beta + { + get + { + return ((base.X != 0.0) ? ((this.Z != 0.0) ? Math.Asin(base.X / Math.Sqrt(base.X * base.X + this.Z * this.Z)) : ((double)Math.Sign(base.X) * 3.1415926535897931 * 0.5)) : 0.0) + ((this.Z < 0.0) ? 3.1415926535897931 : 0.0); + } + } + + // Token: 0x1700004C RID: 76 + // (get) Token: 0x060000F9 RID: 249 RVA: 0x00005EE6 File Offset: 0x000040E6 + [XmlIgnore] + public double Length3D + { + get + { + return Math.Sqrt(this.LengthSquared3D); + } + } + + // Token: 0x1700004D RID: 77 + // (get) Token: 0x060000FA RID: 250 RVA: 0x00005EF3 File Offset: 0x000040F3 + [XmlIgnore] + public override double LengthSquared + { + get + { + return this.LengthSquared3D; + } + } + + // Token: 0x1700004E RID: 78 + // (get) Token: 0x060000FB RID: 251 RVA: 0x00005EFB File Offset: 0x000040FB + [XmlIgnore] + public double LengthSquared3D + { + get + { + return base.LengthSquared2D + this.Z * this.Z; + } + } + + // Token: 0x1700004F RID: 79 + // (get) Token: 0x060000FC RID: 252 RVA: 0x00005F11 File Offset: 0x00004111 + [XmlIgnore] + public double Theta + { + get + { + return Math.Asin(this.SinTheta); + } + } + + // Token: 0x17000050 RID: 80 + // (get) Token: 0x060000FD RID: 253 RVA: 0x00005F1E File Offset: 0x0000411E + [XmlIgnore] + public double SinTheta + { + get + { + if (this.Z == 0.0) + { + return 0.0; + } + return this.Z / this.Length3D; + } + } + + // Token: 0x17000051 RID: 81 + // (get) Token: 0x060000FE RID: 254 RVA: 0x00005F48 File Offset: 0x00004148 + [XmlIgnore] + public double Phi + { + get + { + return base.Gamma; + } + } + + // Token: 0x17000052 RID: 82 + // (get) Token: 0x060000FF RID: 255 RVA: 0x00005F50 File Offset: 0x00004150 + [XmlIgnore] + public double SinPhi + { + get + { + return base.SinGamma; + } + } + + // Token: 0x06000100 RID: 256 RVA: 0x00005F58 File Offset: 0x00004158 + public static Point3D operator +(Point3D p1, Point3D p2) + { + if (p1 != null) + { + if (p2 != null) + { + return new Point3D + { + X = p1.X + p2.X, + Y = p1.Y + p2.Y, + Z = p1.Z + p2.Z + }; + } + return p1; + } + else + { + if (p2 != null) + { + return p2; + } + return null; + } + } + + // Token: 0x06000101 RID: 257 RVA: 0x00005FB4 File Offset: 0x000041B4 + public static Point3D operator -(Point3D p1) + { + if (p1 != null) + { + return new Point3D + { + X = -p1.X, + Y = -p1.Y, + Z = -p1.Z + }; + } + return null; + } + + // Token: 0x06000102 RID: 258 RVA: 0x00005FF4 File Offset: 0x000041F4 + public static Point3D operator -(Point3D p1, Point3D p2) + { + if (p1 != null) + { + if (p2 != null) + { + return new Point3D + { + X = p1.X - p2.X, + Y = p1.Y - p2.Y, + Z = p1.Z - p2.Z + }; + } + return p1; + } + else + { + if (p2 != null) + { + return new Point3D + { + X = -p2.X, + Y = -p2.Y, + Z = -p2.Z + }; + } + return null; + } + } + + // Token: 0x06000103 RID: 259 RVA: 0x00006080 File Offset: 0x00004280 + public static Point3D operator *(Point3D p1, double f) + { + if (p1 == null) + { + return null; + } + if (f != 0.0) + { + return new Point3D + { + X = p1.X * f, + Y = p1.Y * f, + Z = p1.Z * f + }; + } + return new Point3D(); + } + + // Token: 0x06000104 RID: 260 RVA: 0x000060D8 File Offset: 0x000042D8 + public static double operator *(Point3D p1, Point3D p2) + { + if (p1 == null) + { + return 0.0; + } + if (p2 != null) + { + return p1.X * p2.X + p1.Y * p2.Y + p1.Z * p2.Z; + } + return 0.0; + } + + // Token: 0x06000105 RID: 261 RVA: 0x00006128 File Offset: 0x00004328 + public static Point3D operator ^(Point3D p1, Point3D p2) + { + if (p1 == null) + { + return new Point3D(); + } + if (p2 != null) + { + return new Point3D + { + X = p1.Y * p2.Z - p2.Y * p1.Z, + Y = p1.X * p2.Z - p2.X * p1.Z, + Z = p1.X * p2.Y - p1.Y * p2.X + }; + } + return new Point3D(); + } + + // Token: 0x06000106 RID: 262 RVA: 0x000061B4 File Offset: 0x000043B4 + public static Point3D operator /(Point3D p1, double f) + { + if (p1 == null) + { + return null; + } + if (f != 0.0) + { + return new Point3D + { + X = p1.X / f, + Y = p1.Y / f, + Z = p1.Z / f + }; + } + throw new ArgumentException(); + } + + // Token: 0x06000107 RID: 263 RVA: 0x0000620C File Offset: 0x0000440C + public static bool ValuesEqual(Point3D p1, Point3D p2) + { + double num = ((Math.Abs(p1.Z) > Math.Abs(p2.Z)) ? Math.Abs(p1.Z) : Math.Abs(p2.Z)) * Point2D.precision; + return Math.Abs(p1.Z - p2.Z) <= num && Point2D.ValuesEqual(p1, p2); + } + + // Token: 0x06000108 RID: 264 RVA: 0x0000626E File Offset: 0x0000446E + public static bool operator ==(Point3D p1, Point3D p2) + { + return object.ReferenceEquals(p1, p2) || (!object.ReferenceEquals(p1, null) && !object.ReferenceEquals(p2, null) && Point3D.ValuesEqual(p1, p2)); + } + + // Token: 0x06000109 RID: 265 RVA: 0x00006296 File Offset: 0x00004496 + public static bool operator !=(Point3D p1, Point3D p2) + { + return !object.ReferenceEquals(p1, p2) && (object.ReferenceEquals(p1, null) || object.ReferenceEquals(p2, null) || !Point3D.ValuesEqual(p1, p2)); + } + + // Token: 0x0600010A RID: 266 RVA: 0x000062C1 File Offset: 0x000044C1 + public override bool Equals(object obj) + { + return this.Equals(obj as Point3D); + } + + // Token: 0x0600010B RID: 267 RVA: 0x000062CF File Offset: 0x000044CF + public bool Equals(Point3D p3d) + { + return !object.ReferenceEquals(p3d, null) && Point3D.ValuesEqual(this, p3d); + } + + // Token: 0x0600010C RID: 268 RVA: 0x000062E3 File Offset: 0x000044E3 + public override int GetHashCode() + { + return base.GetHashCode(); + } + } +} diff --git a/CorridorModel/PressureUnit.cs b/CorridorModel/PressureUnit.cs new file mode 100644 index 0000000..3a89021 --- /dev/null +++ b/CorridorModel/PressureUnit.cs @@ -0,0 +1,15 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x02000043 RID: 67 + public enum PressureUnit + { + // Token: 0x04000108 RID: 264 + milliBars, + // Token: 0x04000109 RID: 265 + mmHG, + // Token: 0x0400010A RID: 266 + inchHG + } +} diff --git a/CorridorModel/ProfAlign.cs b/CorridorModel/ProfAlign.cs new file mode 100644 index 0000000..8676069 --- /dev/null +++ b/CorridorModel/ProfAlign.cs @@ -0,0 +1,152 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000016 RID: 22 + [XmlType("ProfAlign")] + [Serializable] + public class ProfAlign + { + // Token: 0x0600014E RID: 334 RVA: 0x00008AE7 File Offset: 0x00006CE7 + public ProfAlign() + { + this.PVIs = new List(); + } + + // Token: 0x17000069 RID: 105 + // (get) Token: 0x0600014F RID: 335 RVA: 0x00008AFA File Offset: 0x00006CFA + // (set) Token: 0x06000150 RID: 336 RVA: 0x00008B02 File Offset: 0x00006D02 + [XmlElement("CircCurve", Type = typeof(CircCurve))] + [XmlElement("UnsymParaCurve", Type = typeof(AsymCurve))] + [XmlElement("PVI", Type = typeof(TextPoint2D))] + [XmlElement("ParaCurve", Type = typeof(ParaCurve))] + public List PVIs { get; set; } + + // Token: 0x1700006A RID: 106 + // (get) Token: 0x06000151 RID: 337 RVA: 0x00008B0B File Offset: 0x00006D0B + // (set) Token: 0x06000152 RID: 338 RVA: 0x00008B13 File Offset: 0x00006D13 + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x1700006B RID: 107 + // (get) Token: 0x06000153 RID: 339 RVA: 0x00008B1C File Offset: 0x00006D1C + // (set) Token: 0x06000154 RID: 340 RVA: 0x00008B24 File Offset: 0x00006D24 + [XmlAttribute("type")] + public int Type { get; set; } + + // Token: 0x06000155 RID: 341 RVA: 0x00008B30 File Offset: 0x00006D30 + public void Transform(GeometryTransformations transformations) + { + foreach (TextPoint2D textPoint2D in this.PVIs) + { + textPoint2D.Transform(transformations, true); + } + } + + // Token: 0x06000156 RID: 342 RVA: 0x00008B84 File Offset: 0x00006D84 + public int IndexOf(TextPoint2D item) + { + return this.PVIs.IndexOf(item); + } + + // Token: 0x06000157 RID: 343 RVA: 0x00008B92 File Offset: 0x00006D92 + public void Insert(int index, TextPoint2D item) + { + this.PVIs.Insert(index, item); + } + + // Token: 0x06000158 RID: 344 RVA: 0x00008BA1 File Offset: 0x00006DA1 + public void RemoveAt(int index) + { + this.PVIs.RemoveAt(index); + } + + // Token: 0x1700006C RID: 108 + [XmlIgnore] + public TextPoint2D this[int index] + { + get + { + if (index < this.PVIs.Count) + { + return this.PVIs[index]; + } + throw new IndexOutOfRangeException(); + } + set + { + if (index < this.PVIs.Count) + { + this.PVIs[index] = value; + return; + } + if (index == this.PVIs.Count) + { + this.PVIs.Add(value); + return; + } + throw new IndexOutOfRangeException(); + } + } + + // Token: 0x0600015B RID: 347 RVA: 0x00008C0F File Offset: 0x00006E0F + public void Add(TextPoint2D item) + { + this.PVIs.Add(item); + } + + // Token: 0x0600015C RID: 348 RVA: 0x00008C1D File Offset: 0x00006E1D + public void Clear() + { + this.PVIs.Clear(); + } + + // Token: 0x0600015D RID: 349 RVA: 0x00008C2A File Offset: 0x00006E2A + public bool Contains(TextPoint2D item) + { + return this.PVIs.Contains(item); + } + + // Token: 0x0600015E RID: 350 RVA: 0x00008C38 File Offset: 0x00006E38 + public void CopyTo(TextPoint2D[] array, int arrayIndex) + { + this.PVIs.CopyTo(array, arrayIndex); + } + + // Token: 0x1700006D RID: 109 + // (get) Token: 0x0600015F RID: 351 RVA: 0x00008C47 File Offset: 0x00006E47 + [XmlIgnore] + public int Count + { + get + { + return this.PVIs.Count; + } + } + + // Token: 0x1700006E RID: 110 + // (get) Token: 0x06000160 RID: 352 RVA: 0x00008C54 File Offset: 0x00006E54 + [XmlIgnore] + public bool IsReadOnly + { + get + { + return false; + } + } + + // Token: 0x06000161 RID: 353 RVA: 0x00008C57 File Offset: 0x00006E57 + public bool Remove(TextPoint2D item) + { + return this.PVIs.Remove(item); + } + + // Token: 0x06000162 RID: 354 RVA: 0x00008C65 File Offset: 0x00006E65 + public IEnumerator GetEnumerator() + { + return this.PVIs.GetEnumerator(); + } + } +} diff --git a/CorridorModel/Profile.cs b/CorridorModel/Profile.cs new file mode 100644 index 0000000..6e9cbf9 --- /dev/null +++ b/CorridorModel/Profile.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000017 RID: 23 + [XmlType("Profile")] + [Serializable] + public class Profile + { + // Token: 0x06000163 RID: 355 RVA: 0x00008C77 File Offset: 0x00006E77 + public Profile() + { + this.ProfileCurve = new List(); + this.ProfileSurfaces = new List(); + } + + // Token: 0x1700006F RID: 111 + // (get) Token: 0x06000164 RID: 356 RVA: 0x00008C95 File Offset: 0x00006E95 + // (set) Token: 0x06000165 RID: 357 RVA: 0x00008C9D File Offset: 0x00006E9D + [XmlElement("ProfSurf")] + public List ProfileSurfaces { get; set; } + + // Token: 0x17000070 RID: 112 + // (get) Token: 0x06000166 RID: 358 RVA: 0x00008CA6 File Offset: 0x00006EA6 + // (set) Token: 0x06000167 RID: 359 RVA: 0x00008CAE File Offset: 0x00006EAE + [XmlElement("ProfAlign")] + public List ProfileCurve { get; set; } + + // Token: 0x17000071 RID: 113 + // (get) Token: 0x06000168 RID: 360 RVA: 0x00008CB7 File Offset: 0x00006EB7 + // (set) Token: 0x06000169 RID: 361 RVA: 0x00008CBF File Offset: 0x00006EBF + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x0600016A RID: 362 RVA: 0x00008CC8 File Offset: 0x00006EC8 + public int IndexOf(ProfAlign item) + { + return this.ProfileCurve.IndexOf(item); + } + + // Token: 0x0600016B RID: 363 RVA: 0x00008CD6 File Offset: 0x00006ED6 + public void Insert(int index, ProfAlign item) + { + this.ProfileCurve.Insert(index, item); + } + + // Token: 0x0600016C RID: 364 RVA: 0x00008CE5 File Offset: 0x00006EE5 + public void RemoveAt(int index) + { + this.ProfileCurve.RemoveAt(index); + } + + // Token: 0x17000072 RID: 114 + public ProfAlign this[int index] + { + get + { + if (index < this.ProfileCurve.Count) + { + return this.ProfileCurve[index]; + } + throw new IndexOutOfRangeException(); + } + set + { + if (index < this.ProfileCurve.Count) + { + this.ProfileCurve[index] = value; + return; + } + if (index == this.ProfileCurve.Count) + { + this.ProfileCurve.Add(value); + return; + } + throw new IndexOutOfRangeException(); + } + } + + // Token: 0x0600016F RID: 367 RVA: 0x00008D53 File Offset: 0x00006F53 + public void Add(ProfAlign item) + { + this.ProfileCurve.Add(item); + } + + // Token: 0x06000170 RID: 368 RVA: 0x00008D61 File Offset: 0x00006F61 + public void Clear() + { + this.ProfileCurve.Clear(); + } + + // Token: 0x06000171 RID: 369 RVA: 0x00008D6E File Offset: 0x00006F6E + public bool Contains(ProfAlign item) + { + return this.ProfileCurve.Contains(item); + } + + // Token: 0x06000172 RID: 370 RVA: 0x00008D7C File Offset: 0x00006F7C + public void CopyTo(ProfAlign[] array, int arrayIndex) + { + this.ProfileCurve.CopyTo(array, arrayIndex); + } + + // Token: 0x17000073 RID: 115 + // (get) Token: 0x06000173 RID: 371 RVA: 0x00008D8B File Offset: 0x00006F8B + [XmlIgnore] + public int Count + { + get + { + return this.ProfileCurve.Count; + } + } + + // Token: 0x17000074 RID: 116 + // (get) Token: 0x06000174 RID: 372 RVA: 0x00008D98 File Offset: 0x00006F98 + [XmlIgnore] + public bool IsReadOnly + { + get + { + return false; + } + } + + // Token: 0x06000175 RID: 373 RVA: 0x00008D9B File Offset: 0x00006F9B + public bool Remove(ProfAlign item) + { + return this.ProfileCurve.Remove(item); + } + + // Token: 0x06000176 RID: 374 RVA: 0x00008DA9 File Offset: 0x00006FA9 + public IEnumerator GetEnumerator() + { + return this.ProfileCurve.GetEnumerator(); + } + } +} diff --git a/CorridorModel/ProfileSurface.cs b/CorridorModel/ProfileSurface.cs new file mode 100644 index 0000000..2898550 --- /dev/null +++ b/CorridorModel/ProfileSurface.cs @@ -0,0 +1,29 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000018 RID: 24 + [XmlType("ProfSurf")] + [Serializable] + public class ProfileSurface + { + // Token: 0x17000075 RID: 117 + // (get) Token: 0x06000177 RID: 375 RVA: 0x00008DBB File Offset: 0x00006FBB + // (set) Token: 0x06000178 RID: 376 RVA: 0x00008DC3 File Offset: 0x00006FC3 + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x17000076 RID: 118 + // (get) Token: 0x06000179 RID: 377 RVA: 0x00008DCC File Offset: 0x00006FCC + // (set) Token: 0x0600017A RID: 378 RVA: 0x00008DD4 File Offset: 0x00006FD4 + [XmlAttribute("state")] + public string State { get; set; } + + // Token: 0x17000077 RID: 119 + // (get) Token: 0x0600017B RID: 379 RVA: 0x00008DDD File Offset: 0x00006FDD + // (set) Token: 0x0600017C RID: 380 RVA: 0x00008DE5 File Offset: 0x00006FE5 + [XmlElement("PntList2D")] + public string PointsList2D { get; set; } + } +} diff --git a/CorridorModel/Project.cs b/CorridorModel/Project.cs new file mode 100644 index 0000000..278145b --- /dev/null +++ b/CorridorModel/Project.cs @@ -0,0 +1,23 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000034 RID: 52 + [XmlType("Project")] + [Serializable] + public class Project + { + // Token: 0x170000ED RID: 237 + // (get) Token: 0x060002DD RID: 733 RVA: 0x0000B718 File Offset: 0x00009918 + // (set) Token: 0x060002DE RID: 734 RVA: 0x0000B720 File Offset: 0x00009920 + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x170000EE RID: 238 + // (get) Token: 0x060002DF RID: 735 RVA: 0x0000B729 File Offset: 0x00009929 + // (set) Token: 0x060002E0 RID: 736 RVA: 0x0000B731 File Offset: 0x00009931 + [XmlAttribute("file")] + public string File { get; set; } + } +} diff --git a/CorridorModel/Properties/AssemblyInfo.cs b/CorridorModel/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1b939d2 --- /dev/null +++ b/CorridorModel/Properties/AssemblyInfo.cs @@ -0,0 +1,21 @@ +using System; +using System.Diagnostics; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; + +[assembly: AssemblyVersion("2016.0.4.3272")] +[assembly: AssemblyFileVersion("2016.0.4.3272")] +[assembly: CompilationRelaxations(8)] +[assembly: AssemblyProduct("CorridorModel")] +[assembly: AssemblyCopyright("© 2015 Autodesk, Inc. All rights reserved.")] +[assembly: AssemblyCompany("Autodesk, Inc.")] +[assembly: Guid("1832935b-271c-47c4-8121-cefe4d9e0173")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyTrademark("Autodesk, Inc.")] +[assembly: ComVisible(false)] +[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] +[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] +[assembly: AssemblyTitle("CorridorModel")] +[assembly: AssemblyDescription("")] diff --git a/CorridorModel/REX/Common/REXFileProperties.cs b/CorridorModel/REX/Common/REXFileProperties.cs new file mode 100644 index 0000000..77bf1fe --- /dev/null +++ b/CorridorModel/REX/Common/REXFileProperties.cs @@ -0,0 +1,32 @@ +using System; + +namespace REX.Common +{ + // Token: 0x02000057 RID: 87 + internal class REXFileProperties + { + // Token: 0x0400015F RID: 351 + public const string Major = "2016"; + + // Token: 0x04000160 RID: 352 + public const string Minor = "0"; + + // Token: 0x04000161 RID: 353 + public const string Patch = "4"; + + // Token: 0x04000162 RID: 354 + public const string Compilation = "3272"; + + // Token: 0x04000163 RID: 355 + public const string Version = "2016.0.4.3272"; + + // Token: 0x04000164 RID: 356 + public const string Company = "Autodesk, Inc."; + + // Token: 0x04000165 RID: 357 + public const string Copyright = "© 2015 Autodesk, Inc. All rights reserved."; + + // Token: 0x04000166 RID: 358 + public const string Trademark = "Autodesk, Inc."; + } +} diff --git a/CorridorModel/Range.cs b/CorridorModel/Range.cs new file mode 100644 index 0000000..85f1f0c --- /dev/null +++ b/CorridorModel/Range.cs @@ -0,0 +1,196 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Xml.Serialization; +using CorridorModel.Interfaces; + +namespace CorridorModel +{ + // Token: 0x02000029 RID: 41 + [XmlType("Range")] + [Serializable] + public class Range : GenerationRangeInstance, IComparableStructure + { + // Token: 0x06000256 RID: 598 RVA: 0x0000A92A File Offset: 0x00008B2A + public Range() + { + this.StartStation = 0.0; + this.EndStation = 0.0; + this.Part = 0; + this.Import = true; + } + + // Token: 0x170000BA RID: 186 + // (get) Token: 0x06000257 RID: 599 RVA: 0x0000A95E File Offset: 0x00008B5E + // (set) Token: 0x06000258 RID: 600 RVA: 0x0000A966 File Offset: 0x00008B66 + [XmlIgnore] + public Part Parent + { + get + { + return this._parent; + } + internal set + { + if (this._parent != value) + { + this._parent = value; + } + } + } + + // Token: 0x170000BB RID: 187 + // (get) Token: 0x06000259 RID: 601 RVA: 0x0000A978 File Offset: 0x00008B78 + // (set) Token: 0x0600025A RID: 602 RVA: 0x0000A980 File Offset: 0x00008B80 + [XmlAttribute("p")] + public int Part { get; set; } + + // Token: 0x170000BC RID: 188 + // (get) Token: 0x0600025B RID: 603 RVA: 0x0000A989 File Offset: 0x00008B89 + [XmlIgnore] + public string NameSideSegment + { + get + { + if (this.Parent == null) + { + return string.Empty; + } + return this.Parent.NameSideSegment; + } + } + + // Token: 0x170000BD RID: 189 + // (get) Token: 0x0600025C RID: 604 RVA: 0x0000A9A4 File Offset: 0x00008BA4 + [XmlIgnore] + public string NameSideSegmentPart + { + get + { + if (this.Parent == null) + { + return this.PartName; + } + return this.NameSideSegment + this.PartName; + } + } + + // Token: 0x170000BE RID: 190 + // (get) Token: 0x0600025D RID: 605 RVA: 0x0000A9C8 File Offset: 0x00008BC8 + [XmlIgnore] + public string PartName + { + get + { + if (this.Part == 0) + { + return string.Empty; + } + return " p" + this.Part.ToString(); + } + } + + // Token: 0x170000BF RID: 191 + // (get) Token: 0x0600025E RID: 606 RVA: 0x0000A9FB File Offset: 0x00008BFB + [XmlIgnore] + public IEnumerable Shapes + { + get + { + if (this.Parent == null) + { + return null; + } + return this.Parent.Shapes; + } + } + + // Token: 0x170000C0 RID: 192 + // (get) Token: 0x0600025F RID: 607 RVA: 0x0000AA12 File Offset: 0x00008C12 + // (set) Token: 0x06000260 RID: 608 RVA: 0x0000AA1A File Offset: 0x00008C1A + [XmlAttribute] + public bool Import + { + get + { + return this._import; + } + set + { + this._import = value; + } + } + + // Token: 0x06000261 RID: 609 RVA: 0x0000AA23 File Offset: 0x00008C23 + public void SetParent(Part part) + { + if (this._parent != part) + { + if (this._parent != null) + { + this._parent.Ranges.Remove(this); + } + this._parent = part; + if (this._parent != null) + { + this._parent.AddRange(this); + } + } + } + + // Token: 0x06000262 RID: 610 RVA: 0x0000AA63 File Offset: 0x00008C63 + public override bool Equals(object obj) + { + return this.Equals(obj as Range); + } + + // Token: 0x06000263 RID: 611 RVA: 0x0000AA71 File Offset: 0x00008C71 + public bool Equals(Range range) + { + return !object.ReferenceEquals(range, null) && !this.DifferentItem(range) && !this.DifferentDescendants(range); + } + + // Token: 0x06000264 RID: 612 RVA: 0x0000AA95 File Offset: 0x00008C95 + public override int GetHashCode() + { + return base.GetHashCode(); + } + + // Token: 0x06000265 RID: 613 RVA: 0x0000AAA0 File Offset: 0x00008CA0 + public bool DifferentItem(Range range) + { + return this.Import != range.Import || this.StartStation != range.StartStation || this.EndStation != range.EndStation || this.GenerationStartStation != range.GenerationStartStation || this.GenerationEndStation != range.GenerationEndStation; + } + + // Token: 0x06000266 RID: 614 RVA: 0x0000AAF8 File Offset: 0x00008CF8 + public bool DifferentDescendants(Range range) + { + IEnumerable shapes = this.Shapes; + IEnumerable shapes2 = range.Shapes; + if (shapes == null || shapes2 == null) + { + return shapes != shapes2; + } + DesignShape[] array = shapes.ToArray(); + DesignShape[] array2 = shapes2.ToArray(); + if (array.Length == array2.Length) + { + for (int i = 0; i < array.Length; i++) + { + if (!array[i].Equals(array2[i])) + { + return true; + } + } + return false; + } + return true; + } + + // Token: 0x04000094 RID: 148 + protected Part _parent; + + // Token: 0x04000095 RID: 149 + protected bool _import; + } +} diff --git a/CorridorModel/Region.cs b/CorridorModel/Region.cs new file mode 100644 index 0000000..c4819a5 --- /dev/null +++ b/CorridorModel/Region.cs @@ -0,0 +1,230 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Xml.Serialization; +using CorridorModel.Interfaces; + +namespace CorridorModel +{ + // Token: 0x0200001D RID: 29 + [XmlType("Region")] + [Serializable] + public class Region : GenerationRange, IComparableStructure + { + // Token: 0x0600019C RID: 412 RVA: 0x00008EAA File Offset: 0x000070AA + public Region() + { + this.Import = true; + this.Parts = new List(); + } + + // Token: 0x17000084 RID: 132 + // (get) Token: 0x0600019D RID: 413 RVA: 0x00008EC4 File Offset: 0x000070C4 + // (set) Token: 0x0600019E RID: 414 RVA: 0x00008ECC File Offset: 0x000070CC + [XmlAttribute("id")] + public int Id { get; set; } + + // Token: 0x17000085 RID: 133 + // (get) Token: 0x0600019F RID: 415 RVA: 0x00008ED5 File Offset: 0x000070D5 + // (set) Token: 0x060001A0 RID: 416 RVA: 0x00008EDD File Offset: 0x000070DD + [XmlAttribute] + public string AssemblyId { get; set; } + + // Token: 0x17000086 RID: 134 + // (get) Token: 0x060001A1 RID: 417 RVA: 0x00008EE6 File Offset: 0x000070E6 + // (set) Token: 0x060001A2 RID: 418 RVA: 0x00008EEE File Offset: 0x000070EE + [XmlAttribute("import")] + public bool Import { get; set; } + + // Token: 0x17000087 RID: 135 + // (get) Token: 0x060001A3 RID: 419 RVA: 0x00008EF7 File Offset: 0x000070F7 + // (set) Token: 0x060001A4 RID: 420 RVA: 0x00008EFF File Offset: 0x000070FF + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x17000088 RID: 136 + // (get) Token: 0x060001A5 RID: 421 RVA: 0x00008F08 File Offset: 0x00007108 + [XmlIgnore] + public string NameRange + { + get + { + return string.Concat(new string[] + { + this.Name, + ": ", + this.StartStation.ToString(), + " - ", + this.EndStation.ToString() + }); + } + } + + // Token: 0x17000089 RID: 137 + // (get) Token: 0x060001A6 RID: 422 RVA: 0x00008F5D File Offset: 0x0000715D + // (set) Token: 0x060001A7 RID: 423 RVA: 0x00008F65 File Offset: 0x00007165 + [XmlAttribute("part")] + public int Part { get; set; } + + // Token: 0x1700008A RID: 138 + // (get) Token: 0x060001A8 RID: 424 RVA: 0x00008F70 File Offset: 0x00007170 + [XmlIgnore] + public string NamePart + { + get + { + return this.Name + ((this.Part != 0) ? (" " + this.Part.ToString()) : string.Empty); + } + } + + // Token: 0x1700008B RID: 139 + // (get) Token: 0x060001A9 RID: 425 RVA: 0x00008FAF File Offset: 0x000071AF + // (set) Token: 0x060001AA RID: 426 RVA: 0x00008FB7 File Offset: 0x000071B7 + [XmlIgnore] + public Alignment Alignment { get; internal set; } + + // Token: 0x1700008C RID: 140 + // (get) Token: 0x060001AB RID: 427 RVA: 0x00008FC0 File Offset: 0x000071C0 + [XmlIgnore] + internal string RegionIdBase + { + get + { + return ((this.Alignment != null) ? this.Alignment.AlignmentId : string.Empty) + this.AssemblyId; + } + } + + // Token: 0x1700008D RID: 141 + // (get) Token: 0x060001AC RID: 428 RVA: 0x00008FE8 File Offset: 0x000071E8 + [XmlIgnore] + public string RegionId + { + get + { + return string.Concat(new string[] + { + this.RegionIdBase, + " (", + this.StartStation.ToString(), + "-", + this.EndStation.ToString(), + ")" + }); + } + } + + // Token: 0x1700008E RID: 142 + // (get) Token: 0x060001AD RID: 429 RVA: 0x00009045 File Offset: 0x00007245 + // (set) Token: 0x060001AE RID: 430 RVA: 0x0000904D File Offset: 0x0000724D + [XmlElement("Part")] + public List Parts { get; set; } + + // Token: 0x060001AF RID: 431 RVA: 0x00009080 File Offset: 0x00007280 + public void AddPart(DesignShape designShape, PartType type, int fColor, int bColor, bool import = true, double start = double.NegativeInfinity, double end = double.PositiveInfinity) + { + Part part = this.Parts.FirstOrDefault((Part item) => item.NameSideSegment == designShape.NameSideSegment); + if (part == null) + { + Part part2 = new Part(designShape); + part2.Type = type; + part2.FillColorARGB = fColor; + part2.BorderColorARGB = bColor; + part2.Import = import; + part2.Region = this; + Part part3 = part2; + int id; + if (this.Parts.Count <= 0) + { + id = 1; + } + else + { + id = this.Parts.Max((Part item) => item.Id) + 1; + } + part3.Id = id; + this.AddPart(part2, start, end); + return; + } + Range range = part.Ranges.Last(); + if (range.EndStation < end) + { + range.EndStation = end; + } + } + + // Token: 0x060001B0 RID: 432 RVA: 0x00009154 File Offset: 0x00007354 + internal void AddPart(Part part, double start = double.NegativeInfinity, double end = double.PositiveInfinity) + { + if (part.Ranges == null) + { + part.Ranges = new List(); + } + this.Parts.Add(part); + if (part.Ranges.Count == 0) + { + Range range = new Range + { + Parent = part + }; + range.SetRange(Math.Max(start, this.StartStation), Math.Min(end, this.EndStation)); + part.AddRange(range); + } + } + + // Token: 0x060001B1 RID: 433 RVA: 0x000091E4 File Offset: 0x000073E4 + public Part FindPart(Part reference) + { + return this.Parts.FirstOrDefault((Part item) => item.NameSideSegment == reference.NameSideSegment); + } + + // Token: 0x060001B2 RID: 434 RVA: 0x00009218 File Offset: 0x00007418 + public void ConnectParts() + { + foreach (Part part in this.Parts) + { + part.Region = this; + } + } + + // Token: 0x060001B3 RID: 435 RVA: 0x0000926C File Offset: 0x0000746C + public override bool Equals(object obj) + { + return this.Equals(obj as Region); + } + + // Token: 0x060001B4 RID: 436 RVA: 0x0000927A File Offset: 0x0000747A + public bool Equals(Region region) + { + return !object.ReferenceEquals(region, null) && !this.DifferentItem(region) && !this.DifferentDescendants(region); + } + + // Token: 0x060001B5 RID: 437 RVA: 0x0000929E File Offset: 0x0000749E + public override int GetHashCode() + { + return base.GetHashCode(); + } + + // Token: 0x060001B6 RID: 438 RVA: 0x000092A8 File Offset: 0x000074A8 + public bool DifferentItem(Region region) + { + return this.Import != region.Import || this.StartStation != region.StartStation || this.EndStation != region.EndStation || this.GenerationStartStation != region.GenerationStartStation || this.GenerationEndStation != region.GenerationEndStation; + } + + // Token: 0x060001B7 RID: 439 RVA: 0x00009300 File Offset: 0x00007500 + public bool DifferentDescendants(Region region) + { + if (this.Parts.Count == region.Parts.Count) + { + for (int i = 0; i < this.Parts.Count; i++) + { + if (!this.Parts[i].Equals(region.Parts[i])) + { + return true; + } + } + return false; + } + return true; + } + } +} diff --git a/CorridorModel/Roadway.cs b/CorridorModel/Roadway.cs new file mode 100644 index 0000000..5ed6034 --- /dev/null +++ b/CorridorModel/Roadway.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000039 RID: 57 + [XmlType("Roadway")] + [Serializable] + public class Roadway + { + // Token: 0x060002FE RID: 766 RVA: 0x0000B844 File Offset: 0x00009A44 + public Roadway() + { + this.Speeds = new List(); + } + + // Token: 0x170000FB RID: 251 + // (get) Token: 0x060002FF RID: 767 RVA: 0x0000B857 File Offset: 0x00009A57 + // (set) Token: 0x06000300 RID: 768 RVA: 0x0000B85F File Offset: 0x00009A5F + [XmlAttribute("CorridorID")] + public string CorridorID { get; set; } + + // Token: 0x170000FC RID: 252 + // (get) Token: 0x06000301 RID: 769 RVA: 0x0000B868 File Offset: 0x00009A68 + // (set) Token: 0x06000302 RID: 770 RVA: 0x0000B870 File Offset: 0x00009A70 + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x170000FD RID: 253 + // (get) Token: 0x06000303 RID: 771 RVA: 0x0000B879 File Offset: 0x00009A79 + // (set) Token: 0x06000304 RID: 772 RVA: 0x0000B881 File Offset: 0x00009A81 + [XmlAttribute("description")] + public string Description { get; set; } + + // Token: 0x170000FE RID: 254 + // (get) Token: 0x06000305 RID: 773 RVA: 0x0000B88A File Offset: 0x00009A8A + // (set) Token: 0x06000306 RID: 774 RVA: 0x0000B892 File Offset: 0x00009A92 + [XmlAttribute("staStart")] + public double StationStart { get; set; } + + // Token: 0x170000FF RID: 255 + // (get) Token: 0x06000307 RID: 775 RVA: 0x0000B89B File Offset: 0x00009A9B + // (set) Token: 0x06000308 RID: 776 RVA: 0x0000B8A3 File Offset: 0x00009AA3 + [XmlAttribute("staEnd")] + public double StationEnd { get; set; } + + // Token: 0x17000100 RID: 256 + // (get) Token: 0x06000309 RID: 777 RVA: 0x0000B8AC File Offset: 0x00009AAC + // (set) Token: 0x0600030A RID: 778 RVA: 0x0000B8B4 File Offset: 0x00009AB4 + [XmlAttribute("surfaceRefs")] + public string SurfaceRefs { get; set; } + + // Token: 0x17000101 RID: 257 + // (get) Token: 0x0600030B RID: 779 RVA: 0x0000B8BD File Offset: 0x00009ABD + // (set) Token: 0x0600030C RID: 780 RVA: 0x0000B8C5 File Offset: 0x00009AC5 + [XmlAttribute("alignmentRefs")] + public string AlignmentRefs { get; set; } + + // Token: 0x17000102 RID: 258 + // (get) Token: 0x0600030D RID: 781 RVA: 0x0000B8CE File Offset: 0x00009ACE + // (set) Token: 0x0600030E RID: 782 RVA: 0x0000B8D6 File Offset: 0x00009AD6 + [XmlAttribute("aIDs")] + public string AlignmentIDs { get; set; } + + // Token: 0x17000103 RID: 259 + // (get) Token: 0x0600030F RID: 783 RVA: 0x0000B8DF File Offset: 0x00009ADF + // (set) Token: 0x06000310 RID: 784 RVA: 0x0000B8E7 File Offset: 0x00009AE7 + [XmlArray("Speeds")] + public List Speeds { get; set; } + + // Token: 0x17000104 RID: 260 + // (get) Token: 0x06000311 RID: 785 RVA: 0x0000B8F0 File Offset: 0x00009AF0 + // (set) Token: 0x06000312 RID: 786 RVA: 0x0000B8F8 File Offset: 0x00009AF8 + [XmlIgnore] + public Model LandXml { get; internal set; } + + // Token: 0x06000313 RID: 787 RVA: 0x0000B904 File Offset: 0x00009B04 + public void AddAlignment(Alignment alignment) + { + this.AlignmentIDs += alignment.ID; + this.AlignmentRefs = this.AlignmentRefs + (string.IsNullOrWhiteSpace(this.AlignmentRefs) ? string.Empty : " ") + alignment.Name; + alignment.Roadway = this; + } + + // Token: 0x06000314 RID: 788 RVA: 0x0000B960 File Offset: 0x00009B60 + public void RemoveAlignment(Alignment alignment) + { + this.AlignmentIDs.Replace(alignment.ID, string.Empty); + this.AlignmentRefs.Replace(this.AlignmentRefs.StartsWith(alignment.Name) ? alignment.Name : (" " + alignment.Name), string.Empty); + alignment.Roadway = null; + } + + // Token: 0x06000315 RID: 789 RVA: 0x0000B9C8 File Offset: 0x00009BC8 + public void ConnectAlignments() + { + foreach (Alignment alignment in this.LandXml.Alignments) + { + alignment.Roadway = this; + } + } + } +} diff --git a/CorridorModel/SectionSurface.cs b/CorridorModel/SectionSurface.cs new file mode 100644 index 0000000..d49a0ee --- /dev/null +++ b/CorridorModel/SectionSurface.cs @@ -0,0 +1,29 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000024 RID: 36 + [XmlType("CrossSectSurf")] + [Serializable] + public class SectionSurface + { + // Token: 0x170000B5 RID: 181 + // (get) Token: 0x0600024A RID: 586 RVA: 0x0000A8CF File Offset: 0x00008ACF + // (set) Token: 0x0600024B RID: 587 RVA: 0x0000A8D7 File Offset: 0x00008AD7 + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x170000B6 RID: 182 + // (get) Token: 0x0600024C RID: 588 RVA: 0x0000A8E0 File Offset: 0x00008AE0 + // (set) Token: 0x0600024D RID: 589 RVA: 0x0000A8E8 File Offset: 0x00008AE8 + [XmlAttribute("desc")] + public string Description { get; set; } + + // Token: 0x170000B7 RID: 183 + // (get) Token: 0x0600024E RID: 590 RVA: 0x0000A8F1 File Offset: 0x00008AF1 + // (set) Token: 0x0600024F RID: 591 RVA: 0x0000A8F9 File Offset: 0x00008AF9 + [XmlElement("PntList2D")] + public string SurfacePoints { get; set; } + } +} diff --git a/CorridorModel/ShapeModel.cs b/CorridorModel/ShapeModel.cs new file mode 100644 index 0000000..ac7210a --- /dev/null +++ b/CorridorModel/ShapeModel.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000050 RID: 80 + [XmlType("Shape")] + [Serializable] + public class ShapeModel : Location + { + // Token: 0x060003BC RID: 956 RVA: 0x0000DB64 File Offset: 0x0000BD64 + public ShapeModel() + { + this.Bases = new List(); + } + + // Token: 0x04000151 RID: 337 + [XmlAttribute("type")] + public ShapeType Type; + + // Token: 0x04000152 RID: 338 + [XmlElement("Base")] + public List Bases; + } +} diff --git a/CorridorModel/ShapeType.cs b/CorridorModel/ShapeType.cs new file mode 100644 index 0000000..bcc0888 --- /dev/null +++ b/CorridorModel/ShapeType.cs @@ -0,0 +1,13 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x02000053 RID: 83 + public enum ShapeType + { + // Token: 0x04000156 RID: 342 + Prism, + // Token: 0x04000157 RID: 343 + Pyramid + } +} diff --git a/CorridorModel/Side.cs b/CorridorModel/Side.cs new file mode 100644 index 0000000..4535a12 --- /dev/null +++ b/CorridorModel/Side.cs @@ -0,0 +1,15 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x02000025 RID: 37 + public enum Side + { + // Token: 0x04000090 RID: 144 + Both, + // Token: 0x04000091 RID: 145 + Left, + // Token: 0x04000092 RID: 146 + Right + } +} diff --git a/CorridorModel/SolidCategory.cs b/CorridorModel/SolidCategory.cs new file mode 100644 index 0000000..e371cee --- /dev/null +++ b/CorridorModel/SolidCategory.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200004C RID: 76 + [XmlType("SolidCategory")] + [Serializable] + public class SolidCategory + { + // Token: 0x060003B4 RID: 948 RVA: 0x0000DB01 File Offset: 0x0000BD01 + public SolidCategory() + { + this.Solids = new List(); + } + + // Token: 0x0400014A RID: 330 + [XmlAttribute("name")] + public string Name; + + // Token: 0x0400014B RID: 331 + [XmlElement("Element")] + public List Solids; + } +} diff --git a/CorridorModel/SolidInstances.cs b/CorridorModel/SolidInstances.cs new file mode 100644 index 0000000..adc8110 --- /dev/null +++ b/CorridorModel/SolidInstances.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200004D RID: 77 + [XmlType("SolidInstances")] + [Serializable] + public class SolidInstances + { + // Token: 0x1700013E RID: 318 + // (get) Token: 0x060003B5 RID: 949 RVA: 0x0000DB14 File Offset: 0x0000BD14 + // (set) Token: 0x060003B6 RID: 950 RVA: 0x0000DB1C File Offset: 0x0000BD1C + [XmlElement("Location")] + public List Locations { get; set; } + + // Token: 0x1700013F RID: 319 + // (get) Token: 0x060003B7 RID: 951 RVA: 0x0000DB25 File Offset: 0x0000BD25 + // (set) Token: 0x060003B8 RID: 952 RVA: 0x0000DB2D File Offset: 0x0000BD2D + [XmlElement("Model")] + public SolidModel Model { get; set; } + + // Token: 0x060003B9 RID: 953 RVA: 0x0000DB36 File Offset: 0x0000BD36 + public SolidInstances() + { + this.Locations = new List(); + } + } +} diff --git a/CorridorModel/SolidModel.cs b/CorridorModel/SolidModel.cs new file mode 100644 index 0000000..64a3056 --- /dev/null +++ b/CorridorModel/SolidModel.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000054 RID: 84 + [XmlType("Solid")] + [Serializable] + public class SolidModel + { + // Token: 0x060003BF RID: 959 RVA: 0x0000DB92 File Offset: 0x0000BD92 + public SolidModel() + { + this.Elements = new List(); + } + + // Token: 0x04000158 RID: 344 + [XmlAttribute("name")] + public string Name; + + // Token: 0x04000159 RID: 345 + [XmlAttribute("Type")] + public SolidType Type; + + // Token: 0x0400015A RID: 346 + [XmlElement("Element")] + public List Elements; + } +} diff --git a/CorridorModel/SolidType.cs b/CorridorModel/SolidType.cs new file mode 100644 index 0000000..39b1a76 --- /dev/null +++ b/CorridorModel/SolidType.cs @@ -0,0 +1,11 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x02000055 RID: 85 + public enum SolidType + { + // Token: 0x0400015C RID: 348 + Custom + } +} diff --git a/CorridorModel/SourceData.cs b/CorridorModel/SourceData.cs new file mode 100644 index 0000000..b73bb63 --- /dev/null +++ b/CorridorModel/SourceData.cs @@ -0,0 +1,12 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200003A RID: 58 + [XmlType("SourceData")] + [Serializable] + public class SourceData + { + } +} diff --git a/CorridorModel/Spiral.cs b/CorridorModel/Spiral.cs new file mode 100644 index 0000000..7b6de50 --- /dev/null +++ b/CorridorModel/Spiral.cs @@ -0,0 +1,792 @@ +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Runtime.CompilerServices; +using System.Xml.Serialization; +using Microsoft.CSharp.RuntimeBinder; + +namespace CorridorModel +{ + // Token: 0x02000012 RID: 18 + [XmlType("Spiral")] + [Serializable] + public class Spiral : Interval + { + // Token: 0x0600012F RID: 303 RVA: 0x00007694 File Offset: 0x00005894 + public Spiral() + { + base._points = new List(3); + base._points.Add(new TextPoint2D()); + base._points.Add(new TextPoint2D()); + base._points.Add(new TextPoint2D()); + } + + // Token: 0x06000130 RID: 304 RVA: 0x000076E4 File Offset: 0x000058E4 + public Spiral(Spiral entity) : this() + { + base.Length = entity.Length; + this.TanShort = entity.TanShort; + this.TanLong = entity.TanLong; + this.TotalX = entity.TotalX; + this.TotalY = entity.TotalY; + this.Dir = entity.Dir; + this.RadiusStart = entity.RadiusStart; + this.RadiusEnd = entity.RadiusEnd; + this.Rot = entity.Rot; + this.SpiType = entity.SpiType; + base.Start = entity.Start; + base.End = entity.End; + this.PI = entity.PI; + } + + // Token: 0x06000131 RID: 305 RVA: 0x00007794 File Offset: 0x00005994 + public Spiral(dynamic entity, dynamic baseline, dynamic profile) : this() + { + if (Spiral.ctor.p__Site1 == null) + { + Spiral.ctor.p__Site1 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target = Spiral.ctor.p__Site1.Target; + CallSite p__Site = Spiral.ctor.p__Site1; + if (Spiral.ctor.p__Site2 == null) + { + Spiral.ctor.p__Site2 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "Length", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + base.Length = target(p__Site, Spiral.ctor.p__Site2.Target(Spiral.ctor.p__Site2, entity)); + if (Spiral.ctor.p__Site3 == null) + { + Spiral.ctor.p__Site3 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target2 = Spiral.ctor.p__Site3.Target; + CallSite p__Site2 = Spiral.ctor.p__Site3; + if (Spiral.ctor.p__Site4 == null) + { + Spiral.ctor.p__Site4 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "ShortTangent", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.TanShort = target2(p__Site2, Spiral.ctor.p__Site4.Target(Spiral.ctor.p__Site4, entity)); + if (Spiral.ctor.p__Site5 == null) + { + Spiral.ctor.p__Site5 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target3 = Spiral.ctor.p__Site5.Target; + CallSite p__Site3 = Spiral.ctor.p__Site5; + if (Spiral.ctor.p__Site6 == null) + { + Spiral.ctor.p__Site6 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "LongTangent", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.TanLong = target3(p__Site3, Spiral.ctor.p__Site6.Target(Spiral.ctor.p__Site6, entity)); + if (Spiral.ctor.p__Site7 == null) + { + Spiral.ctor.p__Site7 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target4 = Spiral.ctor.p__Site7.Target; + CallSite p__Site4 = Spiral.ctor.p__Site7; + if (Spiral.ctor.p__Site8 == null) + { + Spiral.ctor.p__Site8 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "TotalX", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.TotalX = target4(p__Site4, Spiral.ctor.p__Site8.Target(Spiral.ctor.p__Site8, entity)); + if (Spiral.ctor.p__Site9 == null) + { + Spiral.ctor.p__Site9 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target5 = Spiral.ctor.p__Site9.Target; + CallSite p__Site5 = Spiral.ctor.p__Site9; + if (Spiral.ctor.p__Sitea == null) + { + Spiral.ctor.p__Sitea = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "TotalY", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.TotalY = target5(p__Site5, Spiral.ctor.p__Sitea.Target(Spiral.ctor.p__Sitea, entity)); + if (Spiral.ctor.p__Siteb == null) + { + Spiral.ctor.p__Siteb = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target6 = Spiral.ctor.p__Siteb.Target; + CallSite p__Siteb = Spiral.ctor.p__Siteb; + if (Spiral.ctor.p__Sitec == null) + { + Spiral.ctor.p__Sitec = CallSite>.Create(Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.Divide, typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + Func target7 = Spiral.ctor.p__Sitec.Target; + CallSite p__Sitec = Spiral.ctor.p__Sitec; + if (Spiral.ctor.p__Sited == null) + { + Spiral.ctor.p__Sited = CallSite>.Create(Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.Multiply, typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + Func target8 = Spiral.ctor.p__Sited.Target; + CallSite p__Sited = Spiral.ctor.p__Sited; + if (Spiral.ctor.p__Sitee == null) + { + Spiral.ctor.p__Sitee = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "Direction", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.Dir = target6(p__Siteb, target7(p__Sitec, target8(p__Sited, Spiral.ctor.p__Sitee.Target(Spiral.ctor.p__Sitee, entity), 180.0), 3.1415926535897931)); + if (Spiral.ctor.p__Sitef == null) + { + Spiral.ctor.p__Sitef = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target9 = Spiral.ctor.p__Sitef.Target; + CallSite p__Sitef = Spiral.ctor.p__Sitef; + if (Spiral.ctor.p__Site10 == null) + { + Spiral.ctor.p__Site10 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "RadiusIn", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.RadiusStart = target9(p__Sitef, Spiral.ctor.p__Site10.Target(Spiral.ctor.p__Site10, entity)); + if (Spiral.ctor.p__Site11 == null) + { + Spiral.ctor.p__Site11 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target10 = Spiral.ctor.p__Site11.Target; + CallSite p__Site6 = Spiral.ctor.p__Site11; + if (Spiral.ctor.p__Site12 == null) + { + Spiral.ctor.p__Site12 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "RadiusOut", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.RadiusEnd = target10(p__Site6, Spiral.ctor.p__Site12.Target(Spiral.ctor.p__Site12, entity)); + if (Spiral.ctor.p__Site13 == null) + { + Spiral.ctor.p__Site13 = CallSite>.Create(Binder.UnaryOperation(CSharpBinderFlags.None, ExpressionType.IsTrue, typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target11 = Spiral.ctor.p__Site13.Target; + CallSite p__Site7 = Spiral.ctor.p__Site13; + if (Spiral.ctor.p__Site14 == null) + { + Spiral.ctor.p__Site14 = CallSite>.Create(Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.Equal, typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + Func target12 = Spiral.ctor.p__Site14.Target; + CallSite p__Site8 = Spiral.ctor.p__Site14; + if (Spiral.ctor.p__Site15 == null) + { + Spiral.ctor.p__Site15 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "Direction", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.Rot = (target11(p__Site7, target12(p__Site8, Spiral.ctor.p__Site15.Target(Spiral.ctor.p__Site15, entity), 0)) ? "ccw" : "cw"); + if (Spiral.ctor.p__Site16 == null) + { + Spiral.ctor.p__Site16 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(string), typeof(Spiral))); + } + Func target13 = Spiral.ctor.p__Site16.Target; + CallSite p__Site9 = Spiral.ctor.p__Site16; + if (Spiral.ctor.p__Site17 == null) + { + Spiral.ctor.p__Site17 = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "ToString", null, typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target14 = Spiral.ctor.p__Site17.Target; + CallSite p__Site10 = Spiral.ctor.p__Site17; + if (Spiral.ctor.p__Site18 == null) + { + Spiral.ctor.p__Site18 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "SpiralType", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + this.SpiType = target13(p__Site9, target14(p__Site10, Spiral.ctor.p__Site18.Target(Spiral.ctor.p__Site18, entity))); + if (Spiral.ctor.p__Site19 == null) + { + Spiral.ctor.p__Site19 = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "StationOffsetElevationToXYZ", null, typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target15 = Spiral.ctor.p__Site19.Target; + CallSite p__Site11 = Spiral.ctor.p__Site19; + double[] array = new double[3]; + double[] array2 = array; + int num = 0; + if (Spiral.ctor.p__Site1a == null) + { + Spiral.ctor.p__Site1a = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target16 = Spiral.ctor.p__Site1a.Target; + CallSite p__Site1a = Spiral.ctor.p__Site1a; + if (Spiral.ctor.p__Site1b == null) + { + Spiral.ctor.p__Site1b = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "StartingStation", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array2[num] = target16(p__Site1a, Spiral.ctor.p__Site1b.Target(Spiral.ctor.p__Site1b, entity)); + double[] array3 = array; + int num2 = 2; + if (Spiral.ctor.p__Site1c == null) + { + Spiral.ctor.p__Site1c = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target17 = Spiral.ctor.p__Site1c.Target; + CallSite p__Site1c = Spiral.ctor.p__Site1c; + if (Spiral.ctor.p__Site1d == null) + { + Spiral.ctor.p__Site1d = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "ElevationAt", null, typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target18 = Spiral.ctor.p__Site1d.Target; + CallSite p__Site1d = Spiral.ctor.p__Site1d; + if (Spiral.ctor.p__Site1e == null) + { + Spiral.ctor.p__Site1e = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "StartingStation", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array3[num2] = target17(p__Site1c, target18(p__Site1d, profile, Spiral.ctor.p__Site1e.Target(Spiral.ctor.p__Site1e, entity))); + object obj = target15(p__Site11, baseline, array); + if (Spiral.ctor.p__Site1f == null) + { + Spiral.ctor.p__Site1f = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "StationOffsetElevationToXYZ", null, typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target19 = Spiral.ctor.p__Site1f.Target; + CallSite p__Site1f = Spiral.ctor.p__Site1f; + double[] array4 = new double[3]; + double[] array5 = array4; + int num3 = 0; + if (Spiral.ctor.p__Site20 == null) + { + Spiral.ctor.p__Site20 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target20 = Spiral.ctor.p__Site20.Target; + CallSite p__Site12 = Spiral.ctor.p__Site20; + if (Spiral.ctor.p__Site21 == null) + { + Spiral.ctor.p__Site21 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "EndingStation", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array5[num3] = target20(p__Site12, Spiral.ctor.p__Site21.Target(Spiral.ctor.p__Site21, entity)); + double[] array6 = array4; + int num4 = 2; + if (Spiral.ctor.p__Site22 == null) + { + Spiral.ctor.p__Site22 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target21 = Spiral.ctor.p__Site22.Target; + CallSite p__Site13 = Spiral.ctor.p__Site22; + if (Spiral.ctor.p__Site23 == null) + { + Spiral.ctor.p__Site23 = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "ElevationAt", null, typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target22 = Spiral.ctor.p__Site23.Target; + CallSite p__Site14 = Spiral.ctor.p__Site23; + if (Spiral.ctor.p__Site24 == null) + { + Spiral.ctor.p__Site24 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "EndingStation", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array6[num4] = target21(p__Site13, target22(p__Site14, profile, Spiral.ctor.p__Site24.Target(Spiral.ctor.p__Site24, entity))); + object obj2 = target19(p__Site1f, baseline, array4); + if (Spiral.ctor.p__Site25 == null) + { + Spiral.ctor.p__Site25 = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "StationOffsetElevationToXYZ", null, typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target23 = Spiral.ctor.p__Site25.Target; + CallSite p__Site15 = Spiral.ctor.p__Site25; + double[] array7 = new double[3]; + double[] array8 = array7; + int num5 = 0; + if (Spiral.ctor.p__Site26 == null) + { + Spiral.ctor.p__Site26 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target24 = Spiral.ctor.p__Site26.Target; + CallSite p__Site16 = Spiral.ctor.p__Site26; + if (Spiral.ctor.p__Site27 == null) + { + Spiral.ctor.p__Site27 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "SPIStation", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array8[num5] = target24(p__Site16, Spiral.ctor.p__Site27.Target(Spiral.ctor.p__Site27, entity)); + double[] array9 = array7; + int num6 = 2; + if (Spiral.ctor.p__Site28 == null) + { + Spiral.ctor.p__Site28 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target25 = Spiral.ctor.p__Site28.Target; + CallSite p__Site17 = Spiral.ctor.p__Site28; + if (Spiral.ctor.p__Site29 == null) + { + Spiral.ctor.p__Site29 = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "ElevationAt", null, typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target26 = Spiral.ctor.p__Site29.Target; + CallSite p__Site18 = Spiral.ctor.p__Site29; + if (Spiral.ctor.p__Site2a == null) + { + Spiral.ctor.p__Site2a = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "SPIStation", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array9[num6] = target25(p__Site17, target26(p__Site18, profile, Spiral.ctor.p__Site2a.Target(Spiral.ctor.p__Site2a, entity))); + object obj3 = target23(p__Site15, baseline, array7); + if (Spiral.ctor.p__Site2b == null) + { + Spiral.ctor.p__Site2b = CallSite>.Create(Binder.InvokeConstructor(CSharpBinderFlags.None, typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.IsStaticType, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target27 = Spiral.ctor.p__Site2b.Target; + CallSite p__Site2b = Spiral.ctor.p__Site2b; + Type typeFromHandle = typeof(TextPoint2D); + object arg = obj; + double[] array10 = new double[2]; + double[] array11 = array10; + int num7 = 0; + if (Spiral.ctor.p__Site2c == null) + { + Spiral.ctor.p__Site2c = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target28 = Spiral.ctor.p__Site2c.Target; + CallSite p__Site2c = Spiral.ctor.p__Site2c; + if (Spiral.ctor.p__Site2d == null) + { + Spiral.ctor.p__Site2d = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "StartEasting", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array11[num7] = target28(p__Site2c, Spiral.ctor.p__Site2d.Target(Spiral.ctor.p__Site2d, entity)); + double[] array12 = array10; + int num8 = 1; + if (Spiral.ctor.p__Site2e == null) + { + Spiral.ctor.p__Site2e = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target29 = Spiral.ctor.p__Site2e.Target; + CallSite p__Site2e = Spiral.ctor.p__Site2e; + if (Spiral.ctor.p__Site2f == null) + { + Spiral.ctor.p__Site2f = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "StartNorthing", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array12[num8] = target29(p__Site2e, Spiral.ctor.p__Site2f.Target(Spiral.ctor.p__Site2f, entity)); + base.Start = target27(p__Site2b, typeFromHandle, arg, array10); + if (Spiral.ctor.p__Site30 == null) + { + Spiral.ctor.p__Site30 = CallSite>.Create(Binder.InvokeConstructor(CSharpBinderFlags.None, typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.IsStaticType, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target30 = Spiral.ctor.p__Site30.Target; + CallSite p__Site19 = Spiral.ctor.p__Site30; + Type typeFromHandle2 = typeof(TextPoint2D); + object arg2 = obj2; + double[] array13 = new double[2]; + double[] array14 = array13; + int num9 = 0; + if (Spiral.ctor.p__Site31 == null) + { + Spiral.ctor.p__Site31 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target31 = Spiral.ctor.p__Site31.Target; + CallSite p__Site20 = Spiral.ctor.p__Site31; + if (Spiral.ctor.p__Site32 == null) + { + Spiral.ctor.p__Site32 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "EndEasting", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array14[num9] = target31(p__Site20, Spiral.ctor.p__Site32.Target(Spiral.ctor.p__Site32, entity)); + double[] array15 = array13; + int num10 = 1; + if (Spiral.ctor.p__Site33 == null) + { + Spiral.ctor.p__Site33 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target32 = Spiral.ctor.p__Site33.Target; + CallSite p__Site21 = Spiral.ctor.p__Site33; + if (Spiral.ctor.p__Site34 == null) + { + Spiral.ctor.p__Site34 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "EndNorthing", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array15[num10] = target32(p__Site21, Spiral.ctor.p__Site34.Target(Spiral.ctor.p__Site34, entity)); + base.End = target30(p__Site19, typeFromHandle2, arg2, array13); + if (Spiral.ctor.p__Site35 == null) + { + Spiral.ctor.p__Site35 = CallSite>.Create(Binder.InvokeConstructor(CSharpBinderFlags.None, typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.IsStaticType, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) + })); + } + Func target33 = Spiral.ctor.p__Site35.Target; + CallSite p__Site22 = Spiral.ctor.p__Site35; + Type typeFromHandle3 = typeof(TextPoint2D); + object arg3 = obj3; + double[] array16 = new double[2]; + double[] array17 = array16; + int num11 = 0; + if (Spiral.ctor.p__Site36 == null) + { + Spiral.ctor.p__Site36 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target34 = Spiral.ctor.p__Site36.Target; + CallSite p__Site23 = Spiral.ctor.p__Site36; + if (Spiral.ctor.p__Site37 == null) + { + Spiral.ctor.p__Site37 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "PIEasting", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array17[num11] = target34(p__Site23, Spiral.ctor.p__Site37.Target(Spiral.ctor.p__Site37, entity)); + double[] array18 = array16; + int num12 = 1; + if (Spiral.ctor.p__Site38 == null) + { + Spiral.ctor.p__Site38 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(Spiral))); + } + Func target35 = Spiral.ctor.p__Site38.Target; + CallSite p__Site24 = Spiral.ctor.p__Site38; + if (Spiral.ctor.p__Site39 == null) + { + Spiral.ctor.p__Site39 = CallSite>.Create(Binder.GetMember(CSharpBinderFlags.None, "PINorthing", typeof(Spiral), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + array18[num12] = target35(p__Site24, Spiral.ctor.p__Site39.Target(Spiral.ctor.p__Site39, entity)); + this.PI = target33(p__Site22, typeFromHandle3, arg3, array16); + while (this.Dir < 0.0) + { + this.Dir += 360.0; + } + while (this.Dir >= 360.0) + { + this.Dir -= 360.0; + } + } + + // Token: 0x1700005D RID: 93 + // (get) Token: 0x06000132 RID: 306 RVA: 0x000089EC File Offset: 0x00006BEC + // (set) Token: 0x06000133 RID: 307 RVA: 0x000089F4 File Offset: 0x00006BF4 + [XmlAttribute("tanShort")] + public double TanShort { get; set; } + + // Token: 0x1700005E RID: 94 + // (get) Token: 0x06000134 RID: 308 RVA: 0x000089FD File Offset: 0x00006BFD + // (set) Token: 0x06000135 RID: 309 RVA: 0x00008A05 File Offset: 0x00006C05 + [XmlAttribute("tanLong")] + public double TanLong { get; set; } + + // Token: 0x1700005F RID: 95 + // (get) Token: 0x06000136 RID: 310 RVA: 0x00008A0E File Offset: 0x00006C0E + // (set) Token: 0x06000137 RID: 311 RVA: 0x00008A16 File Offset: 0x00006C16 + [XmlAttribute("totalX")] + public double TotalX { get; set; } + + // Token: 0x17000060 RID: 96 + // (get) Token: 0x06000138 RID: 312 RVA: 0x00008A1F File Offset: 0x00006C1F + // (set) Token: 0x06000139 RID: 313 RVA: 0x00008A27 File Offset: 0x00006C27 + [XmlAttribute("totalY")] + public double TotalY { get; set; } + + // Token: 0x17000061 RID: 97 + // (get) Token: 0x0600013A RID: 314 RVA: 0x00008A30 File Offset: 0x00006C30 + // (set) Token: 0x0600013B RID: 315 RVA: 0x00008A38 File Offset: 0x00006C38 + [XmlAttribute("theta")] + public double Dir { get; set; } + + // Token: 0x17000062 RID: 98 + // (get) Token: 0x0600013C RID: 316 RVA: 0x00008A41 File Offset: 0x00006C41 + // (set) Token: 0x0600013D RID: 317 RVA: 0x00008A49 File Offset: 0x00006C49 + [XmlAttribute("radiusStart")] + public double RadiusStart { get; set; } + + // Token: 0x17000063 RID: 99 + // (get) Token: 0x0600013E RID: 318 RVA: 0x00008A52 File Offset: 0x00006C52 + // (set) Token: 0x0600013F RID: 319 RVA: 0x00008A5A File Offset: 0x00006C5A + [XmlAttribute("radiusEnd")] + public double RadiusEnd { get; set; } + + // Token: 0x17000064 RID: 100 + // (get) Token: 0x06000140 RID: 320 RVA: 0x00008A63 File Offset: 0x00006C63 + // (set) Token: 0x06000141 RID: 321 RVA: 0x00008A6B File Offset: 0x00006C6B + [XmlAttribute("rot")] + public string Rot { get; set; } + + // Token: 0x17000065 RID: 101 + // (get) Token: 0x06000142 RID: 322 RVA: 0x00008A74 File Offset: 0x00006C74 + // (set) Token: 0x06000143 RID: 323 RVA: 0x00008A7C File Offset: 0x00006C7C + [XmlAttribute("spiType")] + public string SpiType { get; set; } + + // Token: 0x17000066 RID: 102 + // (get) Token: 0x06000144 RID: 324 RVA: 0x00008A85 File Offset: 0x00006C85 + // (set) Token: 0x06000145 RID: 325 RVA: 0x00008A93 File Offset: 0x00006C93 + [XmlElement("PI")] + public TextPoint2D PI + { + get + { + return base._points[2]; + } + set + { + base._points[2] = value; + } + } + + // Token: 0x06000146 RID: 326 RVA: 0x00008AA2 File Offset: 0x00006CA2 + public override double GetDirectionAtPoint(double station) + { + return 0.0; + } + + // Token: 0x02000063 RID: 99 + [CompilerGenerated] + private static class ctor + { + // Token: 0x040001E7 RID: 487 + public static CallSite> p__Site1; + + // Token: 0x040001E8 RID: 488 + public static CallSite> p__Site2; + + // Token: 0x040001E9 RID: 489 + public static CallSite> p__Site3; + + // Token: 0x040001EA RID: 490 + public static CallSite> p__Site4; + + // Token: 0x040001EB RID: 491 + public static CallSite> p__Site5; + + // Token: 0x040001EC RID: 492 + public static CallSite> p__Site6; + + // Token: 0x040001ED RID: 493 + public static CallSite> p__Site7; + + // Token: 0x040001EE RID: 494 + public static CallSite> p__Site8; + + // Token: 0x040001EF RID: 495 + public static CallSite> p__Site9; + + // Token: 0x040001F0 RID: 496 + public static CallSite> p__Sitea; + + // Token: 0x040001F1 RID: 497 + public static CallSite> p__Siteb; + + // Token: 0x040001F2 RID: 498 + public static CallSite> p__Sitec; + + // Token: 0x040001F3 RID: 499 + public static CallSite> p__Sited; + + // Token: 0x040001F4 RID: 500 + public static CallSite> p__Sitee; + + // Token: 0x040001F5 RID: 501 + public static CallSite> p__Sitef; + + // Token: 0x040001F6 RID: 502 + public static CallSite> p__Site10; + + // Token: 0x040001F7 RID: 503 + public static CallSite> p__Site11; + + // Token: 0x040001F8 RID: 504 + public static CallSite> p__Site12; + + // Token: 0x040001F9 RID: 505 + public static CallSite> p__Site13; + + // Token: 0x040001FA RID: 506 + public static CallSite> p__Site14; + + // Token: 0x040001FB RID: 507 + public static CallSite> p__Site15; + + // Token: 0x040001FC RID: 508 + public static CallSite> p__Site16; + + // Token: 0x040001FD RID: 509 + public static CallSite> p__Site17; + + // Token: 0x040001FE RID: 510 + public static CallSite> p__Site18; + + // Token: 0x040001FF RID: 511 + public static CallSite> p__Site19; + + // Token: 0x04000200 RID: 512 + public static CallSite> p__Site1a; + + // Token: 0x04000201 RID: 513 + public static CallSite> p__Site1b; + + // Token: 0x04000202 RID: 514 + public static CallSite> p__Site1c; + + // Token: 0x04000203 RID: 515 + public static CallSite> p__Site1d; + + // Token: 0x04000204 RID: 516 + public static CallSite> p__Site1e; + + // Token: 0x04000205 RID: 517 + public static CallSite> p__Site1f; + + // Token: 0x04000206 RID: 518 + public static CallSite> p__Site20; + + // Token: 0x04000207 RID: 519 + public static CallSite> p__Site21; + + // Token: 0x04000208 RID: 520 + public static CallSite> p__Site22; + + // Token: 0x04000209 RID: 521 + public static CallSite> p__Site23; + + // Token: 0x0400020A RID: 522 + public static CallSite> p__Site24; + + // Token: 0x0400020B RID: 523 + public static CallSite> p__Site25; + + // Token: 0x0400020C RID: 524 + public static CallSite> p__Site26; + + // Token: 0x0400020D RID: 525 + public static CallSite> p__Site27; + + // Token: 0x0400020E RID: 526 + public static CallSite> p__Site28; + + // Token: 0x0400020F RID: 527 + public static CallSite> p__Site29; + + // Token: 0x04000210 RID: 528 + public static CallSite> p__Site2a; + + // Token: 0x04000211 RID: 529 + public static CallSite> p__Site2b; + + // Token: 0x04000212 RID: 530 + public static CallSite> p__Site2c; + + // Token: 0x04000213 RID: 531 + public static CallSite> p__Site2d; + + // Token: 0x04000214 RID: 532 + public static CallSite> p__Site2e; + + // Token: 0x04000215 RID: 533 + public static CallSite> p__Site2f; + + // Token: 0x04000216 RID: 534 + public static CallSite> p__Site30; + + // Token: 0x04000217 RID: 535 + public static CallSite> p__Site31; + + // Token: 0x04000218 RID: 536 + public static CallSite> p__Site32; + + // Token: 0x04000219 RID: 537 + public static CallSite> p__Site33; + + // Token: 0x0400021A RID: 538 + public static CallSite> p__Site34; + + // Token: 0x0400021B RID: 539 + public static CallSite> p__Site35; + + // Token: 0x0400021C RID: 540 + public static CallSite> p__Site36; + + // Token: 0x0400021D RID: 541 + public static CallSite> p__Site37; + + // Token: 0x0400021E RID: 542 + public static CallSite> p__Site38; + + // Token: 0x0400021F RID: 543 + public static CallSite> p__Site39; + } + } +} diff --git a/CorridorModel/StringByteConversion.cs b/CorridorModel/StringByteConversion.cs new file mode 100644 index 0000000..7138ae5 --- /dev/null +++ b/CorridorModel/StringByteConversion.cs @@ -0,0 +1,21 @@ +using System; +using System.Text; + +namespace CorridorModel +{ + // Token: 0x0200004A RID: 74 + public static class StringByteConversion + { + // Token: 0x060003B2 RID: 946 RVA: 0x0000DAE7 File Offset: 0x0000BCE7 + public static byte[] GetBytes(string str) + { + return Encoding.Default.GetBytes(str); + } + + // Token: 0x060003B3 RID: 947 RVA: 0x0000DAF4 File Offset: 0x0000BCF4 + public static string GetString(byte[] bytes) + { + return Encoding.Default.GetString(bytes); + } + } +} diff --git a/CorridorModel/Structures.cs b/CorridorModel/Structures.cs new file mode 100644 index 0000000..dd4d8d5 --- /dev/null +++ b/CorridorModel/Structures.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x02000056 RID: 86 + [XmlType("Structures")] + [Serializable] + public class Structures + { + [XmlElement("SolidCategory")] + public List SolidCategories { get; set; } + + public Structures() + { + this.SolidCategories = new List(); + } + + [XmlAttribute("name")] + public string Name; + } +} diff --git a/CorridorModel/SuperElevation.cs b/CorridorModel/SuperElevation.cs new file mode 100644 index 0000000..2129408 --- /dev/null +++ b/CorridorModel/SuperElevation.cs @@ -0,0 +1,23 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200002D RID: 45 + [XmlType("Superelevation")] + [Serializable] + public class SuperElevation + { + // Token: 0x170000D2 RID: 210 + // (get) Token: 0x06000293 RID: 659 RVA: 0x0000B09F File Offset: 0x0000929F + // (set) Token: 0x06000294 RID: 660 RVA: 0x0000B0A7 File Offset: 0x000092A7 + [XmlAttribute("staStart")] + public double StartStation { get; set; } + + // Token: 0x170000D3 RID: 211 + // (get) Token: 0x06000295 RID: 661 RVA: 0x0000B0B0 File Offset: 0x000092B0 + // (set) Token: 0x06000296 RID: 662 RVA: 0x0000B0B8 File Offset: 0x000092B8 + [XmlAttribute("staEnd")] + public double EndStation { get; set; } + } +} diff --git a/CorridorModel/Surface.cs b/CorridorModel/Surface.cs new file mode 100644 index 0000000..559e675 --- /dev/null +++ b/CorridorModel/Surface.cs @@ -0,0 +1,35 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200003B RID: 59 + [XmlType("Surface")] + [Serializable] + public class Surface + { + // Token: 0x17000105 RID: 261 + // (get) Token: 0x06000317 RID: 791 RVA: 0x0000BA24 File Offset: 0x00009C24 + // (set) Token: 0x06000318 RID: 792 RVA: 0x0000BA2C File Offset: 0x00009C2C + [XmlAttribute("name")] + public string Name { get; set; } + + // Token: 0x17000106 RID: 262 + // (get) Token: 0x06000319 RID: 793 RVA: 0x0000BA35 File Offset: 0x00009C35 + // (set) Token: 0x0600031A RID: 794 RVA: 0x0000BA3D File Offset: 0x00009C3D + [XmlAttribute("desc")] + public string Description { get; set; } + + // Token: 0x17000107 RID: 263 + // (get) Token: 0x0600031B RID: 795 RVA: 0x0000BA46 File Offset: 0x00009C46 + // (set) Token: 0x0600031C RID: 796 RVA: 0x0000BA4E File Offset: 0x00009C4E + [XmlElement("SourceData")] + public SourceData SourceData { get; set; } + + // Token: 0x17000108 RID: 264 + // (get) Token: 0x0600031D RID: 797 RVA: 0x0000BA57 File Offset: 0x00009C57 + // (set) Token: 0x0600031E RID: 798 RVA: 0x0000BA5F File Offset: 0x00009C5F + [XmlElement("Definition")] + public Definition Definition { get; set; } + } +} diff --git a/CorridorModel/Tangent.cs b/CorridorModel/Tangent.cs new file mode 100644 index 0000000..b835a29 --- /dev/null +++ b/CorridorModel/Tangent.cs @@ -0,0 +1,10 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x02000019 RID: 25 + [Serializable] + public class Tangent : ParaCurve + { + } +} diff --git a/CorridorModel/TemperatureUnit.cs b/CorridorModel/TemperatureUnit.cs new file mode 100644 index 0000000..699e7ec --- /dev/null +++ b/CorridorModel/TemperatureUnit.cs @@ -0,0 +1,13 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x02000044 RID: 68 + public enum TemperatureUnit + { + // Token: 0x0400010C RID: 268 + celsius, + // Token: 0x0400010D RID: 269 + fahrenheit + } +} diff --git a/CorridorModel/TextPoint2D.cs b/CorridorModel/TextPoint2D.cs new file mode 100644 index 0000000..d724e6b --- /dev/null +++ b/CorridorModel/TextPoint2D.cs @@ -0,0 +1,453 @@ +using System; +using System.Globalization; +using System.Linq; +using System.Linq.Expressions; +using System.Runtime.CompilerServices; +using System.Xml.Serialization; +using Microsoft.CSharp.RuntimeBinder; + +namespace CorridorModel +{ + // Token: 0x0200000E RID: 14 + [Serializable] + public class TextPoint2D : Point3D + { + // Token: 0x0600010D RID: 269 RVA: 0x000062EB File Offset: 0x000044EB + public TextPoint2D() + { + this._first = 0.0; + this._second = 0.0; + this._text = "0 0"; + } + + // Token: 0x0600010E RID: 270 RVA: 0x0000631C File Offset: 0x0000451C + public TextPoint2D(TextPoint2D source) : base(source) + { + this._first = source._first; + this._second = source._second; + this._text = source._text; + } + + // Token: 0x0600010F RID: 271 RVA: 0x0000634C File Offset: 0x0000454C + public TextPoint2D(dynamic xyz, dynamic point) + { + if (TextPoint2D.ctor.p__Sitee == null) + { + TextPoint2D.ctor.p__Sitee = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(string), typeof(TextPoint2D))); + } + Func target = TextPoint2D.ctor.p__Sitee.Target; + CallSite p__Sitee = TextPoint2D.ctor.p__Sitee; + if (TextPoint2D.ctor.p__Sitef == null) + { + TextPoint2D.ctor.p__Sitef = CallSite>.Create(Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.Add, typeof(TextPoint2D), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target2 = TextPoint2D.ctor.p__Sitef.Target; + CallSite p__Sitef = TextPoint2D.ctor.p__Sitef; + if (TextPoint2D.ctor.p__Site10 == null) + { + TextPoint2D.ctor.p__Site10 = CallSite>.Create(Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.Add, typeof(TextPoint2D), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + Func target3 = TextPoint2D.ctor.p__Site10.Target; + CallSite p__Site = TextPoint2D.ctor.p__Site10; + if (TextPoint2D.ctor.p__Site11 == null) + { + TextPoint2D.ctor.p__Site11 = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "ToString", null, typeof(TextPoint2D), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target4 = TextPoint2D.ctor.p__Site11.Target; + CallSite p__Site2 = TextPoint2D.ctor.p__Site11; + if (TextPoint2D.ctor.p__Site12 == null) + { + TextPoint2D.ctor.p__Site12 = CallSite>.Create(Binder.GetIndex(CSharpBinderFlags.None, typeof(TextPoint2D), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + object arg = target3(p__Site, target4(p__Site2, TextPoint2D.ctor.p__Site12.Target(TextPoint2D.ctor.p__Site12, point, 1)), " "); + if (TextPoint2D.ctor.p__Site13 == null) + { + TextPoint2D.ctor.p__Site13 = CallSite>.Create(Binder.InvokeMember(CSharpBinderFlags.None, "ToString", null, typeof(TextPoint2D), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) + })); + } + Func target5 = TextPoint2D.ctor.p__Site13.Target; + CallSite p__Site3 = TextPoint2D.ctor.p__Site13; + if (TextPoint2D.ctor.p__Site14 == null) + { + TextPoint2D.ctor.p__Site14 = CallSite>.Create(Binder.GetIndex(CSharpBinderFlags.None, typeof(TextPoint2D), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + this.Text = target(p__Sitee, target2(p__Sitef, arg, target5(p__Site3, TextPoint2D.ctor.p__Site14.Target(TextPoint2D.ctor.p__Site14, point, 0)))); + if (TextPoint2D.ctor.p__Site15 == null) + { + TextPoint2D.ctor.p__Site15 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(TextPoint2D))); + } + Func target6 = TextPoint2D.ctor.p__Site15.Target; + CallSite p__Site4 = TextPoint2D.ctor.p__Site15; + if (TextPoint2D.ctor.p__Site16 == null) + { + TextPoint2D.ctor.p__Site16 = CallSite>.Create(Binder.GetIndex(CSharpBinderFlags.None, typeof(TextPoint2D), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + base.X = target6(p__Site4, TextPoint2D.ctor.p__Site16.Target(TextPoint2D.ctor.p__Site16, xyz, 0)); + if (TextPoint2D.ctor.p__Site17 == null) + { + TextPoint2D.ctor.p__Site17 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(TextPoint2D))); + } + Func target7 = TextPoint2D.ctor.p__Site17.Target; + CallSite p__Site5 = TextPoint2D.ctor.p__Site17; + if (TextPoint2D.ctor.p__Site18 == null) + { + TextPoint2D.ctor.p__Site18 = CallSite>.Create(Binder.GetIndex(CSharpBinderFlags.None, typeof(TextPoint2D), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + base.Y = target7(p__Site5, TextPoint2D.ctor.p__Site18.Target(TextPoint2D.ctor.p__Site18, xyz, 1)); + if (TextPoint2D.ctor.p__Site19 == null) + { + TextPoint2D.ctor.p__Site19 = CallSite>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(double), typeof(TextPoint2D))); + } + Func target8 = TextPoint2D.ctor.p__Site19.Target; + CallSite p__Site6 = TextPoint2D.ctor.p__Site19; + if (TextPoint2D.ctor.p__Site1a == null) + { + TextPoint2D.ctor.p__Site1a = CallSite>.Create(Binder.GetIndex(CSharpBinderFlags.None, typeof(TextPoint2D), new CSharpArgumentInfo[] + { + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null), + CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) + })); + } + base.Z = target8(p__Site6, TextPoint2D.ctor.p__Site1a.Target(TextPoint2D.ctor.p__Site1a, xyz, 2)); + } + + // Token: 0x17000053 RID: 83 + // (get) Token: 0x06000110 RID: 272 RVA: 0x00006768 File Offset: 0x00004968 + // (set) Token: 0x06000111 RID: 273 RVA: 0x00006770 File Offset: 0x00004970 + [XmlText] + public string Text + { + get + { + return this._text; + } + set + { + if (this._text != value) + { + this._text = value; + if (this._text != null && this._text.Contains(' ')) + { + string[] array = this._text.Split(new char[] + { + ' ' + }); + if (array.Length > 1) + { + double.TryParse(array[0], NumberStyles.Float, CultureInfo.InvariantCulture, out this._first); + double.TryParse(array[1], NumberStyles.Float, CultureInfo.InvariantCulture, out this._second); + } + } + } + } + } + + // Token: 0x06000112 RID: 274 RVA: 0x000067FA File Offset: 0x000049FA + public void setText(double x, double y) + { + this._text = x.ToString(CultureInfo.InvariantCulture) + " " + y.ToString(CultureInfo.InvariantCulture); + this._first = x; + this._second = y; + } + + // Token: 0x17000054 RID: 84 + // (get) Token: 0x06000113 RID: 275 RVA: 0x00006832 File Offset: 0x00004A32 + // (set) Token: 0x06000114 RID: 276 RVA: 0x0000683C File Offset: 0x00004A3C + [XmlIgnore] + public double First + { + get + { + return this._first; + } + set + { + if (this._first != value) + { + this._first = value; + this._text = this._first.ToString(CultureInfo.InvariantCulture) + " " + this._second.ToString(CultureInfo.InvariantCulture); + } + } + } + + // Token: 0x17000055 RID: 85 + // (get) Token: 0x06000115 RID: 277 RVA: 0x00006889 File Offset: 0x00004A89 + // (set) Token: 0x06000116 RID: 278 RVA: 0x00006894 File Offset: 0x00004A94 + [XmlIgnore] + public double Second + { + get + { + return this._second; + } + set + { + if (this._second != value) + { + this._second = value; + this._text = this._first.ToString(CultureInfo.InvariantCulture) + " " + this._second.ToString(CultureInfo.InvariantCulture); + } + } + } + + // Token: 0x17000056 RID: 86 + // (get) Token: 0x06000117 RID: 279 RVA: 0x000068E1 File Offset: 0x00004AE1 + [XmlIgnore] + public double TextLength + { + get + { + return Math.Sqrt(this.TextLengthSquared); + } + } + + // Token: 0x17000057 RID: 87 + // (get) Token: 0x06000118 RID: 280 RVA: 0x000068EE File Offset: 0x00004AEE + [XmlIgnore] + public double TextLengthSquared + { + get + { + return this.First * this.First + this.Second * this.Second; + } + } + + // Token: 0x17000058 RID: 88 + // (get) Token: 0x06000119 RID: 281 RVA: 0x0000690C File Offset: 0x00004B0C + [XmlIgnore] + public double TextAngle + { + get + { + double num = (this.Second != 0.0) ? ((this.First != 0.0) ? Math.Asin(this.Second / this.TextLength) : ((double)Math.Sign(this.Second) * 3.1415926535897931 * 0.5)) : 0.0; + if (this.First >= 0.0) + { + return num; + } + return 3.1415926535897931 - num; + } + } + + // Token: 0x17000059 RID: 89 + // (get) Token: 0x0600011A RID: 282 RVA: 0x00006999 File Offset: 0x00004B99 + [XmlIgnore] + public double SinTextAngle + { + get + { + if (this.Second == 0.0) + { + return 0.0; + } + return this.Second / this.TextLength; + } + } + + // Token: 0x1700005A RID: 90 + // (get) Token: 0x0600011B RID: 283 RVA: 0x000069C4 File Offset: 0x00004BC4 + [XmlIgnore] + public double TanTextAngle + { + get + { + if (this.Second == 0.0) + { + return 0.0; + } + if (this.First == 0.0) + { + return double.PositiveInfinity; + } + return this.Second / this.First; + } + } + + // Token: 0x0600011C RID: 284 RVA: 0x00006A14 File Offset: 0x00004C14 + public void Transform(GeometryTransformations transformations, bool dz) + { + this.setText(this.First * transformations.ScaleFactor, this.Second * transformations.ScaleFactor + (dz ? transformations.Dz : 0.0)); + transformations.Transform(this); + } + + // Token: 0x0600011D RID: 285 RVA: 0x00006A52 File Offset: 0x00004C52 + public static bool ValuesEqual(TextPoint2D p1, TextPoint2D p2) + { + return p1.Text == p2.Text && Point3D.ValuesEqual(p1, p2); + } + + // Token: 0x0600011E RID: 286 RVA: 0x00006A70 File Offset: 0x00004C70 + public static bool operator ==(TextPoint2D p1, TextPoint2D p2) + { + return object.ReferenceEquals(p1, p2) || (!object.ReferenceEquals(p1, null) && !object.ReferenceEquals(p2, null) && TextPoint2D.ValuesEqual(p1, p2)); + } + + // Token: 0x0600011F RID: 287 RVA: 0x00006A98 File Offset: 0x00004C98 + public static bool operator !=(TextPoint2D p1, TextPoint2D p2) + { + return !object.ReferenceEquals(p1, p2) && (object.ReferenceEquals(p1, null) || object.ReferenceEquals(p2, null) || !TextPoint2D.ValuesEqual(p1, p2)); + } + + // Token: 0x06000120 RID: 288 RVA: 0x00006AC3 File Offset: 0x00004CC3 + public override bool Equals(object obj) + { + return this.Equals(obj as TextPoint2D); + } + + // Token: 0x06000121 RID: 289 RVA: 0x00006AD1 File Offset: 0x00004CD1 + public bool Equals(TextPoint2D p2d) + { + return !object.ReferenceEquals(p2d, null) && TextPoint2D.ValuesEqual(this, p2d); + } + + // Token: 0x06000122 RID: 290 RVA: 0x00006AE5 File Offset: 0x00004CE5 + public override int GetHashCode() + { + return base.GetHashCode(); + } + + // Token: 0x06000123 RID: 291 RVA: 0x00006AF0 File Offset: 0x00004CF0 + public static TextPoint2D operator +(TextPoint2D p1, TextPoint2D p2) + { + if (p1 != null) + { + if (p2 != null) + { + return new TextPoint2D + { + X = p1.X + p2.X, + Y = p1.Y + p2.Y, + Z = p1.Z + p2.Z, + _first = p1._first + p2._first, + Second = p1._second + p2._second + }; + } + return p1; + } + else + { + if (p2 != null) + { + return p2; + } + return null; + } + } + + // Token: 0x06000124 RID: 292 RVA: 0x00006B74 File Offset: 0x00004D74 + public static TextPoint2D operator -(TextPoint2D p1, TextPoint2D p2) + { + if (p1 != null) + { + if (p2 != null) + { + return new TextPoint2D + { + X = p1.X - p2.X, + Y = p1.Y - p2.Y, + Z = p1.Z - p2.Z, + _first = p1._first - p2._first, + Second = p1._second - p2._second + }; + } + return p1; + } + else + { + if (p2 != null) + { + return new TextPoint2D + { + X = -p2.X, + Y = -p2.Y, + Z = -p2.Z, + _first = -p1._first, + Second = -p2._second + }; + } + return null; + } + } + + // Token: 0x0400003A RID: 58 + protected string _text; + + // Token: 0x0400003B RID: 59 + protected double _first; + + // Token: 0x0400003C RID: 60 + protected double _second; + + // Token: 0x02000061 RID: 97 + [CompilerGenerated] + private static class ctor + { + // Token: 0x040001BE RID: 446 + public static CallSite> p__Sitee; + + // Token: 0x040001BF RID: 447 + public static CallSite> p__Sitef; + + // Token: 0x040001C0 RID: 448 + public static CallSite> p__Site10; + + // Token: 0x040001C1 RID: 449 + public static CallSite> p__Site11; + + // Token: 0x040001C2 RID: 450 + public static CallSite> p__Site12; + + // Token: 0x040001C3 RID: 451 + public static CallSite> p__Site13; + + // Token: 0x040001C4 RID: 452 + public static CallSite> p__Site14; + + // Token: 0x040001C5 RID: 453 + public static CallSite> p__Site15; + + // Token: 0x040001C6 RID: 454 + public static CallSite> p__Site16; + + // Token: 0x040001C7 RID: 455 + public static CallSite> p__Site17; + + // Token: 0x040001C8 RID: 456 + public static CallSite> p__Site18; + + // Token: 0x040001C9 RID: 457 + public static CallSite> p__Site19; + + // Token: 0x040001CA RID: 458 + public static CallSite> p__Site1a; + } + } +} diff --git a/CorridorModel/TextPoint3D.cs b/CorridorModel/TextPoint3D.cs new file mode 100644 index 0000000..cb8d76a --- /dev/null +++ b/CorridorModel/TextPoint3D.cs @@ -0,0 +1,143 @@ +using System; +using System.Globalization; +using System.Linq; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200002F RID: 47 + public class TextPoint3D : TextPoint2D + { + // Token: 0x170000DA RID: 218 + // (get) Token: 0x060002A5 RID: 677 RVA: 0x0000B137 File Offset: 0x00009337 + // (set) Token: 0x060002A6 RID: 678 RVA: 0x0000B140 File Offset: 0x00009340 + [XmlText] + public new string Text + { + get + { + return this._text; + } + set + { + if (this._text != value) + { + this._text = value; + if (this._text != null && this._text.Contains(' ')) + { + string[] array = this._text.Split(new char[] + { + ' ' + }); + if (array.Length > 2) + { + double.TryParse(array[0], NumberStyles.Float, CultureInfo.InvariantCulture, out this._first); + double.TryParse(array[1], NumberStyles.Float, CultureInfo.InvariantCulture, out this._second); + double.TryParse(array[2], NumberStyles.Float, CultureInfo.InvariantCulture, out this._third); + } + } + } + } + } + + // Token: 0x170000DB RID: 219 + // (get) Token: 0x060002A7 RID: 679 RVA: 0x0000B1E6 File Offset: 0x000093E6 + // (set) Token: 0x060002A8 RID: 680 RVA: 0x0000B1F0 File Offset: 0x000093F0 + [XmlIgnore] + public new double First + { + get + { + return this._first; + } + set + { + if (this._first != value) + { + this._first = value; + this._text = string.Concat(new string[] + { + this._first.ToString(CultureInfo.InvariantCulture), + " ", + this._second.ToString(CultureInfo.InvariantCulture), + " ", + this._third.ToString(CultureInfo.InvariantCulture) + }); + } + } + } + + // Token: 0x170000DC RID: 220 + // (get) Token: 0x060002A9 RID: 681 RVA: 0x0000B269 File Offset: 0x00009469 + // (set) Token: 0x060002AA RID: 682 RVA: 0x0000B274 File Offset: 0x00009474 + [XmlIgnore] + public new double Second + { + get + { + return this._second; + } + set + { + if (this._second != value) + { + this._second = value; + this._text = string.Concat(new string[] + { + this._first.ToString(CultureInfo.InvariantCulture), + " ", + this._second.ToString(CultureInfo.InvariantCulture), + " ", + this._third.ToString(CultureInfo.InvariantCulture) + }); + } + } + } + + // Token: 0x170000DD RID: 221 + // (get) Token: 0x060002AB RID: 683 RVA: 0x0000B2ED File Offset: 0x000094ED + // (set) Token: 0x060002AC RID: 684 RVA: 0x0000B2F8 File Offset: 0x000094F8 + [XmlIgnore] + public double Third + { + get + { + return this._third; + } + set + { + if (this._third != value) + { + this._third = value; + this._text = string.Concat(new string[] + { + this._first.ToString(CultureInfo.InvariantCulture), + " ", + this._second.ToString(CultureInfo.InvariantCulture), + " ", + this._third.ToString(CultureInfo.InvariantCulture) + }); + } + } + } + + // Token: 0x060002AD RID: 685 RVA: 0x0000B374 File Offset: 0x00009574 + public void setText(double x, double y, double z) + { + this._text = string.Concat(new string[] + { + x.ToString(CultureInfo.InvariantCulture), + " ", + y.ToString(CultureInfo.InvariantCulture), + " ", + z.ToString(CultureInfo.InvariantCulture) + }); + this._first = x; + this._second = y; + this._third = z; + } + + // Token: 0x040000B0 RID: 176 + private double _third; + } +} diff --git a/CorridorModel/Unit.cs b/CorridorModel/Unit.cs new file mode 100644 index 0000000..527f22c --- /dev/null +++ b/CorridorModel/Unit.cs @@ -0,0 +1,517 @@ +using System; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200003C RID: 60 + [Serializable] + public abstract class Unit + { + // Token: 0x17000109 RID: 265 + // (get) Token: 0x06000320 RID: 800 RVA: 0x0000BA70 File Offset: 0x00009C70 + // (set) Token: 0x06000321 RID: 801 RVA: 0x0000BA78 File Offset: 0x00009C78 + [XmlIgnore] + public DirectionUnit _directionUnit { get; set; } + + // Token: 0x1700010A RID: 266 + // (get) Token: 0x06000322 RID: 802 RVA: 0x0000BA84 File Offset: 0x00009C84 + // (set) Token: 0x06000323 RID: 803 RVA: 0x0000BABC File Offset: 0x00009CBC + [XmlAttribute("directionUnit")] + public string DirectionUnit + { + get + { + switch (this._directionUnit) + { + default: + return "decimal degrees"; + case CorridorModel.DirectionUnit.grads: + return "grads"; + case CorridorModel.DirectionUnit.radians: + return "radians"; + } + } + set + { + if (value != null && !(value == "decimal degrees")) + { + if (value == "grads") + { + this._directionUnit = CorridorModel.DirectionUnit.grads; + return; + } + if (value == "radians") + { + this._directionUnit = CorridorModel.DirectionUnit.radians; + return; + } + } + this._directionUnit = CorridorModel.DirectionUnit.decimal_degrees; + } + } + + // Token: 0x1700010B RID: 267 + // (get) Token: 0x06000324 RID: 804 RVA: 0x0000BB0C File Offset: 0x00009D0C + // (set) Token: 0x06000325 RID: 805 RVA: 0x0000BB44 File Offset: 0x00009D44 + [XmlIgnore] + public int AcadDirectionUnit + { + get + { + switch (this._directionUnit) + { + default: + return 179; + case CorridorModel.DirectionUnit.grads: + return 180; + case CorridorModel.DirectionUnit.radians: + return 178; + } + } + set + { + switch (value) + { + case 178: + this._directionUnit = CorridorModel.DirectionUnit.radians; + return; + default: + this._directionUnit = CorridorModel.DirectionUnit.decimal_degrees; + return; + case 180: + this._directionUnit = CorridorModel.DirectionUnit.grads; + return; + } + } + } + + // Token: 0x1700010C RID: 268 + // (get) Token: 0x06000326 RID: 806 RVA: 0x0000BB82 File Offset: 0x00009D82 + // (set) Token: 0x06000327 RID: 807 RVA: 0x0000BB8A File Offset: 0x00009D8A + [XmlIgnore] + public DirectionUnit _angularUnit { get; set; } + + // Token: 0x1700010D RID: 269 + // (get) Token: 0x06000328 RID: 808 RVA: 0x0000BB94 File Offset: 0x00009D94 + // (set) Token: 0x06000329 RID: 809 RVA: 0x0000BBCC File Offset: 0x00009DCC + [XmlAttribute("angularUnit")] + public string AngularUnit + { + get + { + switch (this._angularUnit) + { + default: + return "decimal degrees"; + case CorridorModel.DirectionUnit.grads: + return "grads"; + case CorridorModel.DirectionUnit.radians: + return "radians"; + } + } + set + { + if (value != null && !(value == "decimal degrees")) + { + if (value == "grads") + { + this._angularUnit = CorridorModel.DirectionUnit.grads; + return; + } + if (value == "radians") + { + this._angularUnit = CorridorModel.DirectionUnit.radians; + return; + } + } + this._angularUnit = CorridorModel.DirectionUnit.decimal_degrees; + } + } + + // Token: 0x1700010E RID: 270 + // (get) Token: 0x0600032A RID: 810 RVA: 0x0000BC1C File Offset: 0x00009E1C + // (set) Token: 0x0600032B RID: 811 RVA: 0x0000BC54 File Offset: 0x00009E54 + [XmlIgnore] + public int AcadAngularUnit + { + get + { + switch (this._angularUnit) + { + default: + return 179; + case CorridorModel.DirectionUnit.grads: + return 180; + case CorridorModel.DirectionUnit.radians: + return 178; + } + } + set + { + switch (value) + { + case 178: + this._angularUnit = CorridorModel.DirectionUnit.radians; + return; + default: + this._angularUnit = CorridorModel.DirectionUnit.decimal_degrees; + return; + case 180: + this._angularUnit = CorridorModel.DirectionUnit.grads; + return; + } + } + } + + // Token: 0x1700010F RID: 271 + // (get) Token: 0x0600032C RID: 812 RVA: 0x0000BC92 File Offset: 0x00009E92 + // (set) Token: 0x0600032D RID: 813 RVA: 0x0000BC9A File Offset: 0x00009E9A + [XmlAttribute("diameterUnit")] + public DiameterUnit DiameterUnit { get; set; } + + // Token: 0x17000110 RID: 272 + // (get) Token: 0x0600032E RID: 814 RVA: 0x0000BCA4 File Offset: 0x00009EA4 + // (set) Token: 0x0600032F RID: 815 RVA: 0x0000BCFC File Offset: 0x00009EFC + [XmlIgnore] + public int AcadDiameterUnit + { + get + { + switch (this.DiameterUnit) + { + case DiameterUnit.meter: + return 2; + case DiameterUnit.millimeter: + return 25; + default: + return 24; + case DiameterUnit.decimeter: + return 23; + case DiameterUnit.kilometer: + return 20; + case DiameterUnit.inch: + return 31; + case DiameterUnit.foot: + return 30; + case DiameterUnit.yard: + return 33; + case DiameterUnit.mile: + return 44; + } + } + set + { + if (value <= 25) + { + if (value == 2) + { + this.DiameterUnit = DiameterUnit.meter; + return; + } + switch (value) + { + case 20: + this.DiameterUnit = DiameterUnit.kilometer; + return; + case 23: + this.DiameterUnit = DiameterUnit.decimeter; + return; + case 25: + this.DiameterUnit = DiameterUnit.millimeter; + return; + } + } + else + { + switch (value) + { + case 30: + this.DiameterUnit = DiameterUnit.foot; + return; + case 31: + this.DiameterUnit = DiameterUnit.inch; + return; + case 32: + break; + case 33: + this.DiameterUnit = DiameterUnit.yard; + return; + default: + if (value == 44) + { + this.DiameterUnit = DiameterUnit.mile; + return; + } + break; + } + } + this.DiameterUnit = DiameterUnit.centimeter; + } + } + + // Token: 0x17000111 RID: 273 + // (get) Token: 0x06000330 RID: 816 RVA: 0x0000BD9C File Offset: 0x00009F9C + // (set) Token: 0x06000331 RID: 817 RVA: 0x0000BDA4 File Offset: 0x00009FA4 + [XmlAttribute("pressureUnit")] + public PressureUnit PressureUnit { get; set; } + + // Token: 0x17000112 RID: 274 + // (get) Token: 0x06000332 RID: 818 RVA: 0x0000BDAD File Offset: 0x00009FAD + // (set) Token: 0x06000333 RID: 819 RVA: 0x0000BDB5 File Offset: 0x00009FB5 + [XmlAttribute("temperatureUnit")] + public TemperatureUnit TemperatureUnit { get; set; } + + // Token: 0x17000113 RID: 275 + // (get) Token: 0x06000334 RID: 820 RVA: 0x0000BDBE File Offset: 0x00009FBE + // (set) Token: 0x06000335 RID: 821 RVA: 0x0000BDC6 File Offset: 0x00009FC6 + [XmlAttribute("areaUnit")] + public AreaUnit AreaUnit { get; set; } + + // Token: 0x17000114 RID: 276 + // (get) Token: 0x06000336 RID: 822 RVA: 0x0000BDD0 File Offset: 0x00009FD0 + // (set) Token: 0x06000337 RID: 823 RVA: 0x0000BE1C File Offset: 0x0000A01C + [XmlIgnore] + public int AcadAreaUnit + { + get + { + switch (this.AreaUnit) + { + default: + return 55; + case AreaUnit.squareFoot: + return 56; + case AreaUnit.squareYard: + return 93; + case AreaUnit.acre: + return 57; + case AreaUnit.hectare: + return 61; + case AreaUnit.squareKilometer: + return 75; + case AreaUnit.squareMile: + return 83; + } + } + set + { + if (value <= 75) + { + switch (value) + { + case 55: + case 58: + case 59: + case 60: + break; + case 56: + this.AreaUnit = AreaUnit.squareFoot; + return; + case 57: + this.AreaUnit = AreaUnit.acre; + return; + case 61: + this.AreaUnit = AreaUnit.hectare; + return; + default: + if (value == 75) + { + this.AreaUnit = AreaUnit.squareKilometer; + return; + } + break; + } + } + else + { + if (value == 83) + { + this.AreaUnit = AreaUnit.squareMile; + return; + } + if (value == 93) + { + this.AreaUnit = AreaUnit.squareYard; + return; + } + } + this.AreaUnit = AreaUnit.squareMeter; + } + } + + // Token: 0x17000115 RID: 277 + // (get) Token: 0x06000338 RID: 824 RVA: 0x0000BE9D File Offset: 0x0000A09D + // (set) Token: 0x06000339 RID: 825 RVA: 0x0000BEA5 File Offset: 0x0000A0A5 + [XmlAttribute("volumeUnit")] + public VolumeUnit VolumeUnit { get; set; } + + // Token: 0x17000116 RID: 278 + // (get) Token: 0x0600033A RID: 826 RVA: 0x0000BEB0 File Offset: 0x0000A0B0 + // (set) Token: 0x0600033B RID: 827 RVA: 0x0000BEEC File Offset: 0x0000A0EC + [XmlIgnore] + public int AcadVolumeUnit + { + get + { + switch (this.VolumeUnit) + { + default: + return 96; + case VolumeUnit.cubicInch: + return 3; + case VolumeUnit.cubicFoot: + return 130; + case VolumeUnit.cubicYard: + return 153; + } + } + set + { + if (value <= 96) + { + if (value == 3) + { + this.VolumeUnit = VolumeUnit.cubicInch; + return; + } + if (value != 96) + { + } + } + else + { + if (value == 130) + { + this.VolumeUnit = VolumeUnit.cubicFoot; + return; + } + if (value == 153) + { + this.VolumeUnit = VolumeUnit.cubicYard; + return; + } + } + this.VolumeUnit = VolumeUnit.cubicMeter; + } + } + + // Token: 0x17000117 RID: 279 + // (get) Token: 0x0600033C RID: 828 RVA: 0x0000BF3A File Offset: 0x0000A13A + // (set) Token: 0x0600033D RID: 829 RVA: 0x0000BF42 File Offset: 0x0000A142 + [XmlAttribute("linearUnit")] + public LinearUnit LinearUnit { get; set; } + + // Token: 0x0600033E RID: 830 RVA: 0x0000BF4C File Offset: 0x0000A14C + public static int LinearUnitId(LinearUnit linearUnit) + { + switch (linearUnit) + { + case LinearUnit.milimeter: + return 25; + case LinearUnit.centimeter: + return 24; + case LinearUnit.decimeter: + return 23; + case LinearUnit.kilometer: + return 20; + case LinearUnit.inch: + return 31; + case LinearUnit.foot: + return 30; + case LinearUnit.yard: + return 33; + case LinearUnit.mile: + return 44; + } + return 2; + } + + // Token: 0x0600033F RID: 831 RVA: 0x0000BFA0 File Offset: 0x0000A1A0 + public static int LinearUnitIdCOM(LinearUnit linearUnit) + { + switch (linearUnit) + { + case LinearUnit.milimeter: + return 7; + case LinearUnit.centimeter: + return 8; + case LinearUnit.decimeter: + return 9; + case LinearUnit.kilometer: + return 2; + case LinearUnit.inch: + return 4; + case LinearUnit.foot: + return 3; + case LinearUnit.yard: + return 5; + case LinearUnit.mile: + return 6; + } + return 1; + } + + // Token: 0x17000118 RID: 280 + // (get) Token: 0x06000340 RID: 832 RVA: 0x0000BFED File Offset: 0x0000A1ED + // (set) Token: 0x06000341 RID: 833 RVA: 0x0000BFFC File Offset: 0x0000A1FC + [XmlIgnore] + public int AcadLinearUnit + { + get + { + return Unit.LinearUnitId(this.LinearUnit); + } + set + { + if (value <= 25) + { + if (value == 2) + { + this.LinearUnit = LinearUnit.meter; + return; + } + switch (value) + { + case 20: + this.LinearUnit = LinearUnit.kilometer; + return; + case 23: + this.LinearUnit = LinearUnit.decimeter; + return; + case 25: + this.LinearUnit = LinearUnit.milimeter; + return; + } + } + else + { + switch (value) + { + case 30: + this.LinearUnit = LinearUnit.foot; + return; + case 31: + this.LinearUnit = LinearUnit.inch; + return; + case 32: + break; + case 33: + this.LinearUnit = LinearUnit.yard; + return; + default: + if (value == 44) + { + this.LinearUnit = LinearUnit.mile; + return; + } + break; + } + } + this.LinearUnit = LinearUnit.centimeter; + } + } + + // Token: 0x06000342 RID: 834 + public abstract void Initialize(); + } +} diff --git a/CorridorModel/UnitValues.cs b/CorridorModel/UnitValues.cs new file mode 100644 index 0000000..f1a13fd --- /dev/null +++ b/CorridorModel/UnitValues.cs @@ -0,0 +1,51 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x02000040 RID: 64 + public enum UnitValues + { + // Token: 0x040000E3 RID: 227 + meter, + // Token: 0x040000E4 RID: 228 + squareMeter, + // Token: 0x040000E5 RID: 229 + cubicMeter, + // Token: 0x040000E6 RID: 230 + decimal_degrees, + // Token: 0x040000E7 RID: 231 + grads, + // Token: 0x040000E8 RID: 232 + radians, + // Token: 0x040000E9 RID: 233 + milliBars, + // Token: 0x040000EA RID: 234 + mmHG, + // Token: 0x040000EB RID: 235 + inchHG, + // Token: 0x040000EC RID: 236 + celsius, + // Token: 0x040000ED RID: 237 + milimeter, + // Token: 0x040000EE RID: 238 + centimeter, + // Token: 0x040000EF RID: 239 + kilometer, + // Token: 0x040000F0 RID: 240 + foot, + // Token: 0x040000F1 RID: 241 + squareFoot, + // Token: 0x040000F2 RID: 242 + cubicFoot, + // Token: 0x040000F3 RID: 243 + inch, + // Token: 0x040000F4 RID: 244 + mile, + // Token: 0x040000F5 RID: 245 + USSurveyFoot, + // Token: 0x040000F6 RID: 246 + yard, + // Token: 0x040000F7 RID: 247 + decimeter + } +} diff --git a/CorridorModel/Units.cs b/CorridorModel/Units.cs new file mode 100644 index 0000000..42ebf7d --- /dev/null +++ b/CorridorModel/Units.cs @@ -0,0 +1,129 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace CorridorModel +{ + // Token: 0x0200003F RID: 63 + [XmlType("Units")] + [Serializable] + public class Units + { + // Token: 0x17000119 RID: 281 + // (get) Token: 0x06000348 RID: 840 RVA: 0x0000C135 File Offset: 0x0000A335 + // (set) Token: 0x06000349 RID: 841 RVA: 0x0000C13D File Offset: 0x0000A33D + [XmlElement("Metric", Type = typeof(Metric))] + [XmlElement("Imperial", Type = typeof(Imperial))] + public List units { get; set; } + + // Token: 0x0600034A RID: 842 RVA: 0x0000C146 File Offset: 0x0000A346 + public Units() + { + this.units = new List(); + } + + // Token: 0x0600034B RID: 843 RVA: 0x0000C159 File Offset: 0x0000A359 + public int IndexOf(Unit item) + { + return this.units.IndexOf(item); + } + + // Token: 0x0600034C RID: 844 RVA: 0x0000C167 File Offset: 0x0000A367 + public void Insert(int index, Unit item) + { + this.units.Insert(index, item); + } + + // Token: 0x0600034D RID: 845 RVA: 0x0000C176 File Offset: 0x0000A376 + public void RemoveAt(int index) + { + this.units.RemoveAt(index); + } + + // Token: 0x1700011A RID: 282 + [XmlIgnore] + public Unit this[int index] + { + get + { + if (index < this.units.Count) + { + return this.units[index]; + } + throw new IndexOutOfRangeException(); + } + set + { + if (index < this.units.Count) + { + this.units[index] = value; + return; + } + if (index == this.units.Count) + { + this.units.Add(value); + return; + } + throw new IndexOutOfRangeException(); + } + } + + // Token: 0x06000350 RID: 848 RVA: 0x0000C1E4 File Offset: 0x0000A3E4 + public void Add(Unit item) + { + this.units.Add(item); + } + + // Token: 0x06000351 RID: 849 RVA: 0x0000C1F2 File Offset: 0x0000A3F2 + public void Clear() + { + this.units.Clear(); + } + + // Token: 0x06000352 RID: 850 RVA: 0x0000C1FF File Offset: 0x0000A3FF + public bool Contains(Unit item) + { + return this.units.Contains(item); + } + + // Token: 0x06000353 RID: 851 RVA: 0x0000C20D File Offset: 0x0000A40D + public void CopyTo(Unit[] array, int arrayIndex) + { + this.units.CopyTo(array, arrayIndex); + } + + // Token: 0x1700011B RID: 283 + // (get) Token: 0x06000354 RID: 852 RVA: 0x0000C21C File Offset: 0x0000A41C + [XmlIgnore] + public int Count + { + get + { + return this.units.Count; + } + } + + // Token: 0x1700011C RID: 284 + // (get) Token: 0x06000355 RID: 853 RVA: 0x0000C229 File Offset: 0x0000A429 + [XmlIgnore] + public bool IsReadOnly + { + get + { + return false; + } + } + + // Token: 0x06000356 RID: 854 RVA: 0x0000C22C File Offset: 0x0000A42C + public bool Remove(Unit item) + { + return this.units.Remove(item); + } + + // Token: 0x06000357 RID: 855 RVA: 0x0000C23A File Offset: 0x0000A43A + public IEnumerator GetEnumerator() + { + return this.units.GetEnumerator(); + } + } +} diff --git a/CorridorModel/VolumeUnit.cs b/CorridorModel/VolumeUnit.cs new file mode 100644 index 0000000..2d8b685 --- /dev/null +++ b/CorridorModel/VolumeUnit.cs @@ -0,0 +1,17 @@ +using System; + +namespace CorridorModel +{ + // Token: 0x02000046 RID: 70 + public enum VolumeUnit + { + // Token: 0x04000117 RID: 279 + cubicMeter, + // Token: 0x04000118 RID: 280 + cubicInch, + // Token: 0x04000119 RID: 281 + cubicFoot, + // Token: 0x0400011A RID: 282 + cubicYard + } +} diff --git a/CorridorModel/bin/Debug/CorridorModel.dll b/CorridorModel/bin/Debug/CorridorModel.dll new file mode 100644 index 0000000..2fa65d5 Binary files /dev/null and b/CorridorModel/bin/Debug/CorridorModel.dll differ diff --git a/CorridorModel/bin/Debug/CorridorModel.pdb b/CorridorModel/bin/Debug/CorridorModel.pdb new file mode 100644 index 0000000..b3884cc Binary files /dev/null and b/CorridorModel/bin/Debug/CorridorModel.pdb differ diff --git a/CorridorModel/obj/Debug/CorridorModel.csproj.CoreCompileInputs.cache b/CorridorModel/obj/Debug/CorridorModel.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..a8bc31b --- /dev/null +++ b/CorridorModel/obj/Debug/CorridorModel.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +ff50509486171a9b4cbf4f3fc9cd23fde9c38687 diff --git a/CorridorModel/obj/Debug/CorridorModel.csproj.FileListAbsolute.txt b/CorridorModel/obj/Debug/CorridorModel.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..f4ee27f --- /dev/null +++ b/CorridorModel/obj/Debug/CorridorModel.csproj.FileListAbsolute.txt @@ -0,0 +1,14 @@ +C:\Users\ZGG\Desktop\新建文件夹\CorridorModel\obj\Debug\CorridorModel.csprojAssemblyReference.cache +C:\Users\ZGG\Desktop\新建文件夹\CorridorModel\obj\Debug\CorridorModel.csproj.CoreCompileInputs.cache +G:\Development\CorridorModel\CorridorModel\obj\Debug\CorridorModel.csprojAssemblyReference.cache +G:\Development\CorridorModel\CorridorModel\obj\Debug\CorridorModel.csproj.CoreCompileInputs.cache +G:\Development\CorridorModel\CorridorModel\bin\Debug\CorridorModel.dll +G:\Development\CorridorModel\CorridorModel\bin\Debug\CorridorModel.pdb +G:\Development\CorridorModel\CorridorModel\obj\Debug\CorridorModel.dll +G:\Development\CorridorModel\CorridorModel\obj\Debug\CorridorModel.pdb +G:\开发\CorridorModel\CorridorModel\bin\Debug\CorridorModel.dll +G:\开发\CorridorModel\CorridorModel\bin\Debug\CorridorModel.pdb +G:\开发\CorridorModel\CorridorModel\obj\Debug\CorridorModel.csprojAssemblyReference.cache +G:\开发\CorridorModel\CorridorModel\obj\Debug\CorridorModel.csproj.CoreCompileInputs.cache +G:\开发\CorridorModel\CorridorModel\obj\Debug\CorridorModel.dll +G:\开发\CorridorModel\CorridorModel\obj\Debug\CorridorModel.pdb diff --git a/CorridorModel/obj/Debug/CorridorModel.csprojAssemblyReference.cache b/CorridorModel/obj/Debug/CorridorModel.csprojAssemblyReference.cache new file mode 100644 index 0000000..571d4ba Binary files /dev/null and b/CorridorModel/obj/Debug/CorridorModel.csprojAssemblyReference.cache differ diff --git a/CorridorModel/obj/Debug/CorridorModel.dll b/CorridorModel/obj/Debug/CorridorModel.dll new file mode 100644 index 0000000..2fa65d5 Binary files /dev/null and b/CorridorModel/obj/Debug/CorridorModel.dll differ diff --git a/CorridorModel/obj/Debug/CorridorModel.pdb b/CorridorModel/obj/Debug/CorridorModel.pdb new file mode 100644 index 0000000..b3884cc Binary files /dev/null and b/CorridorModel/obj/Debug/CorridorModel.pdb differ diff --git a/CorridorModel/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/CorridorModel/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..3744f7f Binary files /dev/null and b/CorridorModel/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/CorridorModel/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/CorridorModel/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/CorridorModel/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/CorridorModel/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/CorridorModel/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/CorridorModel/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/LandXML/App.config b/LandXML/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/LandXML/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/LandXML/LandXML.csproj b/LandXML/LandXML.csproj new file mode 100644 index 0000000..47502f8 --- /dev/null +++ b/LandXML/LandXML.csproj @@ -0,0 +1,58 @@ + + + + + Debug + AnyCPU + {C8D102CB-A711-44AF-BA30-8B3B4CAB4686} + Exe + LandXML + LandXML + v4.5.2 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {d8ffa8fe-d920-4a55-a7bb-5381642ce016} + CorridorModel + + + + \ No newline at end of file diff --git a/LandXML/LandXML.csproj.user b/LandXML/LandXML.csproj.user new file mode 100644 index 0000000..34368fe --- /dev/null +++ b/LandXML/LandXML.csproj.user @@ -0,0 +1,7 @@ + + + + C:\Users\ZGG\Desktop\LandXML测试 + true + + \ No newline at end of file diff --git a/LandXML/Program.cs b/LandXML/Program.cs new file mode 100644 index 0000000..bc497b4 --- /dev/null +++ b/LandXML/Program.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml; +using System.Xml.Serialization; +using CorridorModel; + +namespace LandXML +{ + class Program + { + static void Main(string[] args) + { + if (args.Length != 1) + throw new ArgumentException("Expected single directory for LandXML loading"); + + string[] files = Directory.GetFiles(@args[0], "锦龙立交.xml", SearchOption.AllDirectories); + + + + foreach (var file in files) + { + Loader load = new Loader(); + Model result = load.Load(file); + //Model m = new Model(); + //m = Model.Deserialize(file); + + + } + } + } + public class Loader + { + public Model Load(string fileName) + { + XmlSerializer xmlSerializer = new XmlSerializer(typeof(Model)); + + using (FileStream fileStream = File.Open(fileName, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite)) + { + using (NamespaceIgnorantXmlTextReader objXmlReader = new NamespaceIgnorantXmlTextReader(fileStream)) + { + return (Model)xmlSerializer.Deserialize(objXmlReader); + } + } + } + } + public class NamespaceIgnorantXmlTextReader : XmlTextReader + { + public NamespaceIgnorantXmlTextReader(Stream reader) : base(reader) { } + + public override string NamespaceURI + { + get { return string.Empty; } + } + } +} diff --git a/LandXML/Properties/AssemblyInfo.cs b/LandXML/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..68f5e75 --- /dev/null +++ b/LandXML/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("LandXML")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("LandXML")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("c8d102cb-a711-44af-ba30-8b3b4cab4686")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 +// 方法是按如下所示使用“*”: : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/LandXML/bin/Debug/CorridorModel.dll b/LandXML/bin/Debug/CorridorModel.dll new file mode 100644 index 0000000..2fa65d5 Binary files /dev/null and b/LandXML/bin/Debug/CorridorModel.dll differ diff --git a/LandXML/bin/Debug/CorridorModel.pdb b/LandXML/bin/Debug/CorridorModel.pdb new file mode 100644 index 0000000..b3884cc Binary files /dev/null and b/LandXML/bin/Debug/CorridorModel.pdb differ diff --git a/LandXML/bin/Debug/LandXML.exe b/LandXML/bin/Debug/LandXML.exe new file mode 100644 index 0000000..0d4b3ad Binary files /dev/null and b/LandXML/bin/Debug/LandXML.exe differ diff --git a/LandXML/bin/Debug/LandXML.exe.config b/LandXML/bin/Debug/LandXML.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/LandXML/bin/Debug/LandXML.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/LandXML/bin/Debug/LandXML.pdb b/LandXML/bin/Debug/LandXML.pdb new file mode 100644 index 0000000..9a61e4a Binary files /dev/null and b/LandXML/bin/Debug/LandXML.pdb differ diff --git a/LandXML/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/LandXML/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..63c5e57 Binary files /dev/null and b/LandXML/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/LandXML/obj/Debug/LandXML.csproj.CopyComplete b/LandXML/obj/Debug/LandXML.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/LandXML/obj/Debug/LandXML.csproj.CoreCompileInputs.cache b/LandXML/obj/Debug/LandXML.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..ca8434a --- /dev/null +++ b/LandXML/obj/Debug/LandXML.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +b35f80db05f9808e6ffbd33797de575deca16f96 diff --git a/LandXML/obj/Debug/LandXML.csproj.FileListAbsolute.txt b/LandXML/obj/Debug/LandXML.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..818a9e5 --- /dev/null +++ b/LandXML/obj/Debug/LandXML.csproj.FileListAbsolute.txt @@ -0,0 +1,20 @@ +G:\Development\CorridorModel\LandXML\bin\Debug\LandXML.exe.config +G:\Development\CorridorModel\LandXML\bin\Debug\LandXML.exe +G:\Development\CorridorModel\LandXML\bin\Debug\LandXML.pdb +G:\Development\CorridorModel\LandXML\bin\Debug\CorridorModel.dll +G:\Development\CorridorModel\LandXML\bin\Debug\CorridorModel.pdb +G:\Development\CorridorModel\LandXML\obj\Debug\LandXML.csprojAssemblyReference.cache +G:\Development\CorridorModel\LandXML\obj\Debug\LandXML.csproj.CoreCompileInputs.cache +G:\Development\CorridorModel\LandXML\obj\Debug\LandXML.csproj.CopyComplete +G:\Development\CorridorModel\LandXML\obj\Debug\LandXML.exe +G:\Development\CorridorModel\LandXML\obj\Debug\LandXML.pdb +G:\开发\CorridorModel\LandXML\bin\Debug\LandXML.exe.config +G:\开发\CorridorModel\LandXML\bin\Debug\LandXML.exe +G:\开发\CorridorModel\LandXML\bin\Debug\LandXML.pdb +G:\开发\CorridorModel\LandXML\bin\Debug\CorridorModel.dll +G:\开发\CorridorModel\LandXML\bin\Debug\CorridorModel.pdb +G:\开发\CorridorModel\LandXML\obj\Debug\LandXML.csprojAssemblyReference.cache +G:\开发\CorridorModel\LandXML\obj\Debug\LandXML.csproj.CoreCompileInputs.cache +G:\开发\CorridorModel\LandXML\obj\Debug\LandXML.csproj.CopyComplete +G:\开发\CorridorModel\LandXML\obj\Debug\LandXML.exe +G:\开发\CorridorModel\LandXML\obj\Debug\LandXML.pdb diff --git a/LandXML/obj/Debug/LandXML.csprojAssemblyReference.cache b/LandXML/obj/Debug/LandXML.csprojAssemblyReference.cache new file mode 100644 index 0000000..65046ec Binary files /dev/null and b/LandXML/obj/Debug/LandXML.csprojAssemblyReference.cache differ diff --git a/LandXML/obj/Debug/LandXML.exe b/LandXML/obj/Debug/LandXML.exe new file mode 100644 index 0000000..0d4b3ad Binary files /dev/null and b/LandXML/obj/Debug/LandXML.exe differ diff --git a/LandXML/obj/Debug/LandXML.pdb b/LandXML/obj/Debug/LandXML.pdb new file mode 100644 index 0000000..9a61e4a Binary files /dev/null and b/LandXML/obj/Debug/LandXML.pdb differ diff --git a/LandXML/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/LandXML/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/LandXML/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/LandXML/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/LandXML/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/LandXML/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29