Exemplo n.º 1
0
        /// <summary>
        /// Convert STL in GCode and load into editor
        /// </summary>
        /// <param name="file"></param>
        public void RunSlice(string file)
        {
            switch (_ActiveSlicer)
            {
            case SlicerID.Slic3r:
                Main.slic3r.RunSlice(file, Main.printerSettings.PrintAreaWidth / 2, Main.printerSettings.PrintAreaDepth / 2);
                break;

            case SlicerID.Skeinforge:
                skein.RunSlice(file);
                break;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Convert STL in GCode and load into editor
        /// </summary>
        /// <param name="stlFile"></param>
        public void RunSlice(string stlFile)
        {
            switch (_ActiveSlicer)
            {
            case SlicerID.Slic3r:
                Main.slic3r.RunSliceNew(stlFile, Main.printerSettings.PrintAreaWidth / 2, Main.printerSettings.PrintAreaDepth / 2);
                break;

            /*case SlicerID.Slic3rExternal:
             *  Main.slic3r.RunSliceExternal(file, Main.printerSettings.PrintAreaWidth / 2, Main.printerSettings.PrintAreaDepth / 2);
             *  break;*/
            case SlicerID.Skeinforge:
                skein.RunSlice(stlFile, Main.printerModel.SkeinforgeProfile);
                break;
            }
        }
Exemplo n.º 3
0
 private void toolGCodeLoad_Click(object sender, EventArgs e)
 {
     if (openGCode.ShowDialog() == DialogResult.OK)
     {
         FileInfo f = new FileInfo(openGCode.FileName);
         Title = f.Name;
         if (openGCode.FileName.EndsWith(".stl"))
         {
             skeinforge.RunSlice(openGCode.FileName); // Slice it and load
         }
         else
         {
             textGCode.Text = System.IO.File.ReadAllText(openGCode.FileName);
             tab.SelectTab(tabGCode);
             tabGCodes.SelectedTab = tabPageGCode;
         }
     }
 }