mirror of
https://github.com/euphy/polargraphcontroller
synced 2025-01-09 19:55:16 +01:00
v1.2 Added g-code importing. And that weird cord offset thing
This commit is contained in:
parent
111a9b9478
commit
7aba28e403
@ -1,32 +1,32 @@
|
|||||||
/**
|
/**
|
||||||
Polargraph controller
|
Polargraph controller
|
||||||
Copyright Sandy Noble 2012.
|
Copyright Sandy Noble 2015.
|
||||||
|
|
||||||
This file is part of Polargraph Controller.
|
|
||||||
|
|
||||||
Polargraph Controller is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Polargraph Controller is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Polargraph Controller. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Requires the excellent ControlP5 GUI library available from http://www.sojamo.de/libraries/controlP5/.
|
|
||||||
Requires the excellent Geomerative library available from http://www.ricardmarxer.com/geomerative/.
|
|
||||||
|
|
||||||
This is an application for controlling a polargraph machine, communicating using ASCII command language over a serial link.
|
|
||||||
|
|
||||||
sandy.noble@gmail.com
|
|
||||||
http://www.polargraph.co.uk/
|
|
||||||
http://code.google.com/p/polargraph/
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
This file is part of Polargraph Controller.
|
||||||
|
|
||||||
|
Polargraph Controller is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Polargraph Controller is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with Polargraph Controller. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Requires the excellent ControlP5 GUI library available from http://www.sojamo.de/libraries/controlP5/.
|
||||||
|
Requires the excellent Geomerative library available from http://www.ricardmarxer.com/geomerative/.
|
||||||
|
|
||||||
|
This is an application for controlling a polargraph machine, communicating using ASCII command language over a serial link.
|
||||||
|
|
||||||
|
sandy.noble@gmail.com
|
||||||
|
http://www.polargraph.co.uk/
|
||||||
|
https://github.com/euphy/polargraphcontroller
|
||||||
|
|
||||||
|
*/
|
||||||
class DisplayMachine extends Machine
|
class DisplayMachine extends Machine
|
||||||
{
|
{
|
||||||
private Rectangle outline = null;
|
private Rectangle outline = null;
|
||||||
|
10
Machine.pde
10
Machine.pde
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
Polargraph controller
|
Polargraph controller
|
||||||
Copyright Sandy Noble 2012.
|
Copyright Sandy Noble 2015.
|
||||||
|
|
||||||
This file is part of Polargraph Controller.
|
This file is part of Polargraph Controller.
|
||||||
|
|
||||||
@ -24,12 +24,8 @@
|
|||||||
|
|
||||||
sandy.noble@gmail.com
|
sandy.noble@gmail.com
|
||||||
http://www.polargraph.co.uk/
|
http://www.polargraph.co.uk/
|
||||||
http://code.google.com/p/polargraph/
|
https://github.com/euphy/polargraphcontroller
|
||||||
*/
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
class Machine
|
class Machine
|
||||||
{
|
{
|
||||||
|
5
Misc.pde
5
Misc.pde
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
Polargraph controller
|
Polargraph controller
|
||||||
Copyright Sandy Noble 2012.
|
Copyright Sandy Noble 2015.
|
||||||
|
|
||||||
This file is part of Polargraph Controller.
|
This file is part of Polargraph Controller.
|
||||||
|
|
||||||
@ -24,7 +24,8 @@
|
|||||||
|
|
||||||
sandy.noble@gmail.com
|
sandy.noble@gmail.com
|
||||||
http://www.polargraph.co.uk/
|
http://www.polargraph.co.uk/
|
||||||
http://code.google.com/p/polargraph/
|
https://github.com/euphy/polargraphcontroller
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Scaler
|
class Scaler
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
Polargraph controller
|
Polargraph controller
|
||||||
Copyright Sandy Noble 2012.
|
Copyright Sandy Noble 2015.
|
||||||
|
|
||||||
This file is part of Polargraph Controller.
|
This file is part of Polargraph Controller.
|
||||||
|
|
||||||
@ -24,7 +24,8 @@
|
|||||||
|
|
||||||
sandy.noble@gmail.com
|
sandy.noble@gmail.com
|
||||||
http://www.polargraph.co.uk/
|
http://www.polargraph.co.uk/
|
||||||
http://code.google.com/p/polargraph/
|
https://github.com/euphy/polargraphcontroller
|
||||||
|
|
||||||
*/
|
*/
|
||||||
class Panel
|
class Panel
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
Polargraph controller
|
Polargraph controller
|
||||||
Copyright Sandy Noble 2012.
|
Copyright Sandy Noble 2015.
|
||||||
|
|
||||||
This file is part of Polargraph Controller.
|
This file is part of Polargraph Controller.
|
||||||
|
|
||||||
@ -24,7 +24,8 @@
|
|||||||
|
|
||||||
sandy.noble@gmail.com
|
sandy.noble@gmail.com
|
||||||
http://www.polargraph.co.uk/
|
http://www.polargraph.co.uk/
|
||||||
http://code.google.com/p/polargraph/
|
https://github.com/euphy/polargraphcontroller
|
||||||
|
|
||||||
*/
|
*/
|
||||||
class Rectangle
|
class Rectangle
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
Polargraph controller
|
Polargraph controller
|
||||||
Copyright Sandy Noble 2012.
|
Copyright Sandy Noble 2015.
|
||||||
|
|
||||||
This file is part of Polargraph Controller.
|
This file is part of Polargraph Controller.
|
||||||
|
|
||||||
@ -24,9 +24,10 @@
|
|||||||
|
|
||||||
sandy.noble@gmail.com
|
sandy.noble@gmail.com
|
||||||
http://www.polargraph.co.uk/
|
http://www.polargraph.co.uk/
|
||||||
http://code.google.com/p/polargraph/
|
https://github.com/euphy/polargraphcontroller
|
||||||
|
|
||||||
*/
|
*/
|
||||||
void button_mode_begin()
|
void button_mode_begin()
|
||||||
{
|
{
|
||||||
button_mode_clearQueue();
|
button_mode_clearQueue();
|
||||||
}
|
}
|
||||||
@ -719,4 +720,10 @@ void button_mode_sendButtonDeactivate()
|
|||||||
addToCommandQueue(CMD_DEACTIVATE_MACHINE_BUTTON+",END");
|
addToCommandQueue(CMD_DEACTIVATE_MACHINE_BUTTON+",END");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void numberbox_mode_previewCordOffsetValue(int value)
|
||||||
|
{
|
||||||
|
previewCordOffset = value;
|
||||||
|
lastCommandQueueHash = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
Polargraph controller
|
Polargraph controller
|
||||||
Copyright Sandy Noble 2012.
|
Copyright Sandy Noble 2015.
|
||||||
|
|
||||||
This file is part of Polargraph Controller.
|
This file is part of Polargraph Controller.
|
||||||
|
|
||||||
@ -24,7 +24,8 @@
|
|||||||
|
|
||||||
sandy.noble@gmail.com
|
sandy.noble@gmail.com
|
||||||
http://www.polargraph.co.uk/
|
http://www.polargraph.co.uk/
|
||||||
http://code.google.com/p/polargraph/
|
https://github.com/euphy/polargraphcontroller
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,31 +1,33 @@
|
|||||||
/**
|
/**
|
||||||
Polargraph controller
|
Polargraph controller
|
||||||
Copyright Sandy Noble 2012.
|
Copyright Sandy Noble 2015.
|
||||||
|
|
||||||
This file is part of Polargraph Controller.
|
This file is part of Polargraph Controller.
|
||||||
|
|
||||||
Polargraph Controller is free software: you can redistribute it and/or modify
|
Polargraph Controller is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
Polargraph Controller is distributed in the hope that it will be useful,
|
Polargraph Controller is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Polargraph Controller. If not, see <http://www.gnu.org/licenses/>.
|
along with Polargraph Controller. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Requires the excellent ControlP5 GUI library available from http://www.sojamo.de/libraries/controlP5/.
|
Requires the excellent ControlP5 GUI library available from http://www.sojamo.de/libraries/controlP5/.
|
||||||
Requires the excellent Geomerative library available from http://www.ricardmarxer.com/geomerative/.
|
Requires the excellent Geomerative library available from http://www.ricardmarxer.com/geomerative/.
|
||||||
|
|
||||||
This is an application for controlling a polargraph machine, communicating using ASCII command language over a serial link.
|
This is an application for controlling a polargraph machine, communicating using ASCII command language over a serial link.
|
||||||
|
|
||||||
sandy.noble@gmail.com
|
sandy.noble@gmail.com
|
||||||
http://www.polargraph.co.uk/
|
http://www.polargraph.co.uk/
|
||||||
http://code.google.com/p/polargraph/
|
https://github.com/euphy/polargraphcontroller
|
||||||
*/
|
|
||||||
|
*/
|
||||||
|
|
||||||
Set<String> getPanelNames()
|
Set<String> getPanelNames()
|
||||||
{
|
{
|
||||||
if (this.panelNames == null)
|
if (this.panelNames == null)
|
||||||
@ -500,6 +502,12 @@ Map<String, Controller> initialiseNumberboxValues(Map<String, Controller> map)
|
|||||||
n.setMax(PATH_LENGTH_HIGHPASS_CUTOFF_MAX);
|
n.setMax(PATH_LENGTH_HIGHPASS_CUTOFF_MAX);
|
||||||
n.setMultiplier(0.5);
|
n.setMultiplier(0.5);
|
||||||
}
|
}
|
||||||
|
else if (MODE_ADJUST_PREVIEW_CORD_OFFSET.equals(key))
|
||||||
|
{
|
||||||
|
n.setDecimalPrecision(1);
|
||||||
|
n.setValue(0);
|
||||||
|
n.setMultiplier(0.5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
@ -688,6 +696,8 @@ List<String> getControlNamesForInputPanel()
|
|||||||
controlNames.add(MODE_CHANGE_MIN_VECTOR_LINE_LENGTH);
|
controlNames.add(MODE_CHANGE_MIN_VECTOR_LINE_LENGTH);
|
||||||
//controlNames.add(MODE_VECTOR_PATH_LENGTH_HIGHPASS_CUTOFF);
|
//controlNames.add(MODE_VECTOR_PATH_LENGTH_HIGHPASS_CUTOFF);
|
||||||
controlNames.add(MODE_RENDER_VECTORS);
|
controlNames.add(MODE_RENDER_VECTORS);
|
||||||
|
|
||||||
|
controlNames.add(MODE_ADJUST_PREVIEW_CORD_OFFSET);
|
||||||
|
|
||||||
controlNames.add(MODE_SHOW_IMAGE);
|
controlNames.add(MODE_SHOW_IMAGE);
|
||||||
controlNames.add(MODE_SHOW_VECTOR);
|
controlNames.add(MODE_SHOW_VECTOR);
|
||||||
@ -784,7 +794,7 @@ List<String> getControlNamesForDetailPanel()
|
|||||||
|
|
||||||
controlNames.add(MODE_SEND_BUTTON_ACTIVATE);
|
controlNames.add(MODE_SEND_BUTTON_ACTIVATE);
|
||||||
controlNames.add(MODE_SEND_BUTTON_DEACTIVATE);
|
controlNames.add(MODE_SEND_BUTTON_DEACTIVATE);
|
||||||
|
|
||||||
controlNames.add(MODE_CHANGE_SERIAL_PORT);
|
controlNames.add(MODE_CHANGE_SERIAL_PORT);
|
||||||
|
|
||||||
return controlNames;
|
return controlNames;
|
||||||
@ -960,6 +970,8 @@ Map<String, String> buildControlLabels()
|
|||||||
result.put(MODE_SEND_BUTTON_ACTIVATE, "Activate button");
|
result.put(MODE_SEND_BUTTON_ACTIVATE, "Activate button");
|
||||||
result.put(MODE_SEND_BUTTON_DEACTIVATE, "Deactivate button");
|
result.put(MODE_SEND_BUTTON_DEACTIVATE, "Deactivate button");
|
||||||
|
|
||||||
|
result.put(MODE_ADJUST_PREVIEW_CORD_OFFSET, "Preview cord offset");
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1103,6 +1115,7 @@ Set<String> buildControlNames()
|
|||||||
result.add(MODE_SEND_BUTTON_ACTIVATE);
|
result.add(MODE_SEND_BUTTON_ACTIVATE);
|
||||||
result.add(MODE_SEND_BUTTON_DEACTIVATE);
|
result.add(MODE_SEND_BUTTON_DEACTIVATE);
|
||||||
|
|
||||||
|
result.add(MODE_ADJUST_PREVIEW_CORD_OFFSET);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
55
drawing.pde
55
drawing.pde
@ -1,31 +1,32 @@
|
|||||||
/**
|
/**
|
||||||
Polargraph controller
|
Polargraph controller
|
||||||
Copyright Sandy Noble 2012.
|
Copyright Sandy Noble 2015.
|
||||||
|
|
||||||
This file is part of Polargraph Controller.
|
This file is part of Polargraph Controller.
|
||||||
|
|
||||||
Polargraph Controller is free software: you can redistribute it and/or modify
|
Polargraph Controller is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
Polargraph Controller is distributed in the hope that it will be useful,
|
Polargraph Controller is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Polargraph Controller. If not, see <http://www.gnu.org/licenses/>.
|
along with Polargraph Controller. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Requires the excellent ControlP5 GUI library available from http://www.sojamo.de/libraries/controlP5/.
|
Requires the excellent ControlP5 GUI library available from http://www.sojamo.de/libraries/controlP5/.
|
||||||
Requires the excellent Geomerative library available from http://www.ricardmarxer.com/geomerative/.
|
Requires the excellent Geomerative library available from http://www.ricardmarxer.com/geomerative/.
|
||||||
|
|
||||||
This is an application for controlling a polargraph machine, communicating using ASCII command language over a serial link.
|
This is an application for controlling a polargraph machine, communicating using ASCII command language over a serial link.
|
||||||
|
|
||||||
sandy.noble@gmail.com
|
sandy.noble@gmail.com
|
||||||
http://www.polargraph.co.uk/
|
http://www.polargraph.co.uk/
|
||||||
http://code.google.com/p/polargraph/
|
https://github.com/euphy/polargraphcontroller
|
||||||
*/
|
|
||||||
|
*/
|
||||||
static final String CMD_CHANGELENGTH = "C01,";
|
static final String CMD_CHANGELENGTH = "C01,";
|
||||||
static final String CMD_CHANGEPENWIDTH = "C02,";
|
static final String CMD_CHANGEPENWIDTH = "C02,";
|
||||||
static final String CMD_CHANGEMOTORSPEED = "C03,";
|
static final String CMD_CHANGEMOTORSPEED = "C03,";
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
Polargraph controller
|
Polargraph controller
|
||||||
Copyright Sandy Noble 2012.
|
Copyright Sandy Noble 2015.
|
||||||
|
|
||||||
This file is part of Polargraph Controller.
|
This file is part of Polargraph Controller.
|
||||||
|
|
||||||
@ -24,7 +24,8 @@
|
|||||||
|
|
||||||
sandy.noble@gmail.com
|
sandy.noble@gmail.com
|
||||||
http://www.polargraph.co.uk/
|
http://www.polargraph.co.uk/
|
||||||
http://code.google.com/p/polargraph/
|
https://github.com/euphy/polargraphcontroller
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Set<Panel> getPanelsForTab(String tabName)
|
Set<Panel> getPanelsForTab(String tabName)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user