Beispiel #1
0
        public override void Rotate(double angle)
        {
            double oldX;
            double oldY;

            oldX = X0;
            oldY = Y0;

            X0 = (oldX * Math.Cos(CGlobals.DTR(angle))) - (oldY * Math.Sin(CGlobals.DTR(angle)));
            Y0 = (oldX * Math.Sin(CGlobals.DTR(angle))) + (oldY * Math.Cos(CGlobals.DTR(angle)));

            oldX = X1;
            oldY = Y1;

            X1 = (oldX * Math.Cos(CGlobals.DTR(angle))) - (oldY * Math.Sin(CGlobals.DTR(angle)));
            Y1 = (oldX * Math.Sin(CGlobals.DTR(angle))) + (oldY * Math.Cos(CGlobals.DTR(angle)));

            oldX = X2;
            oldY = Y2;

            X2 = (oldX * Math.Cos(CGlobals.DTR(angle))) - (oldY * Math.Sin(CGlobals.DTR(angle)));
            Y2 = (oldX * Math.Sin(CGlobals.DTR(angle))) + (oldY * Math.Cos(CGlobals.DTR(angle)));

            oldX = X3;
            oldY = Y3;

            X3 = (oldX * Math.Cos(CGlobals.DTR(angle))) - (oldY * Math.Sin(CGlobals.DTR(angle)));
            Y3 = (oldX * Math.Sin(CGlobals.DTR(angle))) + (oldY * Math.Cos(CGlobals.DTR(angle)));
        }
 public override void ReadGroupCodes()
 {
     foreach (CGroupCode gc in GroupCodeList)
     {
         if (gc.Code == 10)
         {
             X0 = Math.Round(CGlobals.ConvertToDouble(gc.Value.Trim()), PRECISION);
         }
         else if (gc.Code == 20)
         {
             Y0 = Math.Round(CGlobals.ConvertToDouble(gc.Value.Trim()), PRECISION);
         }
         else if (gc.Code == 30)
         {
             Z0 = Math.Round(CGlobals.ConvertToDouble(gc.Value.Trim()), PRECISION);
         }
         else if (gc.Code == 11)
         {
             X1 = Math.Round(CGlobals.ConvertToDouble(gc.Value.Trim()), PRECISION);
         }
         else if (gc.Code == 21)
         {
             Y1 = Math.Round(CGlobals.ConvertToDouble(gc.Value.Trim()), PRECISION);
         }
         else if (gc.Code == 31)
         {
             Z1 = Math.Round(CGlobals.ConvertToDouble(gc.Value.Trim()), PRECISION);
         }
     }
 }
Beispiel #3
0
        public override void ReadGroupCodes()
        {
            BitArray flags;
            BitArray comparer;

            foreach (CGroupCode gc in GroupCodeList)
            {
                if (gc.Code == 2)
                {
                    StyleName = gc.Value.Trim();
                }
                else if (gc.Code == 40)
                {
                    FixedHeight = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 41)
                {
                    WidthFactor = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 50)
                {
                    ObliqueAngle = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 71)
                {
                    flags = new BitArray(new int[] { CGlobals.ConvertToInt(gc.Value.Trim()) });

                    comparer  = new BitArray(new int[] { 2 });
                    Backwards = flags.And(comparer)[0];

                    comparer   = new BitArray(new int[] { 4 });
                    UpsideDown = flags.And(comparer)[0];
                }
                else if (gc.Code == 42)
                {
                    LastHeightUsed = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 3)
                {
                    PrimaryFontFileName = gc.Value.Trim();
                }
                else if (gc.Code == 4)
                {
                    BigFontFileName = gc.Value.Trim();
                }
                else if (gc.Code == 70)
                {
                    SetStandardFlags(CGlobals.ConvertToInt(gc.Value.Trim()));

                    flags = new BitArray(new int [] { CGlobals.ConvertToInt(gc.Value.Trim()) });

                    comparer             = new BitArray(new int[] { 4 });
                    IsVerticallyOriented = flags.And(comparer)[0];
                }
            }
        }
