private void FillDisplayText()
        {
            if (currentWellboresRootGridViewModel == null)
            {
                DisplayText = String.Empty;
                return;
            }
            StringBuilder text = new StringBuilder();

            {
                foreach (WellboreGridViewModel wellbore in currentWellboresRootGridViewModel.MainItems)
                {
                    text.AppendFormat("Ствол {0}", wellbore.Name);
                    text.AppendLine();
                    List <ProfilePathPoint> profilePathPoints = Mapper.Map(wellbore.ChildItems.ToList(), new List <ProfilePathPoint>());
                    List <Point3D>          point3Ds          = CalculationTrajectoryService.Get3DProfilePathPoints(profilePathPoints);
                    foreach (Point3D point3D in point3Ds)
                    {
                        text.AppendFormat("   - точка : x={0:0.00} | y={1:0.00} | z={2:0.00}", point3D.X, point3D.Y, point3D.Z);
                        text.AppendLine();
                    }
                }
            }
            DisplayText = text.ToString();
        }
Beispiel #2
0
        public void CalculateTrajectoryTest()
        {
            AutoMapperInitializer.Initialize();
            List <ProfilePathGridViewModel> profilePathGridViewModels = SerializeHelper.DeSerializeFromContents <List <ProfilePathGridViewModel> >(Resources.ProfilePathGridViewModel_9777_2);
            List <ProfilePathPoint>         mapProfilePathPoints      = Mapper.Map(profilePathGridViewModels, new List <ProfilePathPoint>());
            List <Point3D> profilePathPointsFromXml = SerializeHelper.DeSerializeFromContents <List <Point3D> >(Resources._3DProfilePathPoints_9777_2);
            CalculationTrajectoryService calculationTrajectoryService = new CalculationTrajectoryService();
            List <Point3D> profilePathPoints = calculationTrajectoryService.Get3DProfilePathPoints(mapProfilePathPoints);

            ProfilePathPointsAreEqual(profilePathPointsFromXml, profilePathPoints);
        }
Beispiel #3
0
 protected override List <Point> GetPoints(List <ProfilePathPoint> profilePathPoints)
 {
     return(CalculationTrajectoryService.GetHorizontalProjectionProfilePathPoints(profilePathPoints));
 }