예제 #1
0
        public SettingForm()
        {
            InitializeComponent();

            bindingSourceSettings.DataSource      = Settings.GetInstance();        // Properties.Settings.Default;
            bindingSourceProcessParams.DataSource = ProcessingParams.GetDefault(); // Properties.Settings.Default;

            comboBoxEdit1.SelectedIndex = (int)Settings.GetInstance().ProcessMode;

            // ReSharper disable once CoVariantArrayConversion
            object[] items = Enum.GetNames(typeof(FeedType));
            comboBoxEditFeedType.Properties.Items.AddRange(items);
            comboBoxEditRetractType.Properties.Items.AddRange(items);
        }
예제 #2
0
        private static void Retract(Curve toolpathCurve, int direction, int outsideSign, ProcessingParams par)
        {
            if (par.RetractionType == FeedType.None)
            {
                return;
            }
            var feedGroup = CalcUtils.CalcFeedGroup(toolpathCurve, direction == -1, outsideSign, par.RetractionType, par.RetractionRadius, par.RetractionAngle, par.RetractionLength);

            Machine.RetractMove(feedGroup.Arc, par.GreatSpeed);
            if (Settings.WithCompensation)
            {
                Machine.SetCompensation(CompensationSide.None);
            }
            Machine.RetractMove(feedGroup.Line, par.GreatSpeed);
        }
예제 #3
0
파일: Machine.cs 프로젝트: presscad/KreaCAM
 /// <summary>
 /// Подъем инструмента
 /// </summary>
 private void DepartureMove()
 {
     if (_position.Z >= Settings.SafetyZ)
     {
         return;
     }
     ChangePosition(ActionType.DepartureMove, "G1", z: Settings.SafetyZ, speed: ProcessingParams.GetDefault().GreatSpeed);
     SetCompensation(CompensationSide.None);
     CreateProcessAction(ActionType.DepartureMove, "G0", z: Settings.SafetyZ);
 }
예제 #4
0
        private static void Feed(Curve toolpathCurve, int direction, int outsideSign, ProcessingParams par, bool isFirstPass)
        {
            var feedGroup = CalcUtils.CalcFeedGroup(toolpathCurve, direction == 1, outsideSign, par.FeedType, par.FeedRadius, par.FeedAngle, par.FeedLength);

            if (isFirstPass)
            {
                Machine.SetPosition(feedGroup.Point, par.GreatSpeed);
            }
            else
            {
                Machine.Move(feedGroup.Point, par.GreatSpeed);
            }

            if (Settings.WithCompensation)
            {
                Machine.SetCompensation(direction * outsideSign == 1 ? CompensationSide.Left : CompensationSide.Right);
            }

            Machine.EngageMove(feedGroup.Line, par.SmallSpeed);
            Machine.EngageMove(feedGroup.Arc, par.SmallSpeed);

            Machine.SetSpeed(par.GreatSpeed);
        }
예제 #5
0
 public void Terminate()
 {
     SettingForm.RefreshSettings();
     ProcessingParams.SaveDefault();
     Settings.Save();
 }