Beispiel #4
0
 public override void ReadGroupCodes()
 {
     foreach (CGroupCode gc in GroupCodeList)
     {
         if (gc.Code == 10)
         {
             X0 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 20)
         {
             Y0 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 30)
         {
             Z0 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 11)
         {
             X1 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 21)
         {
             Y1 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 31)
         {
             Z1 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 12)
         {
             X2 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 22)
         {
             Y2 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 32)
         {
             Z2 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 13)
         {
             X3 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 23)
         {
             Y3 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 33)
         {
             Z3 = CGlobals.ConvertToDouble(gc.Value);
         }
     }
 }
Beispiel #5
0
        public override void Rotate(double angle)
        {
            double oldX;
            double oldY;

            oldX = X0;
            oldY = Y0;

            X0 = (oldX * Math.Cos(CGlobals.DTR(angle))) - (oldY * Math.Sin(CGlobals.DTR(angle)));
            Y0 = (oldX * Math.Sin(CGlobals.DTR(angle))) + (oldY * Math.Cos(CGlobals.DTR(angle)));
        }
Beispiel #6
0
 public override void ReadGroupCodes()
 {
     foreach (CGroupCode gc in GroupCodeList)
     {
         if (gc.Code == 2)
         {
             UCSName = gc.Value.Trim();
         }
         else if (gc.Code == 10)
         {
             OriginX = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 20)
         {
             OriginY = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 30)
         {
             OriginZ = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 11)
         {
             XAxisX = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 21)
         {
             XAxisY = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 31)
         {
             XAxisZ = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 12)
         {
             YAxisX = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 22)
         {
             YAxisY = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 32)
         {
             YAxisZ = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 70)
         {
             SetStandardFlags(CGlobals.ConvertToInt(gc.Value.Trim()));
         }
     }
 }
Beispiel #7
0
        public override int RenumberHandles(int next)
        {
            foreach (CEntityVertex vertex in VertexList)
            {
                vertex.Handle = CGlobals.IntToHex(next);
                next++;
            }

            SeqEndHandle = CGlobals.IntToHex(next);

            next++;

            return(next);
        }
 public override void ReadGroupCodes()
 {
     foreach (CGroupCode gc in GroupCodeList)
     {
         if (gc.Code == 2)
         {
             ApplicationName = gc.Value.Trim();
         }
         else if (gc.Code == 70)
         {
             SetStandardFlags(CGlobals.ConvertToInt(gc.Value.Trim()));
         }
     }
 }
Beispiel #9
0
        public override void Rotate(double angle)
        {
            double oldX;
            double oldY;

            oldX = X0;
            oldY = Y0;

            X0 = (oldX * Math.Cos(CGlobals.DTR(angle))) - (oldY * Math.Sin(CGlobals.DTR(angle)));
            Y0 = (oldX * Math.Sin(CGlobals.DTR(angle))) + (oldY * Math.Cos(CGlobals.DTR(angle)));

            StartAngle += angle;
            EndAngle   += angle;

            StartAngle = Math.Round(StartAngle, 2);
            EndAngle   = Math.Round(EndAngle, 2);
        }
Beispiel #10
0
        public override void Rotate(double angle)
        {
            double oldX;
            double oldY;

            oldX = X0;
            oldY = Y0;

            X0 = Math.Round((oldX * Math.Cos(CGlobals.DTR(angle))) - (oldY * Math.Sin(CGlobals.DTR(angle))), PRECISION);
            Y0 = Math.Round((oldX * Math.Sin(CGlobals.DTR(angle))) + (oldY * Math.Cos(CGlobals.DTR(angle))), PRECISION);

            oldX = X1;
            oldY = Y1;

            X1 = Math.Round((oldX * Math.Cos(CGlobals.DTR(angle))) - (oldY * Math.Sin(CGlobals.DTR(angle))), PRECISION);
            Y1 = Math.Round((oldX * Math.Sin(CGlobals.DTR(angle))) + (oldY * Math.Cos(CGlobals.DTR(angle))), PRECISION);
        }
 public override void ReadGroupCodes()
 {
     foreach (CGroupCode gc in GroupCodeList)
     {
         if (gc.Code == 10)
         {
             X0 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 20)
         {
             Y0 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 30)
         {
             Z0 = CGlobals.ConvertToDouble(gc.Value);
         }
     }
 }
