public ArrayList<String> loadPrintJobSelection(String name) { ArrayList<String> list = new ArrayList(); PrintJobSelection job; job = db.getPrintJobSelection(name); list.add(job.getName()); list.add(job.getPrinterConfiguration()); MasterSubsectionPane pane = MainWindow.printJobPanel.getMasterSubsectionPane(); pane.removeAllSubsections(); for (SubsetSelection subset : job.getSubsetConfigurationList()) { pane.addNewSubsectionPanel(new SubsectionPanel(subset)); } for (ExtruderMaterialSelection extruder : job.getMaterials()) { PrintJobPanel.extruderMaterialArrayListForPrintJob.add(extruder.getMaterial()); } return list; }
public void startPrint(String name) throws BadFieldException, PreprocessorException, ProcessorException, PostProcessorException { PrintJobSelection job; job = db.getPrintJobSelection(name); PrintJobConfiguration printJob; printJob = db.getPrintJobConfiguration(job); Normalizer normalizer = new Slic3rNormalizerImpl(); SlicingEngineWrapper slicer = new Slic3rSlicingEngineWrapperImpl(); PostProcessor post = new Slic3rPostProcessorImpl(); normalizer.normalize(printJob); slicer.generateGCode(printJob); post.postprocess(printJob); StatusController statusController = new StatusController(printJob); statusController.display(); }