コード例 #1
0
        /// <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);
        }
コード例 #2
0
        private static void AddParametro(UtensileTornitura tornitura, Materiale materiale, double vel, double feed, double proPa)
        {
            var par = new ParametroUtensileTornitura(tornitura)
            {
                ModalitaVelocita = ModalitaVelocita.VelocitaTaglio,
                Velocita = vel,
                AvanzamentoSincrono = feed,
                MaterialGuid = (materiale.MaterialeGuid),
                ProfonditaPassata = proPa
            };

            tornitura.AddOrUpdateParametro(par, materiale.MaterialeGuid);

        }
コード例 #3
0
 public UtensileTornituraViewModel(UtensileTornitura fresaTool, TreeViewItemViewModel parent) :
     base(fresaTool, parent)
 {
     _utensileTornitura = fresaTool;
 }
コード例 #4
0
 public GeneralTurningToolViewModel(UtensileTornitura genericTurningTool)
 {
     _genericTurningTool = genericTurningTool;
 }