-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
matthias.pueski@sick.de
committed
Dec 16, 2020
1 parent
edad433
commit 005d6bd
Showing
17 changed files
with
173 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| #Build Number for ANT. Do not edit! | ||
| #Fri Jul 31 15:01:36 CEST 2015 | ||
| build.number=0 | ||
| #Sun Sep 29 10:28:42 CEST 2019 | ||
| build.number=2 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| package org.pmedv.blackboard.commands; | ||
|
|
||
| import java.awt.event.ActionEvent; | ||
| import java.util.ArrayList; | ||
|
|
||
| import javax.swing.Action; | ||
|
|
||
| import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; | ||
| import org.fife.ui.rtextarea.RTextScrollPane; | ||
| import org.pmedv.blackboard.EditorUtils; | ||
| import org.pmedv.blackboard.components.BoardEditor; | ||
| import org.pmedv.blackboard.components.Item; | ||
| import org.pmedv.blackboard.components.Layer; | ||
| import org.pmedv.blackboard.components.Line; | ||
| import org.pmedv.core.commands.AbstractOpenEditorCommand; | ||
|
|
||
|
|
||
| import net.infonode.docking.View; | ||
|
|
||
| public class ExportGCodeCommand extends AbstractOpenEditorCommand{ | ||
|
|
||
| public ExportGCodeCommand() { | ||
| putValue(Action.NAME, resources.getResourceByKey("ExportGCodeCommand.name")); | ||
| putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("ExportGCodeCommand.description")); | ||
| } | ||
|
|
||
|
|
||
| @Override | ||
| public void execute(ActionEvent e) { | ||
| BoardEditor editor = EditorUtils.getCurrentActiveEditor(); | ||
|
|
||
| if (editor != null) { | ||
|
|
||
| StringBuffer data = new StringBuffer(); | ||
|
|
||
| RSyntaxTextArea textArea = new RSyntaxTextArea(); | ||
| textArea.getPopupMenu().addSeparator(); | ||
|
|
||
| ArrayList<Layer> layers = editor.getModel().getLayers(); | ||
|
|
||
| for (Layer layer : layers) { | ||
| ArrayList<Item> items = layer.getItems(); | ||
|
|
||
| for (Item item : items) { | ||
| if (item instanceof Line) { | ||
| Line line = (Line)item; | ||
| data.append("G01 X" + (float)(line.getStart().x / 16) + " Y" + (float)(line.getStart().y / 16) + " F100"); | ||
| data.append("\n"); | ||
| data.append("G01 X" + (float)(line.getEnd().x / 16)+ " Y" + (float)(line.getEnd().y / 16) +" F100"); | ||
| data.append("\n"); | ||
| } | ||
| } | ||
|
|
||
| } | ||
|
|
||
| textArea.setText(data.toString()); | ||
|
|
||
| RTextScrollPane textScrollPane = new RTextScrollPane(textArea); | ||
| View view = new View("GCode for "+editor.getCurrentFile().getName(),null,textScrollPane); | ||
| openEditor(view, editor.getCurrentFile().getName().hashCode()); | ||
|
|
||
| } | ||
|
|
||
|
|
||
| } | ||
|
|
||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,8 +65,4 @@ public void execute(ActionEvent e) { | |
|
|
||
| } | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| } | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters