Exemplo n.º 1
0
        public void GCSET()
        {
            Settings settings = new Settings(config);

            settings.ShowDialog();
            if (settings.Modify)
            {
                config = settings.config;
            }
            GCodeConfig.Save(config);
        }
Exemplo n.º 2
0
 internal static void Save(GCodeConfig config)
 {
     Properties.Settings.Default.machineIndex        = Constants.Machines.IndexOf(config.Machine);
     Properties.Settings.Default.decimals            = config.Formatter.Decimals;
     Properties.Settings.Default.tolerance           = config.Tolerance;
     Properties.Settings.Default.additionalArguments = "";
     foreach (string s in config.AdditionalArguments)
     {
         Properties.Settings.Default.additionalArguments += s + " ";
     }
     Properties.Settings.Default.additionalArguments = Properties.Settings.Default.additionalArguments.Trim();
     Properties.Settings.Default.Save();
 }
Exemplo n.º 3
0
        public static ObjectIdCollection SelectAroundPoint(Point3d point, GCodeConfig config)
        {
            Init(out Editor editor);
            try
            {
                Point3d p1 = new Point3d(point.X - config.Tolerance, point.Y - config.Tolerance, 0.0);
                Point3d p2 = new Point3d(point.X + config.Tolerance, point.Y + config.Tolerance, 0.0);


                PromptSelectionResult result = editor.SelectCrossingWindow(p1, p2, new SelectionFilter(config.Filter));
                if (result.Value != null)
                {
                    return(new ObjectIdCollection(result.Value.GetObjectIds()));
                }
            }
            catch (NullReferenceException) { }
            return(new ObjectIdCollection());
        }
Exemplo n.º 4
0
 public Settings(GCodeConfig startConfig)
 {
     config = startConfig;
     InitializeComponent();
 }