Beispiel #12
0
        public override void ReadGroupCodes()
        {
            foreach (CGroupCode gc in GroupCodeList)
            {
                if (gc.Code == 10)
                {
                    X0 = CGlobals.ConvertToDouble(gc.Value);
                }
                else if (gc.Code == 20)
                {
                    Y0 = CGlobals.ConvertToDouble(gc.Value);
                }
                else if (gc.Code == 30)
                {
                    Z0 = CGlobals.ConvertToDouble(gc.Value);
                }
                else if (gc.Code == 40)
                {
                    Radius = CGlobals.ConvertToDouble(gc.Value);
                }
                else if (gc.Code == 50)
                {
                    // In Degrees?

                    StartAngle = CGlobals.ConvertToDouble(gc.Value);
                }
                else if (gc.Code == 51)
                {
                    // In Degrees?

                    EndAngle = CGlobals.ConvertToDouble(gc.Value);
                }
            }

            m_ArcStartPointX = X0 + (Radius * Math.Sin(CGlobals.DTR(StartAngle)));
            m_ArcStartPointY = Y0 + (Radius * Math.Cos(CGlobals.DTR(StartAngle)));

            m_ArcEndPointX = X0 + (Radius * Math.Sin(CGlobals.DTR(EndAngle)));
            m_ArcEndPointY = Y0 + (Radius * Math.Cos(CGlobals.DTR(EndAngle)));
        }
Beispiel #13
0
 public override void ReadGroupCodes()
 {
     foreach (CGroupCode gc in GroupCodeList)
     {
         if (gc.Code == 10)
         {
             X0 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 20)
         {
             Y0 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 30)
         {
             Z0 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 40)
         {
             Size = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 2)
         {
             ShapeName = gc.Value;
         }
         else if (gc.Code == 50)
         {
             RotationAngle = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 41)
         {
             XScale = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 51)
         {
             ObliqueAngle = CGlobals.ConvertToDouble(gc.Value);
         }
     }
 }
Beispiel #14
0
        public override void ReadGroupCodes()
        {
            BitArray flags;
            BitArray comparer;

            foreach (CGroupCode gc in GroupCodeList)
            {
                if (gc.Code == 2)
                {
                    LayerName = gc.Value.Trim();
                }
                else if (gc.Code == 62)
                {
                    ColorNumber = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 6)
                {
                    LineTypeName = gc.Value.Trim();
                }
                else if (gc.Code == 70)
                {
                    SetStandardFlags(CGlobals.ConvertToInt(gc.Value.Trim()));

                    flags = new BitArray(new int[] { CGlobals.ConvertToInt(gc.Value.Trim()) });

                    comparer = new BitArray(new int[] { 1 });
                    IsFrozen = flags.And(comparer)[0];

                    comparer = new BitArray(new int[] { 2 });
                    IsFrozenInNewViewports = flags.And(comparer)[0];

                    comparer = new BitArray(new int[] { 4 });
                    IsLocked = flags.And(comparer)[0];
                }
            }
        }
        public override void ReadGroupCodes()
        {
            DashLengthList = new ArrayList();

            foreach (CGroupCode gc in GroupCodeList)
            {
                if (gc.Code == 2)
                {
                    LineTypeName = gc.Value.Trim();
                }
                else if (gc.Code == 3)
                {
                    Description = gc.Value.Trim();
                }
                else if (gc.Code == 72)
                {
                    AlignmentCode = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 73)
                {
                    DashLengthItemCount = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 40)
                {
                    TotalPatternLength = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 49)
                {
                    DashLengthList.Add(CGlobals.ConvertToInt(gc.Value.Trim()));
                }
                else if (gc.Code == 70)
                {
                    SetStandardFlags(CGlobals.ConvertToInt(gc.Value.Trim()));
                }
            }
        }
