示例#1
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 AlignmentSTS(C3dDb.AlignmentSTS obj) : base(obj)
        {
            SafeAction
                (() => SpiralIn = new AlignmentSpiral(obj.SpiralIn),
                () => SpiralIn  = null);
            SafeAction
                (() => SpiralOut = new AlignmentSpiral(obj.SpiralOut),
                () => SpiralOut  = null);
            SafeAction
                (() => Tangent = new AlignmentLine(obj.Tangent),
                () => Tangent  = null);

            AlignmentSTSConstraintType
                = obj.Constraint2.ToString();
        }
示例#3
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());
        }