Exemplo n.º 1
0
 public ribbonBase(Double TSwidth, Slope TSslope)
 {
     MyParentPGLgrouping = null;
      NominalWidth = TSwidth;
      Widths = new InvariantProfile(NominalWidth);
      NominalCrossSlope = TSslope;
      CrossSlopes = new InvariantProfile(NominalCrossSlope);
 }
Exemplo n.º 2
0
 public RaySheet(CogoStation beginStation, CogoStation endStation, Slope initialSlope)
 {
     interpretWidths = new Profile(beginStation, endStation, (double) enmWidthInterpret.HorizontalOnly);
      Widths = null;
      interpretCrossSlopes = new Profile(beginStation, endStation, (double)enmCrossSlopeInterpret.xPercentage);
      CrossSlopes = new Profile(beginStation, endStation, initialSlope);
      LiederLineHeight = 5.0;
 }
Exemplo n.º 3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="parentPGLg">Required non-null</param>
 /// <param name="initialWidth"></param>
 /// <param name="initialSlope">Required non-null</param>
 public ribbonBase(PGLGrouping parentPGLg, Double initialWidth, Slope initialSlope)
 {
     MyParentPGLgrouping = parentPGLg;
      NominalWidth = initialWidth;
      resetWidths();
      NominalCrossSlope = initialSlope;
      resetCrossSlopes();
 }
Exemplo n.º 4
0
        public ribbonBase(CogoStation beginStation, CogoStation endStation, double initialWidth, Slope initialSlope)
        {
            if (null == beginStation) throw new ArgumentNullException("beginStation");
             if (null == endStation) throw new ArgumentNullException("endStation");

             interpretWidths = new Profile(beginStation, endStation, (double) enmWidthInterpret.HorizontalOnly);
             NominalWidth = initialWidth;
             Widths = new Profile(beginStation, endStation, initialWidth);
             interpretCrossSlopes = new Profile(beginStation, endStation, (double)enmCrossSlopeInterpret.xPercentage);
             NominalCrossSlope = initialSlope;
             resetCrossSlopes();
             LiederLineHeight = 5.0;
        }
Exemplo n.º 5
0
        public bool getCrossSlope(StationOffsetElevation soePoint, ref Slope xSlope)
        {
            foreach (var pglGr in allPGLgroupings)
             {
            int isOnThisPGLgrp = pglGr.getCrossSlope(soePoint, ref xSlope);
            if (isOnThisPGLgrp == 0)
               return true;
             }

             return false;
        }
        public void MouseMove(object sender, MouseEventArgs e)
        {
            if (CanvasXfrmd == null)
            return;

             if (e.LeftButton == MouseButtonState.Released)
             {
            Point newMousePoint = e.GetPosition(CanvasXfrmd.Canvas);
            Point newWorldPoint=new Point();
            newWorldPoint.X = CanvasXfrmd.TransformCanvasToWorldX(newMousePoint.X);
            newWorldPoint.Y = CanvasXfrmd.TransformCanvasToWorldY(newMousePoint.Y);

            //System.Diagnostics.Debug.WriteLine(newMousePoint.ToString());
            //System.Diagnostics.Debug.WriteLine("Station {0}, Offset {1}", (CogoStation) newWorldPoint.Y, newWorldPoint.X);
            mouseSOE.station = newWorldPoint.Y;
            mouseSOE.offset = (Offset) newWorldPoint.X;
            mouseSOE.elevation = 0.0;
            this.currentCorridor_.getElevation(ref mouseSOE_);
            PlanStation = ((CogoStation)mouseSOE.station).ToString();
            PlanOffset = mouseSOE.offset.ToString();
            PlanElevation = mouseSOE.elevation.ToString();

            Slope xSlope = new Slope();
            this.currentCorridor_.getCrossSlope(mouseSOE_, ref xSlope);
            PlanCrossSlope = xSlope.ToString();

            //System.Diagnostics.Debug.WriteLine("Station {0}, Offset {1}, Elevation {2}", (CogoStation)mouseSOE.station, mouseSOE.offset, mouseSOE.elevation);
            System.Diagnostics.Debug.WriteLine("Station {0}, Offset {1}, Elevation {2}", PlanStation, mouseSOE.offset, mouseSOE.elevation);
            System.Diagnostics.Debug.WriteLine(" ");
            e.Handled = false;
            return;
             }
             if (isPortWindowMoving == false) return;
             if (null == CanvasXfrmd) return;
             if (!(sender is Canvas)) return;
             if (sender != CanvasXfrmd.Canvas) return;

             if (e.LeftButton == MouseButtonState.Pressed)
             {
            Point newMousePoint = e.GetPosition(CanvasXfrmd.Canvas);
            WindowCenterX += (startMovingPoint.X - newMousePoint.X) / ViewScaleFeetPerInch;
            WindowCenterY += (startMovingPoint.Y - newMousePoint.Y) / ViewScaleFeetPerInch;
             }
        }
Exemplo n.º 7
0
 public Shoulder(CogoStation beginStation, CogoStation endStation, double initialWidth, Slope initialSlope)
     : base(beginStation, endStation, initialWidth, initialSlope)
 {
 }
Exemplo n.º 8
0
 public RoadwayLane(Double width, Slope slope)
     : base(width, slope)
 {
 }
