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