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
94c91a96
Commit
94c91a96
authored
Mar 22, 2015
by
leonmuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug for exporting groups of vectors that were not detected in an inkscape layer
parent
40d201ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
17 deletions
+35
-17
turnkeylaser.py
turnkeylaser.py
+35
-17
No files found.
turnkeylaser.py
View file @
94c91a96
...
...
@@ -1050,25 +1050,43 @@ class Gcode_tools(inkex.Effect):
# Use the identity transform (eg no transform) for the root objects
trans
=
simpletransform
.
parseTransform
(
""
)
for
node
in
selected
:
pathList
+=
compile_paths
(
node
,
trans
)
if
(
pathList
):
curve
=
self
.
parse_curve
(
pathList
)
if
(
self
.
options
.
drawCurves
):
self
.
draw_curve
(
curve
)
try
:
pathList
.
append
(
compile_paths
(
node
,
trans
)
.
copy
())
except
:
for
objectData
in
compile_paths
(
node
,
trans
):
pathList
.
append
(
objectData
)
gcode
+=
"
\n
;(*** Root objects ***)
\n
"
#Fetch the laser power from the export dialog box.
laserPower
=
self
.
options
.
laser
#Switch between smoothie power levels and ramps+marlin power levels
#ramps and marlin expect 0 to 100 while smoothie wants 0.0 to 1.0
if
(
self
.
options
.
mainboard
==
'smoothie'
):
laserPower
=
float
(
laserPower
)
/
100
gcode
+=
self
.
generate_gcode
(
curve
,
0
,
laserPower
)
if
(
pathList
):
for
objectData
in
pathList
:
curve
=
self
.
parse_curve
(
objectData
)
#Determind the power of the laser that this layer should be cut at.
#If the layer is not named as an integer value then default to the laser intensity set at the export settings.
#Fetch the laser power from the export dialog box.
laserPower
=
self
.
options
.
laser
if
(
int
(
layerName
)
>
0
and
int
(
layerName
)
<=
100
):
laserPower
=
int
(
layerName
)
else
:
laserPower
=
self
.
options
.
laser
#Switch between smoothie power levels and ramps+marlin power levels
#ramps and marlin expect 0 to 100 while smoothie wants 0.0 to 1.0
if
(
self
.
options
.
mainboard
==
'smoothie'
):
laserPower
=
float
(
laserPower
)
/
100
#Generate the GCode for this layer
if
(
curve
[
'type'
]
==
"vector"
):
#Should the curves be drawn in inkscape?
if
(
self
.
options
.
drawCurves
):
self
.
draw_curve
(
curve
)
gcode
+=
self
.
generate_gcode
(
curve
,
0
,
laserPower
,
altfeed
=
altfeed
,
altppm
=
altppm
)
elif
(
curve
[
'type'
]
==
"raster"
):
gcode
+=
self
.
generate_raster_gcode
(
curve
,
laserPower
,
altfeed
=
altfeed
)
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