Exemplo n.º 9
0
        public int getCrossSlope(StationOffsetElevation soePoint, ref Slope theCrossSlope)
        {
            StationOffsetElevation workingSOE = new StationOffsetElevation(soePoint);
             workingSOE.offset *= myIndex;
             IRibbonLike bingoRibbon=null;

             // seek the correct ribbon
             if (thePGLoffsetRibbon != null)
             {
            double? pglOffset = thePGLoffsetRibbon.getActualWidth((CogoStation)workingSOE.station);
            if (pglOffset != null)
               workingSOE.offset -= pglOffset;
             }
             if (workingSOE.offset > 0.0)
             {
            if (outsideRibbons == null) return 1;

            foreach (var aRibbon in outsideRibbons)
            {
               aRibbon.accumulateRibbonTraversal(ref workingSOE);
               bingoRibbon = aRibbon;
               if (workingSOE.offset <= 0.0) break;
            }
            if (workingSOE.offset > 0.0)
               return 1;
             }
             else if (workingSOE.offset < 0.0)
             {
            if (insideRibbons == null) return -1;

            workingSOE.offset *= -1.0;
            foreach (var aRibbon in insideRibbons)
            {
               aRibbon.accumulateRibbonTraversal(ref workingSOE);
               bingoRibbon = aRibbon;
               if (workingSOE.offset <= 0.0) break;
            }
            if (workingSOE.offset > 0.0)
               return -1;
             }
             else
            workingSOE.elevation = 0.0;

             theCrossSlope = null;
             if (bingoRibbon != null)
             {
            theCrossSlope = bingoRibbon.getCrossSlope((CogoStation) (soePoint.station));
             }

             return 0;
        }
Exemplo n.º 10
0
 public ChannelBottom(Double width, Slope slope)
     : base(width, slope)
 {
 }
Exemplo n.º 11
0
 public ChannelBottom(CogoStation beginStation, CogoStation endStation, double initialWidth, Slope initialSlope)
     : base(beginStation, endStation, initialWidth, initialSlope)
 {
 }
Exemplo n.º 12
0
 public PGLoffset(CogoStation beginStation, CogoStation endStation, double initialWidth, Slope initialSlope)
     : base(beginStation, endStation, initialWidth, initialSlope)
 {
     LiederLineHeight = 7.0;
 }
Exemplo n.º 13
0
 public Shoulder(Double width, Slope slope)
     : base(width, slope)
 {
 }
Exemplo n.º 14
0
 public Shoulder(PGLGrouping pglG, Double width, Slope slope)
     : base(pglG, width, slope)
 {
 }
Exemplo n.º 15
0
 public RoadwayLane(CogoStation beginStation, CogoStation endStation, double initialWidth, Slope initialSlope)
     : base(beginStation, endStation, initialWidth, initialSlope)
 {
 }
Exemplo n.º 16
0
 public RoadwayLane(PGLGrouping pglG, Double width, Slope slope)
     : base(pglG, width, slope)
 {
 }
Exemplo n.º 17
0
        public virtual void DrawCrossSection(IRM21cad2dDrawingContext cadContext, 
         ref StationOffsetElevation aSOE, int whichSide)
        {
            double LLH = LiederLineHeight;
             double ribbonWidth;
             double X1 = aSOE.offset;
             double Y1 = aSOE.elevation;
             this.moveToOuterEdge(ref aSOE, whichSide);
             if (X1 == aSOE.offset && Y1 == aSOE.elevation) return;

             cadContext.Draw(X1, Y1, aSOE.offset, aSOE.elevation);

             setupCrossSectionDrawing(cadContext);
             ribbonWidth = Math.Abs(aSOE.offset - X1);
             cadContext.setElementWeight(0.8);
             cadContext.setElementColor(Color.FromArgb(124, 255, 255, 255));
             cadContext.Draw(X1, LLH + 0.5, aSOE.offset, LLH + 0.5);
             cadContext.Draw(aSOE.offset, 0.5, aSOE.offset, LLH + 1.5);
             string widthStr = (Math.Round(ribbonWidth*10)/10).ToString();
             cadContext.Draw(widthStr, X1 + whichSide * ribbonWidth / 2, LLH + 0.5, 0.0);

             if (false == SuppressSlopeText)
             {
            Slope mySlope = new Slope((aSOE.elevation - Y1) / (aSOE.offset - X1));
            if (whichSide > 0)
               cadContext.Draw(mySlope.ToString(),
                  (X1 + aSOE.offset) / 2,
                  (Y1 + aSOE.elevation) / 2,
                  mySlope.getAsDegreesDouble());
            else
               cadContext.Draw(mySlope.FlipDirection().ToString(),
                  (X1 + aSOE.offset) / 2,
                  (Y1 + aSOE.elevation) / 2,
                  mySlope.getAsDegreesDouble());
             }
             SuppressSlopeText = false;
        }
Exemplo n.º 18
0
 public BackSlopeCutDitch(CogoStation beginStation, CogoStation endStation, Slope initialSlope)
     : base(beginStation, endStation, initialSlope)
 {
 }
Exemplo n.º 19
0
 public FrontSlopeCutDitch(CogoStation beginStation, CogoStation endStation, double initialWidth, Slope initialSlope)
     : base(beginStation, endStation, initialWidth, initialSlope)
 {
 }