Inheritance: ToothProfile
        protected static ToothProfile GetGearProfileFromOptions(GearData gearData, GearData conjugateGearData, bool useTrochoidalInterferenceRemoval, bool addDedendumClearance, double screwAngle = 0)
        {
            ToothProfile toothProfile = null;
            if (addDedendumClearance) {
                if (useTrochoidalInterferenceRemoval)
                    toothProfile = new ExtendedTrochoidalToothProfile(gearData, conjugateGearData);
                else {
                    if (gearData.IsSmallDedendum)
                        toothProfile = new ExtendedToothProfile(gearData);
                    else
                        toothProfile = new BasicToothProfile(gearData);
                }
            }
            else {
                if (useTrochoidalInterferenceRemoval)
                    toothProfile = new BasicTrochoidalToothProfile(gearData, conjugateGearData);
                else {
                    if (gearData.IsSmallDedendum)
                        toothProfile = new ExtendedToothProfile(gearData);
                    else
                        toothProfile = new BasicToothProfile(gearData);
                }

            }

            return toothProfile;
        }
Exemple #2
0
        protected static ToothProfile GetGearProfileFromOptions(GearData gearData, GearData conjugateGearData, bool useTrochoidalInterferenceRemoval, bool addDedendumClearance, double screwAngle = 0)
        {
            ToothProfile toothProfile = null;

            if (addDedendumClearance)
            {
                if (useTrochoidalInterferenceRemoval)
                {
                    toothProfile = new ExtendedTrochoidalToothProfile(gearData, conjugateGearData);
                }
                else
                {
                    if (gearData.IsSmallDedendum)
                    {
                        toothProfile = new ExtendedToothProfile(gearData);
                    }
                    else
                    {
                        toothProfile = new BasicToothProfile(gearData);
                    }
                }
            }
            else
            {
                if (useTrochoidalInterferenceRemoval)
                {
                    toothProfile = new BasicTrochoidalToothProfile(gearData, conjugateGearData);
                }
                else
                {
                    if (gearData.IsSmallDedendum)
                    {
                        toothProfile = new ExtendedToothProfile(gearData);
                    }
                    else
                    {
                        toothProfile = new BasicToothProfile(gearData);
                    }
                }
            }

            return(toothProfile);
        }