Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
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
Printrun
Commits
e63bf3d6
Commit
e63bf3d6
authored
Nov 07, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify last_real_position computation by using analyzer
parent
f21472c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
gcodeplater.py
gcodeplater.py
+2
-8
No files found.
gcodeplater.py
View file @
e63bf3d6
...
@@ -122,14 +122,8 @@ class GcodePlater(Plater):
...
@@ -122,14 +122,8 @@ class GcodePlater(Plater):
for
l
in
layer
:
for
l
in
layer
:
if
l
.
command
!=
"G28"
and
(
l
.
command
!=
"G92"
or
extrusion_only
(
l
)):
if
l
.
command
!=
"G28"
and
(
l
.
command
!=
"G92"
or
extrusion_only
(
l
)):
analyzer
.
write
(
l
.
raw
+
"
\n
"
)
analyzer
.
write
(
l
.
raw
+
"
\n
"
)
# Find the current real position
# Find the current real position & E
for
i
in
xrange
(
len
(
layer
)
-
1
,
-
1
,
-
1
):
last_real_position
=
analyzer
.
current_pos
gline
=
layer
[
i
]
if
gline
.
is_move
and
not
extrusion_only
(
gline
):
last_real_position
=
(
-
trans
[
0
]
+
gline
.
current_x
,
-
trans
[
1
]
+
gline
.
current_y
,
-
trans
[
2
]
+
gline
.
current_z
)
break
print
_
(
"Exported merged G-Codes to
%
s"
)
%
name
print
_
(
"Exported merged G-Codes to
%
s"
)
%
name
def
export_sequential
(
self
,
name
):
def
export_sequential
(
self
,
name
):
...
...
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