kopia lustrzana https://github.com/evil-mad/EggBot
Merge branch 'master' of https://github.com/evil-mad/EggBot
commit
98050b9b2a
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
|
||||
<_name>EggBot Control</_name>
|
||||
<id>command.evilmadscientist.eggbot.rev275b1</id>
|
||||
<id>command.evilmadscientist.eggbot.rev280b1</id>
|
||||
<dependency type="extension">org.inkscape.output.svg.inkscape</dependency>
|
||||
<dependency type="executable" location="extensions">eggbot.py</dependency>
|
||||
<dependency type="executable" location="extensions">inkex.py</dependency>
|
||||
|
@ -119,6 +119,7 @@ check the circuit board (EBB) firmware version.
|
|||
<_option value="enable-engraver" >Engraver On</_option>
|
||||
<_option value="disable-engraver" >Engraver Off</_option>
|
||||
<_option value="version-check" >Check EBB Version</_option>
|
||||
<_option value="strip-data" >Strip plotter data from file</_option>
|
||||
</param>
|
||||
|
||||
<param name="WalkDistance" type="int" min="-32000" max="32000"
|
||||
|
@ -173,7 +174,7 @@ selected number, which can be up to 100.
|
|||
<_param name="instructions_general" type="description"
|
||||
xml:space="preserve">
|
||||
EggBot Control Inkscape extension
|
||||
Release 2.7.6, dated 2016-06-19
|
||||
Release 2.8.0, dated 2016-08-07
|
||||
|
||||
*EBB Firmware 1.96 or newer required for certain
|
||||
functions.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Part of the Eggbot driver for Inkscape
|
||||
# https://github.com/evil-mad/EggBot
|
||||
#
|
||||
# Version 2.7.7, dated July 6, 2016.
|
||||
# Version 2.8.0, dated August 7, 2016.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -223,8 +223,19 @@ class EggBot( inkex.Effect ):
|
|||
|
||||
elif self.options.tab == '"setup"':
|
||||
self.setupCommand()
|
||||
|
||||
elif self.options.tab == '"manual"':
|
||||
self.manualCommand()
|
||||
if self.options.manualType == "strip-data":
|
||||
for node in self.svg.xpath( '//svg:WCB', namespaces=inkex.NSS ):
|
||||
self.svg.remove( node )
|
||||
for node in self.svg.xpath( '//svg:eggbot', namespaces=inkex.NSS ):
|
||||
self.svg.remove( node )
|
||||
inkex.errormsg( gettext.gettext( "I've removed all EggBot data from this SVG file. Have a great day!" ) )
|
||||
return
|
||||
else:
|
||||
self.manualCommand()
|
||||
|
||||
|
||||
|
||||
if self.serialPort is not None:
|
||||
ebb_motion.doTimedPause(self.serialPort, 10) #Pause a moment for underway commands to finish...
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
|
||||
<_name>Strip Eggbot Data</_name>
|
||||
<id>command.evilmadscience.eggbot_stripdata1.eggbot</id>
|
||||
<dependency type="extension">org.inkscape.output.svg.inkscape</dependency>
|
||||
<dependency type="executable" location="extensions">eggbot_stripdata.py</dependency>
|
||||
<dependency type="executable" location="extensions">inkex.py</dependency>
|
||||
<effect needs-live-preview="false" needs-document="no">
|
||||
<object-type>all</object-type>
|
||||
<effects-menu>
|
||||
<submenu _name="EggBot"/>
|
||||
</effects-menu>
|
||||
</effect>
|
||||
<script>
|
||||
<command reldir="extensions" interpreter="python">eggbot_stripdata.py</command>
|
||||
</script>
|
||||
</inkscape-extension>
|
|
@ -1,30 +0,0 @@
|
|||
# This program 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 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
import gettext
|
||||
import inkex
|
||||
|
||||
class EggBotStripData( inkex.Effect ):
|
||||
def __init__( self ):
|
||||
inkex.Effect.__init__( self )
|
||||
|
||||
def effect( self ):
|
||||
'''Main entry point: check to see which tab is selected, and act accordingly.'''
|
||||
self.svg = self.document.getroot()
|
||||
for node in self.svg.xpath( '//svg:eggbot', namespaces=inkex.NSS ):
|
||||
self.svg.remove( node )
|
||||
inkex.errormsg( gettext.gettext( "Okay, I've removed all Eggbot data from this Inkscape file. Have a nice day!" ) )
|
||||
|
||||
e = EggBotStripData()
|
||||
e.affect()
|
Ładowanie…
Reference in New Issue