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
08b5ff49
Commit
08b5ff49
authored
Nov 07, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store & restore E status for each object
parent
e63bf3d6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
gcodeplater.py
gcodeplater.py
+3
-0
No files found.
gcodeplater.py
View file @
08b5ff49
...
...
@@ -96,6 +96,7 @@ class GcodePlater(Plater):
alllayers
+=
[(
layer
.
z
,
model_i
,
layer_i
)
for
(
layer_i
,
layer
)
in
enumerate
(
model
.
gcode
.
all_layers
)
if
layer
]
alllayers
.
sort
()
laste
=
[
0
]
*
len
(
models
)
with
open
(
name
,
"w"
)
as
f
:
analyzer
=
gcoder
.
GCode
(
None
,
get_home_pos
(
self
.
build_dimensions
))
analyzer
.
write
=
types
.
MethodType
(
lambda
self
,
line
:
gcoder_write
(
self
,
f
,
line
),
analyzer
)
...
...
@@ -119,11 +120,13 @@ class GcodePlater(Plater):
analyzer
.
write
(
"; GCodePlater: Model
%
d Layer
%
d at Z =
%
s
\n
"
%
(
model_i
,
layer_i
,
layer_z
))
analyzer
.
write
(
"G90
\n
"
)
analyzer
.
write
(
"G92 X
%.5
f Y
%.5
f Z
%.5
f
\n
"
%
trans_wpos
)
analyzer
.
write
(
"G92 E
%.5
f"
%
laste
[
model_i
])
for
l
in
layer
:
if
l
.
command
!=
"G28"
and
(
l
.
command
!=
"G92"
or
extrusion_only
(
l
)):
analyzer
.
write
(
l
.
raw
+
"
\n
"
)
# Find the current real position & E
last_real_position
=
analyzer
.
current_pos
laste
[
model_i
]
=
analyzer
.
current_e
print
_
(
"Exported merged G-Codes to
%
s"
)
%
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