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
5ffc3ac5
Commit
5ffc3ac5
authored
May 30, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add PrintHead 3D actor
parent
e6316836
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
actors.py
printrun/libtatlin/actors.py
+35
-0
No files found.
printrun/libtatlin/actors.py
View file @
5ffc3ac5
...
@@ -126,6 +126,41 @@ class Platform(object):
...
@@ -126,6 +126,41 @@ class Platform(object):
def
display
(
self
,
mode_2d
=
False
):
def
display
(
self
,
mode_2d
=
False
):
glCallList
(
self
.
display_list
)
glCallList
(
self
.
display_list
)
class
PrintHead
(
object
):
def
__init__
(
self
):
self
.
color
=
(
43.
/
255
,
0.
,
175.
/
255
,
1.0
)
self
.
scale
=
5
self
.
height
=
5
self
.
initialized
=
False
self
.
loaded
=
True
def
init
(
self
):
self
.
display_list
=
compile_display_list
(
self
.
draw
)
self
.
initialized
=
True
def
draw
(
self
):
glPushMatrix
()
glBegin
(
GL_LINES
)
glColor4f
(
*
self
.
color
)
for
di
in
[
-
1
,
1
]:
for
dj
in
[
-
1
,
1
]:
glVertex3f
(
0
,
0
,
0
)
glVertex3f
(
self
.
scale
*
di
,
self
.
scale
*
dj
,
self
.
height
)
glEnd
()
glPopMatrix
()
def
display
(
self
,
mode_2d
=
False
):
glEnable
(
GL_LINE_SMOOTH
)
orig_linewidth
=
(
GLfloat
)()
glGetFloatv
(
GL_LINE_WIDTH
,
orig_linewidth
)
glLineWidth
(
3.0
)
glCallList
(
self
.
display_list
)
glLineWidth
(
orig_linewidth
)
glDisable
(
GL_LINE_SMOOTH
)
class
Model
(
object
):
class
Model
(
object
):
"""
"""
Parent class for models that provides common functionality.
Parent class for models that provides common functionality.
...
...
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