Example #1
0
 //slicing common boilerplate
 private void sliceAddslices_Click(object sender, EventArgs e)
 {
     if (useMultislicing.Checked)
     {
         services.multislice(configFileTextBox.Text, sliceGetOnlyToolpaths.Checked, paramTextBox.Text.Trim(), stlFileTextBox.Text);
     }
     else
     {
         double zstep = 0;
         if (!Double.TryParse(sliceStepTextBox.Text, out zstep))
         {
             throw new ApplicationException("Invalid Z step value: " + sliceStepTextBox.Text);
         }
         services.externalSlice(configFileTextBox.Text, zstep, stlFileTextBox.Text);
     }
 }
Example #2
0
 public Object multislice(ResultBuffer rb)
 {
     return(lispAction(rb, 1, (MultiSlicerServices services, string configname, string stlfile, TypedValue[] tvarr) => {
         Object ret = null;
         if (tvarr.Length < 1)
         {
             return ret;
         }
         TypedValue param1 = tvarr[0];
         if (param1.TypeCode != (int)LispDataType.Text)
         {
             return ret;
         }
         string arguments = param1.Value as string;
         services.multislice(configname, false, arguments, stlfile);
         return ret;
     }));
 }