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
483ae2a5
Commit
483ae2a5
authored
Nov 04, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup
parent
6c90b106
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
43 deletions
+29
-43
GCodeAnalyzer.py
printrun/GCodeAnalyzer.py
+29
-43
No files found.
printrun/GCodeAnalyzer.py
View file @
483ae2a5
...
...
@@ -75,77 +75,63 @@ class GCodeAnalyzer():
self
.
lastY
=
self
.
y
self
.
lastZ
=
self
.
z
self
.
lastE
=
self
.
e
code_f
=
gline
.
f
if
code_f
is
not
None
:
self
.
f
=
code_f
code_x
=
gline
.
x
code_y
=
gline
.
y
code_z
=
gline
.
z
code_e
=
gline
.
e
if
gline
.
f
is
not
None
:
self
.
f
=
gline
.
f
if
self
.
gcoder
.
relative
:
if
code_x
is
not
None
:
self
.
x
+=
code_
x
if
code_y
is
not
None
:
self
.
y
+=
code_
y
if
code_z
is
not
None
:
self
.
z
+=
code_
z
if
code_
e
is
not
None
:
if
code_
e
!=
0
:
self
.
e
+=
code_
e
if
gline
.
x
is
not
None
:
self
.
x
+=
gline
.
x
if
gline
.
y
is
not
None
:
self
.
y
+=
gline
.
y
if
gline
.
z
is
not
None
:
self
.
z
+=
gline
.
z
if
gline
.
e
is
not
None
:
if
gline
.
e
!=
0
:
self
.
e
+=
gline
.
e
else
:
# absolute coordinates
if
code_x
is
not
None
:
self
.
x
=
self
.
xOffset
+
code_
x
if
code_y
is
not
None
:
self
.
y
=
self
.
yOffset
+
code_
y
if
code_z
is
not
None
:
self
.
z
=
self
.
zOffset
+
code_
z
if
code_
e
is
not
None
:
if
gline
.
x
is
not
None
:
self
.
x
=
self
.
xOffset
+
gline
.
x
if
gline
.
y
is
not
None
:
self
.
y
=
self
.
yOffset
+
gline
.
y
if
gline
.
z
is
not
None
:
self
.
z
=
self
.
zOffset
+
gline
.
z
if
gline
.
e
is
not
None
:
if
self
.
gcoder
.
relative_e
:
if
code_
e
!=
0
:
self
.
e
+=
code_
e
if
gline
.
e
!=
0
:
self
.
e
+=
gline
.
e
else
:
# e is absolute. Is it changed?
if
self
.
e
!=
self
.
eOffset
+
code_
e
:
self
.
e
=
self
.
eOffset
+
code_
e
if
self
.
e
!=
self
.
eOffset
+
gline
.
e
:
self
.
e
=
self
.
eOffset
+
gline
.
e
elif
code_g
==
28
or
code_g
==
161
:
self
.
lastX
=
self
.
x
self
.
lastY
=
self
.
y
self
.
lastZ
=
self
.
z
self
.
lastE
=
self
.
e
code_x
=
gline
.
x
code_y
=
gline
.
y
code_z
=
gline
.
z
code_e
=
gline
.
e
homeAll
=
False
if
code_x
is
None
and
code_y
is
None
and
code_
z
is
None
:
homeAll
=
True
if
code_
x
is
not
None
or
homeAll
:
if
gline
.
x
is
None
and
gline
.
y
is
None
and
gline
.
z
is
None
:
homeAll
=
True
if
gline
.
x
is
not
None
or
homeAll
:
self
.
hasHomeX
=
True
self
.
xOffset
=
0
self
.
x
=
self
.
homeX
if
code_
y
is
not
None
or
homeAll
:
if
gline
.
y
is
not
None
or
homeAll
:
self
.
hasHomeY
=
True
self
.
yOffset
=
0
self
.
y
=
self
.
homeY
if
code_
z
is
not
None
or
homeAll
:
if
gline
.
z
is
not
None
or
homeAll
:
self
.
hasHomeZ
=
True
self
.
zOffset
=
0
self
.
z
=
self
.
homeZ
if
code_
e
is
not
None
:
if
gline
.
e
is
not
None
:
self
.
eOffset
=
0
self
.
e
=
0
elif
code_g
==
92
:
code_x
=
gline
.
x
code_y
=
gline
.
y
code_z
=
gline
.
z
code_e
=
gline
.
e
if
code_x
is
not
None
:
self
.
xOffset
=
self
.
x
-
float
(
code_x
)
if
gline
.
x
is
not
None
:
self
.
xOffset
=
self
.
x
-
float
(
gline
.
x
)
self
.
x
=
self
.
xOffset
if
code_
y
is
not
None
:
self
.
yOffset
=
self
.
y
-
float
(
code_
y
)
if
gline
.
y
is
not
None
:
self
.
yOffset
=
self
.
y
-
float
(
gline
.
y
)
self
.
y
=
self
.
yOffset
if
code_
z
is
not
None
:
self
.
zOffset
=
self
.
z
-
float
(
code_
z
)
if
gline
.
z
is
not
None
:
self
.
zOffset
=
self
.
z
-
float
(
gline
.
z
)
self
.
z
=
self
.
zOffset
if
code_
e
is
not
None
:
self
.
xOffset
=
self
.
e
-
float
(
code_
e
)
if
gline
.
e
is
not
None
:
self
.
xOffset
=
self
.
e
-
float
(
gline
.
e
)
self
.
e
=
self
.
eOffset
def
print_status
(
self
):
...
...
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