internal AlignmentSCSSCS(C3dDb.AlignmentSCSSCS obj) : base(obj)
        {
            SafeAction
                (() => Arc1 = new AlignmentArc(obj.Arc1),
                () => Arc1  = null);
            SafeAction
                (() => Arc2 = new AlignmentArc(obj.Arc2),
                () => Arc2  = null);

            SafeAction
                (() => Spiral1 = new AlignmentSpiral(obj.Spiral1),
                () => Spiral1  = null);
            SafeAction
                (() => Spiral2 = new AlignmentSpiral(obj.Spiral2),
                () => Spiral2  = null);
            SafeAction
                (() => Spiral3 = new AlignmentSpiral(obj.Spiral3),
                () => Spiral3  = null);
            SafeAction
                (() => Spiral4 = new AlignmentSpiral(obj.Spiral4),
                () => Spiral4  = null);

            AlignmentSCSSCSConstraintType
                = obj.Constraint2.ToString();
        }
Esempio n. 2
0
 internal AlignmentCRC(C3dDb.AlignmentCRC crc) : base(crc)
 {
     SafeAction
         (() => Arc1 = new AlignmentArc(crc.Arc1),
         () => Arc1  = null);
     SafeAction
         (() => Arc2 = new AlignmentArc(crc.Arc2),
         () => Arc2  = null);
     AlignmentCRCConstraintType
         = crc.Constraint2.ToString();
 }
Esempio n. 3
0
        internal AlignmentCTC(C3dDb.AlignmentCTC obj) : base(obj)
        {
            SafeAction
                (() => Arc1 = new AlignmentArc(obj.Arc1),
                () => Arc1  = null);
            SafeAction
                (() => Arc2 = new AlignmentArc(obj.Arc2),
                () => Arc2  = null);
            SafeAction
                (() => Tangent = new AlignmentLine(obj.Tangent),
                () => Tangent  = null);

            AlignmentCTCConstraintType = obj.Constraint2.ToString();
        }
        internal AlignmentSCS(C3dDb.AlignmentSCS obj) : base(obj)
        {
            SafeAction
                (() => Arc = new AlignmentArc(obj.Arc),
                () => Arc  = null);
            SafeAction
                (() => SpiralIn = new AlignmentSpiral(obj.SpiralIn),
                () => SpiralIn  = null);
            SafeAction
                (() => SpiralOut = new AlignmentSpiral(obj.SpiralOut),
                () => SpiralOut  = null);

            AlignmentSCSConstraintType
                = obj.Constraint2.ToString();
        }
Esempio n. 5
0
        internal AlignmentCCRC(C3dDb.AlignmentCCRC obj) : base(obj)
        {
            SafeAction
                (() => Arc1 = new AlignmentArc(obj.Arc1),
                () => Arc1  = null);
            SafeAction
                (() => Arc2 = new AlignmentArc(obj.Arc2),
                () => Arc2  = null);
            SafeAction
                (() => Arc3 = new AlignmentArc(obj.Arc3),
                () => Arc3  = null);

            AlignmentCCRCConstraintType
                = obj.Constraint2.ToString();
        }
Esempio n. 6
0
        /// <summary>
        /// Get the alignment's curves data
        /// </summary>
        /// <returns>Alignment's curves data list</returns>
        public IList <AlignmentCurve> GetCurves()
        {
            var curves = new List <AlignmentCurve>();

            foreach (C3dDb.AlignmentEntity ent in AeccAlignment.Entities)
            {
                AlignmentCurve res;
                if (ent is C3dDb.AlignmentArc arc)
                {
                    res = new AlignmentArc(arc);
                }
                else if (ent is C3dDb.AlignmentCCRC ccrc)
                {
                    res = new AlignmentCCRC(ccrc);
                }
                else if (ent is C3dDb.AlignmentCRC crc)
                {
                    res = new AlignmentCRC(crc);
                }
                else if (ent is C3dDb.AlignmentCTC ctc)
                {
                    res = new AlignmentCTC(ctc);
                }
                else if (ent is C3dDb.AlignmentLine line)
                {
                    res = new AlignmentLine(line);
                }
                else if (ent is C3dDb.AlignmentMultipleSegments ms)
                {
                    res = new AlignmentMultipleSegments(ms);
                }
                else if (ent is C3dDb.AlignmentSCS scs)
                {
                    res = new AlignmentSCS(scs);
                }
                else if (ent is C3dDb.AlignmentSCSCS scscs)
                {
                    res = new AlignmentSCSCS(scscs);
                }
                else if (ent is C3dDb.AlignmentSCSSCS scsscs)
                {
                    res = new AlignmentSCSSCS(scsscs);
                }
                else if (ent is C3dDb.AlignmentSpiral spiral)
                {
                    res = new AlignmentSpiral(spiral);
                }
                else if (ent is C3dDb.AlignmentSSCSS sscss)
                {
                    res = new AlignmentSSCSS(sscss);
                }
                else if (ent is C3dDb.AlignmentSTS sts)
                {
                    res = new AlignmentSTS(sts);
                }
                else if (ent is C3dDb.AlignmentCurve curve)
                {
                    res = new AlignmentCurve(curve);
                }
                else
                {
                    continue;
                }
                curves.Add(res);
            }
            return(curves.OrderBy(item => item.StartStation).ToList());
        }