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 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 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); }
/// <summary> /// Calcola movimento di sfacciatura con movimento accelerato /// </summary> public static double CalcAcceleratedVerticalMove(double diaIni, double diaFin, double speed, double feed, double maxSpeed, MeasureUnit measureUnit) { if (feed <= 0 || speed <= 0) { return(0); } var diaMax = Math.Max(diaIni, diaFin); var diaMin = Math.Min(diaFin, diaIni); const float incremento = 0.1f; double time = 0.0d; for (var i = diaMax; i > diaMin; i -= incremento) { // calcolo Avanzamento in questo punto var nGiri = FeedAndSpeedHelper.GetNumeroGiri(speed, i, measureUnit, maxSpeed); if (maxSpeed > 0 && nGiri > maxSpeed) { nGiri = maxSpeed; } var feedCalc = nGiri * feed; time += (incremento / 2) / feedCalc; } time += 0.01f; // ?? compenso errore rilevato con dati sperimentali di 0.6 sec. per passata return(time); }
public void SetPlungeFeedAsync(double feedAsync) { AvanzamentoAsincronoPiantata.SetValue(true, feedAsync); if (NumeroGiri.Value.HasValue) { var nGiri = NumeroGiri.Value.Value; AvanzamentoSincronoPiantata.SetValue(false, FeedAndSpeedHelper.GetFeedSync(feedAsync, nGiri)); } }
/// <summary> /// Aggiunge Materiale con valori metrici e poi aggiunge anche i suoi valori da inch.. /// </summary> private void AddMaterialMetric(string nome, double pesoSpecifico, GruppoMaterialeType gruppoMaterialeType) { var mat = new Materiale(MeasureUnit.Millimeter); var matInch = new Materiale(MeasureUnit.Inch); mat.Descrizione = matInch.Descrizione = nome; mat.PesoSpecifico = pesoSpecifico; mat.GruppoMateriale = matInch.GruppoMateriale = gruppoMaterialeType; matInch.PesoSpecifico = FeedAndSpeedHelper.DensityDmToInch(pesoSpecifico); _mag.AddMateriale(matInch); _mag.AddMateriale(mat); }
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); } }
/// <summary> /// Il limitatore giri funziona solo se è > di 0 /// </summary> /// <param name="l"></param> /// <param name="speed"></param> /// <param name="feed"></param> /// <param name="measureUnit"></param> /// <param name="limitGiri"></param> /// <returns></returns> internal static double CalcHorizontalTime(PreviewLine3D l, double speed, double feed, MeasureUnit measureUnit, double limitGiri) { var d = l.Start.Y; var nGiri = FeedAndSpeedHelper.GetNumeroGiri(speed, d, measureUnit); if (limitGiri > 0 && nGiri > limitGiri) { nGiri = limitGiri; } var feedCalc = nGiri * feed; return((l.GetMoveLength()) / feedCalc); }
public void SetVelocitaTaglio(double velocitaTaglio) { VelocitaTaglio.SetValue(true, velocitaTaglio); NumeroGiri.SetValue(false, FeedAndSpeedHelper.GetNumeroGiri(velocitaTaglio, DiametroFresa, Mill.Unit)); }
public void SetNumeroGiri(double nGiri) { NumeroGiri.SetValue(true, nGiri); VelocitaTaglio.SetValue(false, FeedAndSpeedHelper.GetVelocitaTaglio(nGiri, DiametroFresa, Mill.Unit)); }