use of com.willwinder.universalgcodesender.gcode.processors.RotateProcessor in project Universal-G-Code-Sender by winder.
the class AbstractRotateAction method performAction.
@Override
protected void performAction(Node[] activatedNodes) {
if (!isEnabled()) {
return;
}
ThreadHelper.invokeLater(() -> {
try {
LoaderDialogHelper.showDialog("Rotating model", 1000);
File gcodeFile = backend.getProcessedGcodeFile();
Position center = getCenter(gcodeFile);
RotateProcessor rotateProcessor = new RotateProcessor(center, rotation);
backend.applyCommandProcessor(rotateProcessor);
} catch (Exception ex) {
GUIHelpers.displayErrorDialog(ex.getLocalizedMessage());
} finally {
LoaderDialogHelper.closeDialog();
}
});
}
Aggregations