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
a73bfc12
Commit
a73bfc12
authored
Oct 18, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanup in GCoder
parent
1877d2cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
gcoder.py
printrun/gcoder.py
+12
-12
No files found.
printrun/gcoder.py
View file @
a73bfc12
...
@@ -109,22 +109,22 @@ class Layer(list):
...
@@ -109,22 +109,22 @@ class Layer(list):
y
=
current_y
+
(
y
or
0
)
y
=
current_y
+
(
y
or
0
)
z
=
current_z
+
(
z
or
0
)
z
=
current_z
+
(
z
or
0
)
else
:
else
:
if
line
.
x
:
x
=
line
.
x
+
offset_x
if
x
is
not
None
:
x
=
x
+
offset_x
if
line
.
y
:
y
=
line
.
y
+
offset_y
if
y
is
not
None
:
y
=
y
+
offset_y
if
line
.
z
:
z
=
line
.
z
+
offset_z
if
z
is
not
None
:
z
=
z
+
offset_z
current_x
=
x
or
current_x
current_x
=
x
or
current_x
current_y
=
y
or
current_y
current_y
=
y
or
current_y
current_z
=
z
or
current_z
current_z
=
z
or
current_z
if
line
.
e
or
not
ignore_noe
:
if
line
.
e
or
not
ignore_noe
:
if
x
:
if
x
is
not
None
:
xmin
=
min
(
xmin
,
x
)
xmin
=
min
(
xmin
,
x
)
xmax
=
max
(
xmax
,
x
)
xmax
=
max
(
xmax
,
x
)
if
y
:
if
y
is
not
None
:
ymin
=
min
(
ymin
,
y
)
ymin
=
min
(
ymin
,
y
)
ymax
=
max
(
ymax
,
y
)
ymax
=
max
(
ymax
,
y
)
if
current_z
:
if
current_z
is
not
None
:
zmin
=
min
(
zmin
,
current_z
)
zmin
=
min
(
zmin
,
current_z
)
zmax
=
max
(
zmax
,
current_z
)
zmax
=
max
(
zmax
,
current_z
)
...
@@ -132,9 +132,9 @@ class Layer(list):
...
@@ -132,9 +132,9 @@ class Layer(list):
if
not
any
([
line
.
x
,
line
.
y
,
line
.
z
]):
if
not
any
([
line
.
x
,
line
.
y
,
line
.
z
]):
current_x
=
current_y
=
current_z
=
0
current_x
=
current_y
=
current_z
=
0
else
:
else
:
if
line
.
x
:
current_x
=
0
if
line
.
x
is
not
None
:
current_x
=
0
if
line
.
y
:
current_y
=
0
if
line
.
y
is
not
None
:
current_y
=
0
if
line
.
z
:
current_z
=
0
if
line
.
z
is
not
None
:
current_z
=
0
elif
line
.
command
==
"G92"
:
elif
line
.
command
==
"G92"
:
if
host_mode
:
if
host_mode
:
...
@@ -142,9 +142,9 @@ class Layer(list):
...
@@ -142,9 +142,9 @@ class Layer(list):
current_y
=
line
.
y
or
current_y
current_y
=
line
.
y
or
current_y
current_z
=
line
.
z
or
current_z
current_z
=
line
.
z
or
current_z
else
:
else
:
if
line
.
x
:
offset_x
=
current_x
-
line
.
x
if
line
.
x
is
not
None
:
offset_x
=
current_x
-
line
.
x
if
line
.
y
:
offset_y
=
current_y
-
line
.
y
if
line
.
y
is
not
None
:
offset_y
=
current_y
-
line
.
y
if
line
.
z
:
offset_z
=
current_z
-
line
.
z
if
line
.
z
is
not
None
:
offset_z
=
current_z
-
line
.
z
line
.
current_x
=
current_x
line
.
current_x
=
current_x
line
.
current_y
=
current_y
line
.
current_y
=
current_y
...
...
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