Esempio n. 1
0
        public static Stream CalcRatchetSvgZip(RatchetParams gParams)
        {
            GearProfiles profiles  = CalcRatchetImage(gParams);
            Stream       zipStream = Zipper.ZipStringToStream(profiles.ShortName, profiles.SvgData);

            return(zipStream);
        }
Esempio n. 2
0
        public static GearProfiles CalcRatchetImage(RatchetParams gParams)
        {
            if (gParams == null)
            {
                throw new ArgumentNullException(nameof(gParams));
            }

            Ratchet gear = new(
                gParams.Teeth,
                double.Parse(gParams.Module),
                double.Parse(gParams.Tolerance),
                double.Parse(gParams.InnerDiameter),
                double.Parse(gParams.CutterDiameter));

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

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