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
bf182564
Commit
bf182564
authored
Apr 03, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Actually use the new extrusion colors :)
parent
ce7e8c34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
24 deletions
+18
-24
actors.py
printrun/gl/libtatlin/actors.py
+18
-24
No files found.
printrun/gl/libtatlin/actors.py
View file @
bf182564
...
@@ -275,6 +275,24 @@ class Model(object):
...
@@ -275,6 +275,24 @@ class Model(object):
def
height
(
self
):
def
height
(
self
):
return
self
.
bounding_box
.
height
return
self
.
bounding_box
.
height
def
movement_color
(
self
,
move
):
"""
Return the color to use for particular type of movement.
"""
if
move
.
extruding
:
if
move
.
current_tool
==
0
:
return
self
.
color_tool0
elif
move
.
current_tool
==
1
:
return
self
.
color_tool1
elif
move
.
current_tool
==
2
:
return
self
.
color_tool2
elif
move
.
current_tool
==
3
:
return
self
.
color_tool3
else
:
return
self
.
color_tool4
return
self
.
color_travel
def
movement_angle
(
src
,
dst
,
precision
=
0
):
def
movement_angle
(
src
,
dst
,
precision
=
0
):
x
=
dst
[
0
]
-
src
[
0
]
x
=
dst
[
0
]
-
src
[
0
]
y
=
dst
[
1
]
-
src
[
1
]
y
=
dst
[
1
]
-
src
[
1
]
...
@@ -550,18 +568,6 @@ class GcodeModel(Model):
...
@@ -550,18 +568,6 @@ class GcodeModel(Model):
copy
.
initialized
=
False
copy
.
initialized
=
False
return
copy
return
copy
def
movement_color
(
self
,
move
):
"""
Return the color to use for particular type of movement.
"""
if
move
.
extruding
:
if
move
.
current_tool
==
0
:
return
self
.
color_tool0
else
:
return
self
.
color_tool1
return
self
.
color_travel
# ------------------------------------------------------------------------
# ------------------------------------------------------------------------
# DRAWING
# DRAWING
# ------------------------------------------------------------------------
# ------------------------------------------------------------------------
...
@@ -826,18 +832,6 @@ class GcodeModelLight(Model):
...
@@ -826,18 +832,6 @@ class GcodeModelLight(Model):
copy
.
initialized
=
False
copy
.
initialized
=
False
return
copy
return
copy
def
movement_color
(
self
,
move
):
"""
Return the color to use for particular type of movement.
"""
if
move
.
extruding
:
if
move
.
current_tool
==
0
:
return
self
.
color_tool0
else
:
return
self
.
color_tool1
return
self
.
color_travel
# ------------------------------------------------------------------------
# ------------------------------------------------------------------------
# DRAWING
# DRAWING
# ------------------------------------------------------------------------
# ------------------------------------------------------------------------
...
...
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