public static GearCalc[] calcGears(GearInfo info) { GearCalc[] ret = new GearCalc[2]; if (!info.ok) { return(ret); } ret[0].moduleInch = 1.0 / info.pitchGpi; ret[1].moduleInch = 1.0 / info.pitchGpi; ret[0].radius = (double)info.aNumTeeth * ret[0].moduleInch / 2; ret[1].radius = (double)info.bNumTeeth * ret[1].moduleInch / 2; ret[0].baseRadius = ret[0].radius * Math.Cos(info.pressureAngle * Math.PI / 180); ret[1].baseRadius = ret[1].radius * Math.Cos(info.pressureAngle * Math.PI / 180); ret[0].centerDistance = ret[0].radius + ret[1].radius; ret[1].centerDistance = ret[0].radius + ret[1].radius; ret[0].addendum = ret[0].moduleInch * info.stubRatio * (1 + info.profileShift); ret[1].addendum = ret[0].moduleInch * info.stubRatio * (1 - info.profileShift); ret[0].dedendum = ret[0].moduleInch * info.stubRatio * (1.25f - info.profileShift); ret[1].dedendum = ret[0].moduleInch * info.stubRatio * (1.25f + info.profileShift); ret[0].profileShift = info.profileShift; ret[1].profileShift = -info.profileShift; ret[0].numTeeth = info.aNumTeeth; ret[1].numTeeth = info.bNumTeeth; ret[0].ok = true; ret[1].ok = true; return(ret); }
public void setInfo(GearInfo info, GearCalc gearA, GearCalc gearB, PointF[] profileA, PointF[] profileB) { info_ = info; calcPinion_ = gearA; calcGear_ = gearB; profileA_ = profileA; profileB_ = profileB; labelExample.Text = makeFileName(true, false); }
public static GearCalc[] calcGears(GearInfo info) { GearCalc[] ret = new GearCalc[2]; if (!info.ok) { return ret; } ret[0].moduleInch = 1.0 / info.pitchGpi; ret[1].moduleInch = 1.0 / info.pitchGpi; ret[0].radius = (double)info.aNumTeeth * ret[0].moduleInch / 2; ret[1].radius = (double)info.bNumTeeth * ret[1].moduleInch / 2; ret[0].baseRadius = ret[0].radius * Math.Cos(info.pressureAngle * Math.PI / 180); ret[1].baseRadius = ret[1].radius * Math.Cos(info.pressureAngle * Math.PI / 180); ret[0].centerDistance = ret[0].radius + ret[1].radius; ret[1].centerDistance = ret[0].radius + ret[1].radius; ret[0].addendum = ret[0].moduleInch * info.stubRatio * (1 + info.profileShift); ret[1].addendum = ret[0].moduleInch * info.stubRatio * (1 - info.profileShift); ret[0].dedendum = ret[0].moduleInch * info.stubRatio * (1.25f - info.profileShift); ret[1].dedendum = ret[0].moduleInch * info.stubRatio * (1.25f + info.profileShift); ret[0].profileShift = info.profileShift; ret[1].profileShift = -info.profileShift; ret[0].numTeeth = info.aNumTeeth; ret[1].numTeeth = info.bNumTeeth; ret[0].ok = true; ret[1].ok = true; return ret; }