private void AddFresaSpianare(string millName, double diameter, double diameterMax, double altezza, double feed, double plungeFeed) { var matC40 = GetMaterialByName(C40, MeasureUnit.Millimeter); var matInoxMm = GetMaterialByName(Aisi, MeasureUnit.Millimeter); var matAluMm = GetMaterialByName(Alu, MeasureUnit.Millimeter); var fpMm = new FresaSpianare(MeasureUnit.Millimeter) { ToolName = millName, Diametro = diameter, DiametroIngombroFresa = diameterMax, Altezza = altezza, ToolPosition = 16 }; AddParametro(fpMm, matC40, VelTaglioC40, feed, plungeFeed); AddParametro(fpMm, matInoxMm, VelTaglioInox, feed, plungeFeed); AddParametro(fpMm, matAluMm, VelTaglioAlluminio, feed, plungeFeed); _mag.AddOrUpdateTool(fpMm); var matC40I = GetMaterialByName(C40, MeasureUnit.Inch); var matInoxMmI = GetMaterialByName(Aisi, MeasureUnit.Inch); var matAluMmI = GetMaterialByName(Alu, MeasureUnit.Inch); var p1 = new FresaSpianare(MeasureUnit.Inch) { ToolName = millName, Diametro = FeedAndSpeedHelper.GetInchFromMm(diameter), DiametroIngombroFresa = FeedAndSpeedHelper.GetInchFromMm(diameterMax), Altezza = FeedAndSpeedHelper.GetInchFromMm(altezza), ToolPosition = 16 }; feed = FeedAndSpeedHelper.GetInchFromMm(feed); AddParametro(p1, matC40I, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioC40), FeedAndSpeedHelper.GetInchFromMm(feed), FeedAndSpeedHelper.GetInchFromMm(plungeFeed)); AddParametro(p1, matInoxMmI, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioInox), FeedAndSpeedHelper.GetInchFromMm(feed), FeedAndSpeedHelper.GetInchFromMm(plungeFeed)); AddParametro(p1, matAluMmI, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioAlluminio), FeedAndSpeedHelper.GetInchFromMm(feed), FeedAndSpeedHelper.GetInchFromMm(plungeFeed)); _mag.AddOrUpdateTool(p1); }
private void AddGrooveTool(string toolName, LavorazioniEnumOperazioni lavorazioniEnumOperazioni, double toolW, double feed, int pos) { var matC40 = GetMaterialByName(C40, MeasureUnit.Millimeter); var matInoxMm = GetMaterialByName(Aisi, MeasureUnit.Millimeter); var matAluMm = GetMaterialByName(Alu, MeasureUnit.Millimeter); var larghe = (toolW * 80) / 100; var tMm = new UtensileScanalatura(MeasureUnit.Millimeter) { OperazioneTipo = lavorazioniEnumOperazioni, ToolName = toolName, ToolPosition = pos, LarghezzaUtensile = toolW }; AddParametro(tMm, matC40, VelTaglioC40, feed, larghe); AddParametro(tMm, matInoxMm, VelTaglioInox, feed, larghe); AddParametro(tMm, matAluMm, VelTaglioAlluminio, feed, larghe); _mag.AddOrUpdateTool(tMm); var matC40Inc = GetMaterialByName(C40, MeasureUnit.Inch); var matInoxI = GetMaterialByName(Aisi, MeasureUnit.Inch); var matAluI = GetMaterialByName(Alu, MeasureUnit.Inch); var tI = new UtensileScanalatura(MeasureUnit.Inch) { OperazioneTipo = lavorazioniEnumOperazioni, ToolName = toolName, ToolPosition = pos, LarghezzaUtensile = FeedAndSpeedHelper.GetInchFromMm(toolW) }; AddParametro(tI, matC40Inc, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioC40), FeedAndSpeedHelper.GetInchFromMm(feed), FeedAndSpeedHelper.GetInchFromMm(larghe)); AddParametro(tI, matInoxI, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioInox), FeedAndSpeedHelper.GetInchFromMm(feed), FeedAndSpeedHelper.GetInchFromMm(larghe)); AddParametro(tI, matAluI, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioAlluminio), FeedAndSpeedHelper.GetInchFromMm(feed), FeedAndSpeedHelper.GetInchFromMm(larghe)); _mag.AddOrUpdateTool(tI); }
private void AddFresaCandela(string millName, double diameter, double lxD, double feed, int toolPos) { var plungeFeed = feed / 3; var matC40 = GetMaterialByName(C40, MeasureUnit.Millimeter); var matInoxMm = GetMaterialByName(Aisi, MeasureUnit.Millimeter); var matAluMm = GetMaterialByName(Alu, MeasureUnit.Millimeter); var fpMm = new FresaCandela(MeasureUnit.Millimeter) { ToolName = millName, Diametro = diameter, Altezza = lxD * diameter, ToolPosition = toolPos }; AddParametro(fpMm, matC40, VelTaglioC40Mill, feed, plungeFeed, 30, 70); AddParametro(fpMm, matInoxMm, VelTaglioInoxMill, feed, plungeFeed, 30, 70); AddParametro(fpMm, matAluMm, VelTaglioAlluminioMill, feed, plungeFeed, 30, 70); _mag.AddOrUpdateTool(fpMm); var matC40I = GetMaterialByName(C40, MeasureUnit.Inch); var matInoxMmI = GetMaterialByName(Aisi, MeasureUnit.Inch); var matAluMmI = GetMaterialByName(Alu, MeasureUnit.Inch); var p1 = new FresaCandela(MeasureUnit.Inch) { ToolName = millName, Diametro = FeedAndSpeedHelper.GetInchFromMm(diameter), Altezza = FeedAndSpeedHelper.GetInchFromMm(lxD * diameter), ToolPosition = toolPos }; feed = FeedAndSpeedHelper.GetInchFromMm(feed); AddParametro(p1, matC40I, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioC40Mill), FeedAndSpeedHelper.GetInchFromMm(feed), FeedAndSpeedHelper.GetInchFromMm(plungeFeed), 30, 70); AddParametro(p1, matInoxMmI, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioInoxMill), FeedAndSpeedHelper.GetInchFromMm(feed), FeedAndSpeedHelper.GetInchFromMm(plungeFeed), 30, 70); AddParametro(p1, matAluMmI, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioAlluminioMill), FeedAndSpeedHelper.GetInchFromMm(feed), FeedAndSpeedHelper.GetInchFromMm(plungeFeed), 30, 70); _mag.AddOrUpdateTool(p1); }
private void AddThreadTool(string toolName, LavorazioniEnumOperazioni lavorazioniEnumOperazioni, int pos) { var matC40 = GetMaterialByName(C40, MeasureUnit.Millimeter); var matInoxMm = GetMaterialByName(Aisi, MeasureUnit.Millimeter); var matAluMm = GetMaterialByName(Alu, MeasureUnit.Millimeter); var tMm = new UtensileFilettare(MeasureUnit.Millimeter) { OperazioneTipo = lavorazioniEnumOperazioni, ToolName = toolName, ToolPosition = pos }; AddParametro(tMm, matC40, VelTaglioC40); AddParametro(tMm, matInoxMm, VelTaglioInox); AddParametro(tMm, matAluMm, VelTaglioAlluminio); _mag.AddOrUpdateTool(tMm); var matC40Inc = GetMaterialByName(C40, MeasureUnit.Inch); var matInoxI = GetMaterialByName(Aisi, MeasureUnit.Inch); var matAluI = GetMaterialByName(Alu, MeasureUnit.Inch); var tI = new UtensileFilettare(MeasureUnit.Inch) { OperazioneTipo = lavorazioniEnumOperazioni, ToolName = toolName, ToolPosition = pos }; AddParametro(tI, matC40Inc, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioC40)); AddParametro(tI, matInoxI, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioInox)); AddParametro(tI, matAluI, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioAlluminio)); _mag.AddOrUpdateTool(tI); }
/// <summary> /// Aggiunge utensile tornitura. /// </summary> private void AddTurningTool(string toolName, LavorazioniEnumOperazioni lavorazioniEnumOperazioni, double feed, double profPass, int pos) { var matC40 = GetMaterialByName(C40, MeasureUnit.Millimeter); var matInoxMm = GetMaterialByName(Aisi, MeasureUnit.Millimeter); var matAluMm = GetMaterialByName(Alu, MeasureUnit.Millimeter); var tMm = new UtensileTornitura(MeasureUnit.Millimeter) { OperazioneTipo = lavorazioniEnumOperazioni, ToolName = toolName, ToolPosition = pos }; AddParametro(tMm, matC40, VelTaglioC40, feed, profPass); AddParametro(tMm, matInoxMm, VelTaglioInox, feed, profPass); AddParametro(tMm, matAluMm, VelTaglioAlluminio, feed, profPass); _mag.AddOrUpdateTool(tMm); var matC40Inc = GetMaterialByName(C40, MeasureUnit.Inch); var matInoxI = GetMaterialByName(Aisi, MeasureUnit.Inch); var matAluI = GetMaterialByName(Alu, MeasureUnit.Inch); var tI = new UtensileTornitura(MeasureUnit.Inch) { OperazioneTipo = lavorazioniEnumOperazioni, ToolName = toolName, ToolPosition = pos }; AddParametro(tI, matC40Inc, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioC40), FeedAndSpeedHelper.GetInchFromMm(feed), FeedAndSpeedHelper.GetInchFromMm(profPass)); AddParametro(tI, matInoxI, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioInox), FeedAndSpeedHelper.GetInchFromMm(feed), FeedAndSpeedHelper.GetInchFromMm(profPass)); AddParametro(tI, matAluI, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioAlluminio), FeedAndSpeedHelper.GetInchFromMm(feed), FeedAndSpeedHelper.GetInchFromMm(profPass)); _mag.AddOrUpdateTool(tI); }
private void AddPuntaSet(string drillName, double diameterIni, double diameterFin, double increment, double feedOnD10) { var matC40 = GetMaterialByName(C40, MeasureUnit.Millimeter); var matInoxMm = GetMaterialByName(Aisi, MeasureUnit.Millimeter); var matAluMm = GetMaterialByName(Alu, MeasureUnit.Millimeter); /* * come feed prendo un valori indicativo per punta diametro 10 poi faccio proporzione. * 10:f = i:x * (i*f )/10 = feedC */ for (var i = diameterIni; i < diameterFin; i += increment) { var p = new Punta(MeasureUnit.Millimeter) { ToolName = drillName, Diametro = Math.Round(i, 5), ToolPosition = 7 }; var feed = (i * feedOnD10) / 10; AddParametro(p, matC40, VelTaglioHssC40, feed, i); AddParametro(p, matInoxMm, VelTaglioHssInox, feed, i); AddParametro(p, matAluMm, VelTaglioHssAlluminio, feed, i); _mag.AddOrUpdateTool(p); } var matC40I = GetMaterialByName(C40, MeasureUnit.Inch); var matInoxMmI = GetMaterialByName(Aisi, MeasureUnit.Inch); var matAluMmI = GetMaterialByName(Alu, MeasureUnit.Inch); /* * come feed prendo un valori indicativo per punta diametro 10 poi faccio proporzione. * 10:f = i:x * (i*f )/10 = feedC */ for (var i = FeedAndSpeedHelper.GetInchFromMm(diameterIni); i < FeedAndSpeedHelper.GetInchFromMm(diameterFin); i += FeedAndSpeedHelper.GetInchFromMm(increment)) { var p = new Punta(MeasureUnit.Inch) { ToolName = drillName, Diametro = Math.Round(i, 5), ToolPosition = 7 }; var feed = (i * feedOnD10) / 10; feed = FeedAndSpeedHelper.GetInchFromMm(feed); AddParametro(p, matC40I, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioHssC40), feed, p.Diametro); AddParametro(p, matInoxMmI, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioHssInox), feed, p.Diametro); AddParametro(p, matAluMmI, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioHssAlluminio), feed, p.Diametro); _mag.AddOrUpdateTool(p); } }
private void AddCentriniSet(string toolName, IEnumerable<int> diaList, double feedOnD10) { var matC40 = GetMaterialByName(C40, MeasureUnit.Millimeter); var matInoxMm = GetMaterialByName(Aisi, MeasureUnit.Millimeter); var matAluMm = GetMaterialByName(Alu, MeasureUnit.Millimeter); /* * come feed prendo un valori indicativo per punta diametro 10 poi faccio proporzione. * 10:f = i:x * (i*f )/10 = feedC */ foreach (var i in diaList) { var p = new Centrino(MeasureUnit.Millimeter) { ToolName = toolName, Diametro = i, ToolPosition = 5 }; var feed = (i * feedOnD10) / 10; AddParametro(p, matC40, VelTaglioHssC40, feed, i); AddParametro(p, matInoxMm, VelTaglioHssInox, feed, i); AddParametro(p, matAluMm, VelTaglioHssAlluminio, feed, i); _mag.AddOrUpdateTool(p); } var matC40I = GetMaterialByName(C40, MeasureUnit.Inch); var matInoxMmI = GetMaterialByName(Aisi, MeasureUnit.Inch); var matAluMmI = GetMaterialByName(Alu, MeasureUnit.Inch); /* * come feed prendo un valori indicativo per punta diametro 10 poi faccio proporzione. * 10:f = i:x * (i*f )/10 = feedC */ foreach (var i in diaList) { var d = FeedAndSpeedHelper.GetInchFromMm(i); var p = new Punta(MeasureUnit.Inch) { ToolName = toolName, Diametro = Math.Round(d, 5), ToolPosition = 5 }; var feed = (i * feedOnD10) / 10; feed = FeedAndSpeedHelper.GetInchFromMm(feed); AddParametro(p, matC40I, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioHssC40), feed, p.Diametro); AddParametro(p, matInoxMmI, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioHssInox), feed, p.Diametro); AddParametro(p, matAluMmI, FeedAndSpeedHelper.GetInchSpeedCut(VelTaglioHssAlluminio), feed, p.Diametro); _mag.AddOrUpdateTool(p); } }