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
1921d2ab
Commit
1921d2ab
authored
Jul 01, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Group gcodes which are closer than 0.01mm in Z
This is aimed at Slic3r's spiral vase mode which continuously lifts Z.
parent
727f9f0a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
gcoder.py
printrun/gcoder.py
+6
-2
No files found.
printrun/gcoder.py
View file @
1921d2ab
...
...
@@ -270,10 +270,14 @@ class GCode(object):
cur_z
=
line
.
z
if
cur_z
!=
prev_z
:
if
prev_z
is
not
None
:
base_z
=
(
prev_z
-
(
prev_z
%
0.1
))
if
abs
(
cur_z
-
prev_z
)
<
0.01
else
prev_z
else
:
base_z
=
None
all_layers
.
append
(
Layer
(
cur_lines
))
old_lines
=
layers
.
get
(
prev
_z
,
[])
old_lines
=
layers
.
get
(
base
_z
,
[])
old_lines
+=
cur_lines
layers
[
prev
_z
]
=
old_lines
layers
[
base
_z
]
=
old_lines
cur_lines
=
[]
layer_id
+=
1
layer_line
=
0
...
...
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