Ejemplo n.º 1
0
        // TESTING
        public CompBallCutter(double diam2, double clength)
        {
            MillingCutter shaft = new BallCutter(diam2, clength);

            addCutter(shaft, diam2 / 2.0, clength, 0.0);
            length = clength;
        }
Ejemplo n.º 2
0
        }         // dummy, required(?) by python wrapper

        /// create ballconecutter
        public BallConeCutter(double diam1, double diam2, double angle)
        {
            MillingCutter c1    = new BallCutter(diam1, 1);          // at offset zero
            MillingCutter c2    = new ConeCutter(diam2, angle);
            MillingCutter shaft = new CylCutter(diam2, 20);          // FIXME: length

            double radius1      = diam1 / 2.0;
            double radius2      = diam2 / 2.0;
            double rcontact     = radius1 * Math.Cos(angle);
            double height1      = radius1 - Math.Sqrt(ocl.GlobalMembers.square(radius1) - ocl.GlobalMembers.square(rcontact));
            double cone_offset  = -((rcontact) / Math.Tan(angle) - height1);
            double height2      = radius2 / Math.Tan(angle) + cone_offset;
            double shaft_offset = height2;

            // cutter, radivec, heightvec, zoffset
            addCutter(c1, rcontact, height1, 0.0);
            addCutter(c2, diam2 / 2.0, height2, cone_offset);
            addCutter(shaft, diam2 / 2.0, height2 + 20, shaft_offset);
            length = 30;
        }