public static void ProfileAcrossTheGiantDesign() { TimeSpan bestTime = TimeSpan.MaxValue; Designs.TTM.Optimised.TrimbleTINModel readonly_tin = new Designs.TTM.Optimised.TrimbleTINModel(); readonly_tin.LoadFromFile(@"C:\Users\rwilson\Downloads\5644616_oba9c0bd14_FRL.ttm"); TTMDesign design = new TTMDesign(0.34); design.LoadFromFile(@"C:\Users\rwilson\Downloads\5644616_oba9c0bd14_FRL.ttm"); for (int i = 0; i < 10; i++) { DateTime _start = DateTime.Now; var profile = design.ComputeProfile(new[] { new XYZ(design.Data.Header.MinimumEasting, design.Data.Header.MinimumNorthing, 0), new XYZ(design.Data.Header.MaximumEasting, design.Data.Header.MaximumNorthing, 0) }, 0.34); var profileDistance = MathUtilities.Hypot(profile.First().X - profile.Last().X, profile.First().Y - profile.Last().Y); DateTime _end = DateTime.Now; if (_end - _start < bestTime) { bestTime = _end - _start; Console.WriteLine($"TIN profile (#{i}) with an {profileDistance:F3} meter line with {profile.Count} vertices in best time of {bestTime}"); } } }
public void ProfileAcrossTheGiantDesign() { var profile = design.ComputeProfile(new[] { new XYZ(design.Data.Header.MinimumEasting, design.Data.Header.MinimumNorthing, 0), new XYZ(design.Data.Header.MaximumEasting, design.Data.Header.MaximumNorthing, 0) }, 0.34); var profileDistance = MathUtilities.Hypot(profile.First().X - profile.Last().X, profile.First().Y - profile.Last().Y); }