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
1ea9fe19
Commit
1ea9fe19
authored
Nov 05, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow creating a GCode object without any argument
parent
4b04d190
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
gcoder.py
printrun/gcoder.py
+5
-5
No files found.
printrun/gcoder.py
View file @
1ea9fe19
...
@@ -174,12 +174,12 @@ class GCode(object):
...
@@ -174,12 +174,12 @@ class GCode(object):
self
.
home_x
,
self
.
home_y
,
self
.
home_z
=
home_pos
self
.
home_x
,
self
.
home_y
,
self
.
home_z
=
home_pos
home_pos
=
property
(
_get_home_pos
,
_set_home_pos
)
home_pos
=
property
(
_get_home_pos
,
_set_home_pos
)
def
__init__
(
self
,
data
,
home_pos
=
None
):
def
__init__
(
self
,
data
=
None
,
home_pos
=
None
):
self
.
home_pos
=
home_pos
if
data
:
self
.
lines
=
[
Line
(
l2
)
for
l2
in
self
.
lines
=
[
Line
(
l2
)
for
l2
in
(
l
.
strip
()
for
l
in
data
)
(
l
.
strip
()
for
l
in
data
)
if
l2
]
if
l2
]
self
.
home_pos
=
home_pos
if
self
.
lines
:
self
.
_preprocess_lines
()
self
.
_preprocess_lines
()
self
.
filament_length
=
self
.
_preprocess_extrusion
()
self
.
filament_length
=
self
.
_preprocess_extrusion
()
self
.
_create_layers
()
self
.
_create_layers
()
...
...
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