diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-01-18 23:37:04 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Cenoz <jtx@jtx.marker.es> | 2013-01-18 23:37:04 +0000 |
| commit | 686ddfefd34634a2d3ccacee4c5d243bbe47629f (patch) | |
| tree | ec9fd88a0acc73cfadb5668becdc2dba7b98e50d /share | |
| parent | Delete bspline node whith node tool and fix 1 segment continue shift error (diff) | |
| parent | Some Corrections (diff) | |
| download | inkscape-686ddfefd34634a2d3ccacee4c5d243bbe47629f.tar.gz inkscape-686ddfefd34634a2d3ccacee4c5d243bbe47629f.zip | |
Merge from branch
(bzr r11950.1.18)
Diffstat (limited to 'share')
| -rwxr-xr-x | share/extensions/dxf_outlines.py | 7 | ||||
| -rw-r--r-- | share/extensions/gcodetools_about.inx | 2 | ||||
| -rw-r--r-- | share/extensions/gcodetools_area.inx | 2 | ||||
| -rw-r--r-- | share/extensions/gcodetools_check_for_updates.inx | 2 | ||||
| -rw-r--r-- | share/extensions/gcodetools_dxf_points.inx | 2 | ||||
| -rw-r--r-- | share/extensions/gcodetools_engraving.inx | 2 | ||||
| -rw-r--r-- | share/extensions/gcodetools_graffiti.inx | 2 | ||||
| -rw-r--r-- | share/extensions/gcodetools_lathe.inx | 2 | ||||
| -rw-r--r-- | share/extensions/gcodetools_orientation_points.inx | 2 | ||||
| -rw-r--r-- | share/extensions/gcodetools_path_to_gcode.inx | 2 | ||||
| -rw-r--r-- | share/extensions/gcodetools_prepare_path_for_plasma.inx | 2 | ||||
| -rw-r--r-- | share/extensions/gcodetools_tools_library.inx | 2 | ||||
| -rwxr-xr-x | share/extensions/uniconv-ext.py | 15 | ||||
| -rw-r--r-- | share/extensions/webslicer_export.inx | 2 |
14 files changed, 26 insertions, 20 deletions
diff --git a/share/extensions/dxf_outlines.py b/share/extensions/dxf_outlines.py index fd01e83e9..57f4e4198 100755 --- a/share/extensions/dxf_outlines.py +++ b/share/extensions/dxf_outlines.py @@ -108,12 +108,13 @@ class MyEffect(inkex.Effect): self.poly = [csp[0]] # initiallize new polyline self.color_LWPOLY = self.color self.layer_LWPOLY = self.layer + self.closed_LWPOLY = self.closed self.poly.append(csp[1]) def LWPOLY_output(self): if len(self.poly) == 1: return self.handle += 1 - self.dxf_add(" 0\nLWPOLYLINE\n 5\n%x\n100\nAcDbEntity\n 8\n%s\n 62\n%d\n100\nAcDbPolyline\n 90\n%d\n 70\n0\n" % (self.handle, self.layer_LWPOLY, self.color_LWPOLY, len(self.poly))) + self.dxf_add(" 0\nLWPOLYLINE\n 5\n%x\n100\nAcDbEntity\n 8\n%s\n 62\n%d\n100\nAcDbPolyline\n 90\n%d\n 70\n%d\n" % (self.handle, self.layer_LWPOLY, self.color_LWPOLY, len(self.poly), self.closed_LWPOLY)) for i in range(len(self.poly)): self.dxf_add(" 10\n%f\n 20\n%f\n 30\n0.0\n" % (self.poly[i][0],self.poly[i][1])) def dxf_spline(self,csp): @@ -189,6 +190,7 @@ class MyEffect(inkex.Effect): if style['stroke'] and style['stroke'] != 'none' and style['stroke'][0:3] != 'url': rgb = simplestyle.parseColor(style['stroke']) hsl = coloreffect.ColorEffect.rgb_to_hsl(coloreffect.ColorEffect(),rgb[0]/255.0,rgb[1]/255.0,rgb[2]/255.0) + self.closed = 0 # only for LWPOLYLINE self.color = 7 # default is black if hsl[2]: self.color = 1 + (int(6*hsl[0] + 0.5) % 6) # use 6 hues @@ -196,8 +198,11 @@ class MyEffect(inkex.Effect): d = node.get('d') if not d: return + if (d[-1] == 'z' or d[-1] == 'Z'): + self.closed = 1 p = cubicsuperpath.parsePath(d) elif node.tag == inkex.addNS('rect','svg'): + self.closed = 1 x = float(node.get('x')) y = float(node.get('y')) width = float(node.get('width')) diff --git a/share/extensions/gcodetools_about.inx b/share/extensions/gcodetools_about.inx index b6c0fcde2..c1016477d 100644 --- a/share/extensions/gcodetools_about.inx +++ b/share/extensions/gcodetools_about.inx @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> - <name>About</name> + <_name>About</_name> <id>ru.cnc-club.filter.gcodetools_about_no_options_no_preferences</id> <dependency type="executable" location="extensions">gcodetools.py</dependency> <dependency type="executable" location="extensions">inkex.py</dependency> diff --git a/share/extensions/gcodetools_area.inx b/share/extensions/gcodetools_area.inx index 30ed362cd..ad27ecee4 100644 --- a/share/extensions/gcodetools_area.inx +++ b/share/extensions/gcodetools_area.inx @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> - <name>Area</name> + <_name>Area</_name> <id>ru.cnc-club.filter.gcodetools_area_area_fill_area_artefacts_ptg</id> <dependency type="executable" location="extensions">gcodetools.py</dependency> <dependency type="executable" location="extensions">inkex.py</dependency> diff --git a/share/extensions/gcodetools_check_for_updates.inx b/share/extensions/gcodetools_check_for_updates.inx index ef0313ecf..6eaa098a5 100644 --- a/share/extensions/gcodetools_check_for_updates.inx +++ b/share/extensions/gcodetools_check_for_updates.inx @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> - <name>Check for updates</name> + <_name>Check for updates</_name> <id>ru.cnc-club.filter.gcodetools_update_no_options_no_preferences</id> <dependency type="executable" location="extensions">gcodetools.py</dependency> <dependency type="executable" location="extensions">inkex.py</dependency> diff --git a/share/extensions/gcodetools_dxf_points.inx b/share/extensions/gcodetools_dxf_points.inx index cccd64497..e4534e8af 100644 --- a/share/extensions/gcodetools_dxf_points.inx +++ b/share/extensions/gcodetools_dxf_points.inx @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> - <name>DXF Points</name> + <_name>DXF Points</_name> <id>ru.cnc-club.filter.gcodetools_dxfpoints_no_options</id> <dependency type="executable" location="extensions">gcodetools.py</dependency> <dependency type="executable" location="extensions">inkex.py</dependency> diff --git a/share/extensions/gcodetools_engraving.inx b/share/extensions/gcodetools_engraving.inx index e278f64bc..6885f32fd 100644 --- a/share/extensions/gcodetools_engraving.inx +++ b/share/extensions/gcodetools_engraving.inx @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> - <name>Engraving</name> + <_name>Engraving</_name> <id>ru.cnc-club.filter.gcodetools_engraving</id> <dependency type="executable" location="extensions">gcodetools.py</dependency> <dependency type="executable" location="extensions">inkex.py</dependency> diff --git a/share/extensions/gcodetools_graffiti.inx b/share/extensions/gcodetools_graffiti.inx index 73235ee16..7253b8fa4 100644 --- a/share/extensions/gcodetools_graffiti.inx +++ b/share/extensions/gcodetools_graffiti.inx @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> - <name>Graffiti</name> + <_name>Graffiti</_name> <id>ru.cnc-club.filter.gcodetools_graffiti_orientation</id> <dependency type="executable" location="extensions">gcodetools.py</dependency> <dependency type="executable" location="extensions">inkex.py</dependency> diff --git a/share/extensions/gcodetools_lathe.inx b/share/extensions/gcodetools_lathe.inx index 641a4f065..d3c6916fd 100644 --- a/share/extensions/gcodetools_lathe.inx +++ b/share/extensions/gcodetools_lathe.inx @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> - <name>Lathe</name> + <_name>Lathe</_name> <id>ru.cnc-club.filter.gcodetools_lathe_lathe_modify_path_ptg</id> <dependency type="executable" location="extensions">gcodetools.py</dependency> <dependency type="executable" location="extensions">inkex.py</dependency> diff --git a/share/extensions/gcodetools_orientation_points.inx b/share/extensions/gcodetools_orientation_points.inx index 3de8ba594..604369881 100644 --- a/share/extensions/gcodetools_orientation_points.inx +++ b/share/extensions/gcodetools_orientation_points.inx @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> - <name>Orientation points</name> + <_name>Orientation points</_name> <id>ru.cnc-club.filter.gcodetools_orientation_no_options_no_preferences</id> <dependency type="executable" location="extensions">gcodetools.py</dependency> <dependency type="executable" location="extensions">inkex.py</dependency> diff --git a/share/extensions/gcodetools_path_to_gcode.inx b/share/extensions/gcodetools_path_to_gcode.inx index b610c490b..8a79d6aae 100644 --- a/share/extensions/gcodetools_path_to_gcode.inx +++ b/share/extensions/gcodetools_path_to_gcode.inx @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> - <name>Path to Gcode</name> + <_name>Path to Gcode</_name> <id>ru.cnc-club.filter.gcodetools_ptg</id> <dependency type="executable" location="extensions">gcodetools.py</dependency> <dependency type="executable" location="extensions">inkex.py</dependency> diff --git a/share/extensions/gcodetools_prepare_path_for_plasma.inx b/share/extensions/gcodetools_prepare_path_for_plasma.inx index c3e46c8ac..ab054714e 100644 --- a/share/extensions/gcodetools_prepare_path_for_plasma.inx +++ b/share/extensions/gcodetools_prepare_path_for_plasma.inx @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> - <name>Prepare path for plasma</name> + <_name>Prepare path for plasma</_name> <id>ru.cnc-club.filter.gcodetools_plasma-prepare-path_no_options_no_preferences</id> <dependency type="executable" location="extensions">gcodetools.py</dependency> <dependency type="executable" location="extensions">inkex.py</dependency> diff --git a/share/extensions/gcodetools_tools_library.inx b/share/extensions/gcodetools_tools_library.inx index aefd4b896..e7be0d996 100644 --- a/share/extensions/gcodetools_tools_library.inx +++ b/share/extensions/gcodetools_tools_library.inx @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> - <name>Tools library</name> + <_name>Tools library</_name> <id>ru.cnc-club.filter.gcodetools_tools_library_no_options_no_preferences</id> <dependency type="executable" location="extensions">gcodetools.py</dependency> <dependency type="executable" location="extensions">inkex.py</dependency> diff --git a/share/extensions/uniconv-ext.py b/share/extensions/uniconv-ext.py index 5608000c4..f4c80b5d6 100755 --- a/share/extensions/uniconv-ext.py +++ b/share/extensions/uniconv-ext.py @@ -22,6 +22,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA """ # standard library import sys +# local library +from run_command import run +import inkex + +inkex.localize() + +cmd = None + try: from subprocess import Popen, PIPE p = Popen('uniconvertor', shell=True, stdout=PIPE, stderr=PIPE).wait() @@ -37,13 +45,6 @@ except ImportError: if p!=32512 : cmd = 'uniconv' p = Popen3('uniconvertor', True).wait() if p!=32512 : cmd = 'uniconvertor' -# local library -from run_command import run -import inkex - -cmd = None - -inkex.localize() if cmd == None: # there's no succeffully-returning uniconv command; try to get the module directly (on Windows) diff --git a/share/extensions/webslicer_export.inx b/share/extensions/webslicer_export.inx index f82e42f33..f20f66637 100644 --- a/share/extensions/webslicer_export.inx +++ b/share/extensions/webslicer_export.inx @@ -12,7 +12,7 @@ <param name="with-code" type="boolean" _gui-text="With HTML and CSS">true</param> </page> <page name="Help" _gui-text="Help"> - <_param name="about" type="description">All sliced images, and optionaly code, will be generated as you had configured and saved to one directory.</_param> + <_param name="about" type="description">All sliced images, and optionally - code, will be generated as you had configured and saved to one directory.</_param> </page> </param> <effect needs-live-preview="false"> |
