예제 #1
0
 private void generatePrefix(IGeometryOutput sb, MillInfo mill)
 {
     sb.BeginGroup("generatePrefix");
     sb.Comment(String.Format("Diameter {0} Cut Depth {1} Pass Depth {2} Feed {3} Speed {4}",
                              mill.diameter, mill.cuttingDepth, mill.passDepth, mill.feed, mill.speed));
     sb.SetFeed((float)mill.feed);
     sb.SetSpeed((float)mill.speed);
     sb.SetDepth(0.5f);
     sb.MoveTo(new PointF(0, 0));
     sb.SetDepth(0.1f);
     sb.EndGroup();
 }
예제 #2
0
 private void generatePrefix(IGeometryOutput sb, MillInfo mill)
 {
     sb.BeginGroup("generatePrefix");
     sb.Comment(String.Format("Diameter {0} Cut Depth {1} Pass Depth {2} Feed {3} Speed {4}",
         mill.diameter, mill.cuttingDepth, mill.passDepth, mill.feed, mill.speed));
     sb.SetFeed((float)mill.feed);
     sb.SetSpeed((float)mill.speed);
     sb.SetDepth(0.5f);
     sb.MoveTo(new PointF(0, 0));
     sb.SetDepth(0.1f);
     sb.EndGroup();
 }
예제 #3
0
        private void generateToothProfileMilling(IGeometryOutput sb, int teeth, MillInfo mill)
        {
            sb.BeginGroup("generateToothProfileMilling");
            Outline nuProfile = GenerateOutline(work.profile, teeth, mill.diameter);
            PointF  start     = nuProfile.points[0];
            double  cDep      = work.dimensions.stockThickness - work.dimensions.plateThickness;
            double  rDep      = cDep - work.dimensions.toothThickness;

            sb.MoveTo(start);
            sb.SetDepth((float)-rDep);
            PointF curPos   = start;
            double endDepth = cDep;

            if (work.dimensions.plateThickness == 0)
            {
                endDepth += cutThroughMargin;
            }
            sb.Comment(String.Format("startDepth {0} endDepth {1} passDepth {2}",
                                     rDep, endDepth, mill.passDepth));
            for (double d = rDep; d < endDepth;)
            {
                d += mill.passDepth;
                if (d > endDepth)
                {
                    d = endDepth;
                }
                //  plunge slowly
                sb.SetDepth((float)-d);
                foreach (PointF p in nuProfile.points)
                {
                    curPos = LineOrArc(sb, p, curPos);
                }
                LineOrArc(sb, start, curPos);
                curPos = start;
            }
            sb.SetDepth(0);
            sb.SetDepth(0.1f);
            sb.EndGroup();
        }
예제 #4
0
        internal bool getToothMillInfo(ref MillInfo mi)
        {
            CancelEventArgs cea = new CancelEventArgs();

            cea.Cancel      = false;
            mi.cuttingDepth = validateInch(textToothCuttingDepth, cea);
            if (cea.Cancel)
            {
                return(false);
            }
            mi.diameter = validateInch(textToothMillDiameter, cea);
            if (cea.Cancel)
            {
                return(false);
            }
            mi.passDepth = validateInch(textToothPassDepth, cea);
            if (cea.Cancel)
            {
                return(false);
            }
            mi.stepOver = validateInch(textToothStepOver, cea);
            if (cea.Cancel)
            {
                return(false);
            }
            mi.feed = validateInch(textToothFeed, cea);
            if (cea.Cancel)
            {
                return(false);
            }
            mi.speed = validateInch(textToothSpeed, cea);
            if (cea.Cancel)
            {
                return(false);
            }
            return(true);
        }
예제 #5
0
파일: ExportForm.cs 프로젝트: jwatte/gears
 internal bool getToothMillInfo(ref MillInfo mi)
 {
     CancelEventArgs cea = new CancelEventArgs();
     cea.Cancel = false;
     mi.cuttingDepth = validateInch(textToothCuttingDepth, cea);
     if (cea.Cancel)
     {
         return false;
     }
     mi.diameter = validateInch(textToothMillDiameter, cea);
     if (cea.Cancel)
     {
         return false;
     }
     mi.passDepth = validateInch(textToothPassDepth, cea);
     if (cea.Cancel)
     {
         return false;
     }
     mi.stepOver = validateInch(textToothStepOver, cea);
     if (cea.Cancel)
     {
         return false;
     }
     mi.feed = validateInch(textToothFeed, cea);
     if (cea.Cancel)
     {
         return false;
     }
     mi.speed = validateInch(textToothSpeed, cea);
     if (cea.Cancel)
     {
         return false;
     }
     return true;
 }
예제 #6
0
 private void generateToothProfileMilling(IGeometryOutput sb, int teeth, MillInfo mill)
 {
     sb.BeginGroup("generateToothProfileMilling");
     Outline nuProfile = GenerateOutline(work.profile, teeth, mill.diameter);
     PointF start = nuProfile.points[0];
     double cDep = work.dimensions.stockThickness - work.dimensions.plateThickness;
     double rDep = cDep - work.dimensions.toothThickness;
     sb.MoveTo(start);
     sb.SetDepth((float)-rDep);
     PointF curPos = start;
     double endDepth = cDep;
     if (work.dimensions.plateThickness == 0)
     {
         endDepth += cutThroughMargin;
     }
     sb.Comment(String.Format("startDepth {0} endDepth {1} passDepth {2}",
         rDep, endDepth, mill.passDepth));
     for (double d = rDep; d < endDepth; )
     {
         d += mill.passDepth;
         if (d > endDepth)
         {
             d = endDepth;
         }
         //  plunge slowly
         sb.SetDepth((float)-d);
         foreach (PointF p in nuProfile.points)
         {
             curPos = LineOrArc(sb, p, curPos);
         }
         LineOrArc(sb, start, curPos);
         curPos = start;
     }
     sb.SetDepth(0);
     sb.SetDepth(0.1f);
     sb.EndGroup();
 }