Beispiel #16
0
 public override void ReadGroupCodes()
 {
     foreach (CGroupCode gc in GroupCodeList)
     {
         if (gc.Code == 2)
         {
             ViewName = gc.Value.Trim();
         }
         else if (gc.Code == 40)
         {
             ViewHeight = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 41)
         {
             ViewWidth = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 10)
         {
             ViewCenterX = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 20)
         {
             ViewCenterY = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 11)
         {
             ViewDirectionX = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 21)
         {
             ViewDirectionY = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 31)
         {
             ViewDirectionZ = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 12)
         {
             ViewTargetX = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 22)
         {
             ViewTargetY = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 32)
         {
             ViewTargetZ = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 42)
         {
             LensLength = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 43)
         {
             FrontClippingPlaneOffset = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 44)
         {
             BackClippingPlaneOffset = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 50)
         {
             TwistAngle = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 70)
         {
             SetStandardFlags(CGlobals.ConvertToInt(gc.Value.Trim()));
         }
     }
 }
        public override void ReadGroupCodes()
        {
            BitArray flags;
            BitArray comparer;

            foreach (CGroupCode gc in GroupCodeList)
            {
                if (gc.Code == 10)
                {
                    X0 = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 20)
                {
                    Y0 = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 30)
                {
                    Z0 = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 40)
                {
                    StartingWidth = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 41)
                {
                    EndingWidth = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 42)
                {
                    Bulge = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 70)
                {
                    flags = new BitArray(new int[] { CGlobals.ConvertToInt(gc.Value.Trim()) });

                    comparer = new BitArray(new int[] { 1 });
                    ExtraVertexCreatedByCurveFitting = flags.And(comparer)[0];

                    comparer           = new BitArray(new int[] { 2 });
                    HasCurveFitTangent = flags.And(comparer)[0];

                    comparer = new BitArray(new int[] { 8 });
                    SplineVertexCreatedBySplineFitting = flags.And(comparer)[0];

                    comparer = new BitArray(new int[] { 16 });
                    SplineFrameControlPoint = flags.And(comparer)[0];

                    comparer           = new BitArray(new int[] { 32 });
                    Is3DPolylineVertex = flags.And(comparer)[0];

                    comparer = new BitArray(new int[] { 64 });
                    Is3DPolygonMeshVertex = flags.And(comparer)[0];

                    comparer             = new BitArray(new int[] { 128 });
                    IsPolyFaceMeshVertex = flags.And(comparer)[0];
                }
                else if (gc.Code == 50)
                {
                    CurveFitTangentDirection = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
            }
        }
 public override void ReadGroupCodes()
 {
     foreach (CGroupCode gc in GroupCodeList)
     {
         if (gc.Code == 2)
         {
             ViewportName = gc.Value.Trim();
         }
         else if (gc.Code == 70)
         {
             SetStandardFlags(CGlobals.ConvertToInt(gc.Value.Trim()));
         }
         else if (gc.Code == 10)
         {
             LowerLeftX = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 20)
         {
             LowerLeftY = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 11)
         {
             UpperRightX = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 21)
         {
             UpperRightY = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 12)
         {
             CenterX = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 22)
         {
             CenterY = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 13)
         {
             SnapBaseX = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 23)
         {
             SnapBaseY = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 14)
         {
             SnapSpacingX = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 24)
         {
             SnapSpacingY = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 15)
         {
             GridSpacingX = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 25)
         {
             GridSpacingY = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 16)
         {
             ViewDirectionX = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 26)
         {
             ViewDirectionY = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 36)
         {
             ViewDirectionZ = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 17)
         {
             ViewTargetX = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 27)
         {
             ViewTargetY = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 37)
         {
             ViewTargetZ = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 40)
         {
             ViewHeight = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 41)
         {
             ViewportAspectRatio = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 42)
         {
             LensLength = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 43)
         {
             FrontClippingPlaneOffset = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 44)
         {
             BackClippingPlaneOffset = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 50)
         {
             SnapRotationAngle = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 51)
         {
             TwistAngle = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
     }
 }
Beispiel #19
0
		public override void ReadGroupCodes()
		{
			BitArray flags;
			BitArray comparer;

			foreach(CGroupCode gc in GroupCodeList)
			{
				if(gc.Code == 10)
				{
					X0 = CGlobals.ConvertToDouble(gc.Value.Trim());
				}
				else if(gc.Code == 20)
				{
					Y0 = CGlobals.ConvertToDouble(gc.Value.Trim());
				}
				else if(gc.Code == 30)
				{
					Z0 = CGlobals.ConvertToDouble(gc.Value.Trim());
				}
				else if(gc.Code == 11)
				{
					X1 = CGlobals.ConvertToDouble(gc.Value.Trim());
				}
				else if(gc.Code == 21)
				{
					Y1 = CGlobals.ConvertToDouble(gc.Value.Trim());
				}
				else if(gc.Code == 31)
				{
					Z1 = CGlobals.ConvertToDouble(gc.Value.Trim());
				}
				else if(gc.Code == 12)
				{
					X2 = CGlobals.ConvertToDouble(gc.Value.Trim());
				}
				else if(gc.Code == 22)
				{
					Y2 = CGlobals.ConvertToDouble(gc.Value.Trim());
				}
				else if(gc.Code == 32)
				{
					Z2 = CGlobals.ConvertToDouble(gc.Value.Trim());
				}
				else if(gc.Code == 13)
				{
					X3 = CGlobals.ConvertToDouble(gc.Value.Trim());
				}
				else if(gc.Code == 23)
				{
					Y3 = CGlobals.ConvertToDouble(gc.Value.Trim());
				}
				else if(gc.Code == 33)
				{
					Z3 = CGlobals.ConvertToDouble(gc.Value.Trim());
				}
				else if(gc.Code == 70)
				{
					flags = new BitArray(new int[] { CGlobals.ConvertToInt(gc.Value.Trim()) });
			
					comparer = new BitArray(new int[] { 1 });
					Edge1Invisible = flags.And(comparer)[0];

					comparer = new BitArray(new int[] { 2 });
					Edge2Invisible = flags.And(comparer)[0];

					comparer = new BitArray(new int[] { 4 });
					Edge3Invisible = flags.And(comparer)[0];

					comparer = new BitArray(new int[] { 8 });
					Edge4Invisible = flags.And(comparer)[0];
				}
			}
		}
Beispiel #20
0
 public override void ReadGroupCodes()
 {
     foreach (CGroupCode gc in GroupCodeList)
     {
         if (gc.Code == 10)
         {
             X0 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 20)
         {
             Y0 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 30)
         {
             Z0 = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 40)
         {
             Height = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 1)
         {
             Text = gc.Value;
         }
         else if (gc.Code == 50)
         {
             RotationAngle = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 41)
         {
             XScale = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 51)
         {
             ObliqueAngle = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 7)
         {
             TextStyle = gc.Value.Trim();
         }
         else if (gc.Code == 71)
         {
             if (CGlobals.ConvertToDouble(gc.Value) == 2)
             {
                 Backwards  = true;
                 UpsideDown = false;
             }
             else if (CGlobals.ConvertToDouble(gc.Value) == 4)
             {
                 Backwards  = false;
                 UpsideDown = true;
             }
             else if (CGlobals.ConvertToDouble(gc.Value) == 6)
             {
                 Backwards  = true;
                 UpsideDown = true;
             }
             else
             {
                 Backwards  = false;
                 UpsideDown = false;
             }
         }
         else if (gc.Code == 72)
         {
             if (CGlobals.ConvertToDouble(gc.Value) == 0)
             {
                 HorizontalAlignment = CGlobals.TextHorizontalAlignment.Left;
             }
             else if (CGlobals.ConvertToDouble(gc.Value) == 1)
             {
                 HorizontalAlignment = CGlobals.TextHorizontalAlignment.Center;
             }
             else if (CGlobals.ConvertToDouble(gc.Value) == 2)
             {
                 HorizontalAlignment = CGlobals.TextHorizontalAlignment.Right;
             }
             else if (CGlobals.ConvertToDouble(gc.Value) == 3)
             {
                 HorizontalAlignment = CGlobals.TextHorizontalAlignment.Aligned;
             }
             else if (CGlobals.ConvertToDouble(gc.Value) == 4)
             {
                 HorizontalAlignment = CGlobals.TextHorizontalAlignment.Middle;
             }
             else if (CGlobals.ConvertToDouble(gc.Value) == 5)
             {
                 HorizontalAlignment = CGlobals.TextHorizontalAlignment.Fit;
             }
         }
         else if (gc.Code == 73)
         {
             if (CGlobals.ConvertToDouble(gc.Value) == 0)
             {
                 VerticalAlignment = CGlobals.TextVerticalAlignment.Baseline;
             }
             else if (CGlobals.ConvertToDouble(gc.Value) == 1)
             {
                 VerticalAlignment = CGlobals.TextVerticalAlignment.Bottom;
             }
             else if (CGlobals.ConvertToDouble(gc.Value) == 2)
             {
                 VerticalAlignment = CGlobals.TextVerticalAlignment.Middle;
             }
             else if (CGlobals.ConvertToDouble(gc.Value) == 3)
             {
                 VerticalAlignment = CGlobals.TextVerticalAlignment.Top;
             }
         }
         else if (gc.Code == 11)
         {
             AlignmentX = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 21)
         {
             AlignmentY = CGlobals.ConvertToDouble(gc.Value);
         }
         else if (gc.Code == 31)
         {
             AlignmentZ = CGlobals.ConvertToDouble(gc.Value);
         }
     }
 }
Beispiel #21
0
        public override void ReadGroupCodes()
        {
            BitArray      flags;
            BitArray      comparer;
            bool          processingVertices;
            CEntityVertex vertex;

            VertexList         = new ArrayList();
            processingVertices = false;
            vertex             = null;


            foreach (CGroupCode gc in GroupCodeList)
            {
                if (gc.Code == 0)
                {
                    if (gc.Value.Trim().ToUpper() == "VERTEX")
                    {
                        processingVertices = true;

                        if (vertex != null)
                        {
                            vertex.ReadGroupCodes();
                            VertexList.Add(vertex);
                        }

                        vertex            = new CEntityVertex();
                        vertex.EntityName = "VERTEX";
                        vertex.LayerName  = LayerName;
                    }
                    else if (gc.Value.Trim().ToUpper() == "SEQEND")
                    {
                        processingVertices = false;
                        if (vertex != null)
                        {
                            vertex.ReadGroupCodes();
                            VertexList.Add(vertex);
                        }
                    }
                }
                else if (gc.Code == 30 && processingVertices == false)
                {
                    Elevation = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 40 && processingVertices == false)
                {
                    DefaultStartingWidth = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 41 && processingVertices == false)
                {
                    DefaultEndingWidth = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 70 && processingVertices == false)
                {
                    flags = new BitArray(new int[] { CGlobals.ConvertToInt(gc.Value.Trim()) });

                    comparer         = new BitArray(new int[] { 1 });
                    IsClosedPolyline = flags.And(comparer)[0];

                    comparer            = new BitArray(new int[] { 2 });
                    HasCurveFitVertices = flags.And(comparer)[0];

                    comparer             = new BitArray(new int[] { 4 });
                    HasSplineFitVertices = flags.And(comparer)[0];

                    comparer     = new BitArray(new int[] { 8 });
                    Is3DPolyline = flags.And(comparer)[0];

                    comparer = new BitArray(new int[] { 16 });
                    Is3DMesh = flags.And(comparer)[0];

                    comparer = new BitArray(new int[] { 32 });
                    MeshClosedInTheNDirection = flags.And(comparer)[0];

                    comparer       = new BitArray(new int[] { 64 });
                    IsPolyfaceMesh = flags.And(comparer)[0];

                    comparer           = new BitArray(new int[] { 128 });
                    ContinuousLineType = flags.And(comparer)[0];
                }
                else if (gc.Code == 71 && processingVertices == false)
                {
                    PolygonMeshMVertexCount = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 72 && processingVertices == false)
                {
                    PolygonMeshNVertexCount = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 73 && processingVertices == false)
                {
                    SmoothSurfaceMDensity = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 74 && processingVertices == false)
                {
                    SmoothSurfaceNDensity = CGlobals.ConvertToDouble(gc.Value.Trim());
                }
                else if (gc.Code == 75 && processingVertices == false)
                {
                    if (CGlobals.ConvertToInt(gc.Value.Trim()) == 0)
                    {
                        NoSmoothSurfaceFitted = true;
                    }
                    else if (CGlobals.ConvertToInt(gc.Value.Trim()) == 5)
                    {
                        QuadraticBSplineSurface = true;
                    }
                    else if (CGlobals.ConvertToInt(gc.Value.Trim()) == 6)
                    {
                        CubicBSplineSurface = true;
                    }
                    else if (CGlobals.ConvertToInt(gc.Value.Trim()) == 8)
                    {
                        BezierSurface = true;
                    }
                }
                else
                {
                    if (processingVertices && vertex != null)
                    {
                        if (gc.Code == 5)
                        {
                            // Handle

                            vertex.Handle = gc.Value.Trim();
                        }
                        else if (gc.Code == 6)
                        {
                            // Line Type

                            vertex.LineType = gc.Value.Trim();
                        }
                        else if (gc.Code == 8)
                        {
                            // Layer Name

                            vertex.LayerName = gc.Value.Trim();
                        }
                        else
                        {
                            vertex.GroupCodeList.Add(gc);
                        }
                    }
                }
            }
        }
 public override void ReadGroupCodes()
 {
     foreach (CGroupCode gc in GroupCodeList)
     {
         if (gc.Code == 2)
         {
             DimensionStyleName = gc.Value.Trim();
         }
         else if (gc.Code == 3)
         {
             DIMPOST = gc.Value.Trim();
         }
         else if (gc.Code == 4)
         {
             DIMAPOST = gc.Value.Trim();
         }
         else if (gc.Code == 5)
         {
             DIMBLK = gc.Value.Trim();
         }
         else if (gc.Code == 6)
         {
             DIMBLK1 = gc.Value.Trim();
         }
         else if (gc.Code == 7)
         {
             DIMBLK2 = gc.Value.Trim();
         }
         else if (gc.Code == 40)
         {
             DIMSCALE = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 41)
         {
             DIMASZ = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 42)
         {
             DIMEXO = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 43)
         {
             DIMDLI = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 44)
         {
             DIMEXE = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 45)
         {
             DIMRND = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 46)
         {
             DIMDLE = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 47)
         {
             DIMTP = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 48)
         {
             DIMTM = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 140)
         {
             DIMTXT = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 141)
         {
             DIMCEN = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 142)
         {
             DIMTSZ = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 143)
         {
             DIMALTF = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 144)
         {
             DIMLFAC = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 145)
         {
             DIMTVP = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 146)
         {
             DIMTFAC = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 147)
         {
             DIMGAP = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 71)
         {
             DIMTOL = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 72)
         {
             DIMLIM = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 73)
         {
             DIMTIH = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 74)
         {
             DIMTOH = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 75)
         {
             DIMSE1 = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 76)
         {
             DIMSE2 = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 77)
         {
             DIMTAD = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 78)
         {
             DIMZIN = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 170)
         {
             DIMALT = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 171)
         {
             DIMALTD = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 172)
         {
             DIMTOFL = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 173)
         {
             DIMSAH = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 174)
         {
             DIMTIX = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 175)
         {
             DIMSOXD = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 176)
         {
             DIMCLRD = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 177)
         {
             DIMCLRE = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 178)
         {
             DIMCLRT = CGlobals.ConvertToDouble(gc.Value.Trim());
         }
         else if (gc.Code == 70)
         {
             SetStandardFlags(CGlobals.ConvertToInt(gc.Value.Trim()));
         }
     }
 }