Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
laser-gcode-exporter-inkscape-plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
laser-gcode-exporter-inkscape-plugin
Commits
804a9bf4
Commit
804a9bf4
authored
May 17, 2016
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a little bug
parent
88cb9879
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
turnkeylaser.py
turnkeylaser.py
+9
-5
No files found.
turnkeylaser.py
View file @
804a9bf4
...
...
@@ -420,8 +420,12 @@ def parse_layer_name(txt):
(
field
,
value
)
=
arg
.
split
(
"="
)
except
:
raise
ValueError
(
"Invalid argument in layer '
%
s'"
%
layerName
)
if
(
field
==
"feed"
or
field
==
"ppm"
or
field
=
"dither"
):
if
(
field
==
"feed"
or
field
==
"ppm"
or
field
==
"dither"
):
try
:
if
field
==
"dither"
:
if
value
==
'true'
:
value
=
True
else
:
value
=
float
(
value
)
except
:
raise
ValueError
(
"Invalid layer name '
%
s'"
%
value
)
...
...
@@ -631,7 +635,7 @@ class Gcode_tools(inkex.Effect):
return
" "
.
join
(
args
)
def
generate_raster_gcode
(
self
,
curve
,
laserPower
,
altfeed
=
None
):
def
generate_raster_gcode
(
self
,
curve
,
laserPower
,
altfeed
=
None
,
altdither
=
False
):
gcode
=
''
#Setup our feed rate, either from the layer name or from the default value.
...
...
@@ -1279,7 +1283,7 @@ class Gcode_tools(inkex.Effect):
gcode
+=
header_data
+
self
.
generate_gcode
(
curve
,
0
,
laserPower
,
altfeed
=
altfeed
,
altppm
=
altppm
)
elif
(
curve
[
'type'
]
==
"raster"
):
gcode_raster
+=
header_data
+
self
.
generate_raster_gcode
(
curve
,
laserPower
,
altfeed
=
altfeed
)
gcode_raster
+=
header_data
+
self
.
generate_raster_gcode
(
curve
,
laserPower
,
altfeed
=
altfeed
,
altdither
=
altdither
)
#Turnkey - Need to figure out why inkscape sometimes gets to this point and hasn't found the objects above.
...
...
@@ -1354,7 +1358,7 @@ class Gcode_tools(inkex.Effect):
gcode
+=
header_data
+
self
.
generate_gcode
(
curve
,
0
,
laserPower
,
altfeed
=
altfeed
,
altppm
=
altppm
)
elif
(
curve
[
'type'
]
==
"raster"
):
gcode_raster
+=
header_data
+
self
.
generate_raster_gcode
(
curve
,
laserPower
,
altfeed
=
altfeed
)
gcode_raster
+=
header_data
+
self
.
generate_raster_gcode
(
curve
,
laserPower
,
altfeed
=
altfeed
,
altdither
=
altdither
)
if
self
.
options
.
homeafter
:
gcode
+=
"
\n\n
G00 X0 Y0 F4000 ; home"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment