コード例 #1
0
        public static Stream CalcInvoluteSvgZip(GearParams gParams)
        {
            GearProfiles profiles  = CalcInvoluteImage(gParams);
            Stream       zipStream = Zipper.ZipStringToStream(profiles.ShortName, profiles.SvgData);

            return(zipStream);
        }
コード例 #2
0
        public static GearProfiles CalcInvoluteImage(GearParams gParams)
        {
            if (gParams == null)
            {
                throw new ArgumentNullException(nameof(gParams));
            }

            GearParameters gear = new(
                gParams.Teeth,
                double.Parse(gParams.Module),
                Math.PI *double.Parse(gParams.PressureAngle) / 180.0,
                double.Parse(gParams.ProfileShift) / 100.0,
                double.Parse(gParams.Tolerance),
                double.Parse(gParams.Backlash) / double.Parse(gParams.Module),
                double.Parse(gParams.CutterDiameter));

            Cutouts cutoutCalculator = new(
                gear,
                double.Parse(gParams.SpindleDiameter),
                double.Parse(gParams.InlayDiameter),
                double.Parse(gParams.KeyFlatWidth));

            return(CreateGearPlot(cutoutCalculator, gear.AddendumCircleDiameter));
        }