public IBoltBearing GetBearingBolt(double Diameter, BoltThreadCase ThreadType) { IBoltMaterial bm = null; IBoltBearing bb = null; CalcLog log = new CalcLog(); switch (MaterialId) { case "A325": bb = new BoltBearingGroupA(Diameter, ThreadType, log); break; case "A490": bb = new BoltBearingGroupB(Diameter, ThreadType, log); break; case "F1852": bb = new BoltBearingGroupA(Diameter, ThreadType, log); break; case "A307": bm = new BoltA307Material(); bb = new BoltBearingThreadedGeneral(Diameter, ThreadType, bm, log); break; case "A354GradeBC": bb = new BoltBearingGroupA(Diameter, ThreadType, log); break; case "A354GradeBD": bb = new BoltBearingGroupB(Diameter, ThreadType, log); break; case "A449": bb = new BoltBearingGroupA(Diameter, ThreadType, log); break; case "F1554Grade105": bm = new ThreadedBoltMaterial(125.0); bb = new BoltBearingThreadedGeneral(Diameter, ThreadType, bm, log); break; case "F1554Grade55": bm = new ThreadedBoltMaterial(75.0); bb = new BoltBearingThreadedGeneral(Diameter, ThreadType, bm, log); break; case "F1554Grade36": bm = new ThreadedBoltMaterial(58.0); bb = new BoltBearingThreadedGeneral(Diameter, ThreadType, bm, log); break; default: throw new Exception("Unrecognized bolt material. Check input"); } return(bb); }
public IBoltBearing GetBearingBolt(double Diameter, BoltThreadCase ThreadType) { IBoltMaterial bm = null; IBoltBearing bb = null; CalcLog log = new CalcLog(); switch (MaterialId) { case "A325": bb = new BoltBearingGroupA(Diameter, ThreadType, log); break; case "A490": bb = new BoltBearingGroupB(Diameter, ThreadType, log); break; case "F1852": bb = new BoltBearingGroupA(Diameter, ThreadType, log); break; case "A307": bm = new BoltA307Material(); bb=new BoltBearingThreadedGeneral(Diameter, ThreadType, bm, log); break; case "A354GradeBC": bb = new BoltBearingGroupA(Diameter, ThreadType, log); break; case "A354GradeBD": bb = new BoltBearingGroupB(Diameter, ThreadType, log); break; case "A449": bb = new BoltBearingGroupA(Diameter, ThreadType, log); break; case "F1554Grade105": bm = new ThreadedBoltMaterial(125.0); bb = new BoltBearingThreadedGeneral(Diameter, ThreadType, bm, log); break; case "F1554Grade55": bm = new ThreadedBoltMaterial(75.0); bb = new BoltBearingThreadedGeneral(Diameter, ThreadType, bm, log); break; case "F1554Grade36": bm = new ThreadedBoltMaterial(58.0); bb = new BoltBearingThreadedGeneral(Diameter, ThreadType, bm, log); break; default: throw new Exception("Unrecognized bolt material. Check input"); } return bb; }