コード例 #1
0
ファイル: Vector2.cs プロジェクト: 1907931256/MasterProject
        public Vector2(PointCyl ptIn)
        {
            x = (double)(ptIn.R * Math.Cos(ptIn.ThetaRad));
            y = (double)(ptIn.R * Math.Sin(ptIn.ThetaRad));

            Col = ptIn.Col;
        }
コード例 #2
0
 public void ParseArcDxf(List <string> fileSection)
 {
     try
     {
         double startDeg = 0;
         double endDeg   = 0;
         ParseCircleDxf(fileSection);
         for (int i = 0; i < fileSection.Count - 1; i++)
         {
             var line = fileSection[i].Trim();
             if (line == "50")
             {
                 startDeg = Convert.ToDouble(fileSection[i + 1]);
             }
             if (line == "51")
             {
                 endDeg = Convert.ToDouble(fileSection[i + 1]);
             }
         }
         StartAngleRad = PointCyl.ToRadians(startDeg);
         EndAngleRad   = PointCyl.ToRadians(endDeg);
         ClosedArc     = false;
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #3
0
        public IPointCyl RotateZ(IVector3 rotationPt, double angleRad)
        {
            IVector3  ptXYZ    = new Vector3(this);
            IVector3  ptRot    = ptXYZ.RotateZ(rotationPt, angleRad);
            IPointCyl ptCylRot = new PointCyl(ptRot);

            ptCylRot.Col = Col;
            return(ptCylRot);
        }
コード例 #4
0
        public IPointCyl Translate(IVector3 translation)
        {
            IVector3 ptXYZ      = new Vector3(this);
            IVector3 ptTrans    = ptXYZ.Translate(translation);
            PointCyl ptCylTrans = new PointCyl(ptTrans);

            ptCylTrans.Col = Col;
            return(ptCylTrans);
        }