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
eb0b24ab
Commit
eb0b24ab
authored
May 27, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'experimental' of github.com:kliment/Printrun into experimental
parents
a50ebb02
0ab0d9af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
gcview.py
printrun/gcview.py
+7
-5
No files found.
printrun/gcview.py
View file @
eb0b24ab
...
...
@@ -252,7 +252,7 @@ def mulquat(q1, rq):
class
GcodeViewPanel
(
wxGLPanel
):
def
__init__
(
self
,
parent
,
id
=
wx
.
ID_ANY
,
realparent
=
None
):
def
__init__
(
self
,
parent
,
id
=
wx
.
ID_ANY
,
build_dimensions
=
None
,
realparent
=
None
):
super
(
GcodeViewPanel
,
self
)
.
__init__
(
parent
,
id
,
wx
.
DefaultPosition
,
wx
.
DefaultSize
,
0
)
self
.
batches
=
[]
self
.
rot
=
0
...
...
@@ -263,8 +263,10 @@ class GcodeViewPanel(wxGLPanel):
self
.
canvas
.
Bind
(
wx
.
EVT_MOUSEWHEEL
,
self
.
wheel
)
self
.
parent
=
realparent
if
realparent
else
parent
self
.
initpos
=
None
self
.
dist
=
200
self
.
bedsize
=
[
200
,
200
]
if
build_dimensions
:
self
.
dist
=
max
(
build_dimensions
[
0
],
build_dimensions
[
1
])
else
:
self
.
dist
=
200
self
.
transv
=
[
0
,
0
,
-
self
.
dist
]
self
.
basequat
=
[
0
,
0
,
0
,
1
]
self
.
mousepos
=
[
0
,
0
]
...
...
@@ -469,7 +471,7 @@ class GCObject(object):
class
GcodeViewMainWrapper
(
object
):
def
__init__
(
self
,
parent
,
build_dimensions
):
self
.
glpanel
=
GcodeViewPanel
(
parent
,
realparent
=
self
)
self
.
glpanel
=
GcodeViewPanel
(
parent
,
realparent
=
self
,
build_dimensions
=
build_dimensions
)
self
.
glpanel
.
SetMinSize
((
150
,
150
))
self
.
clickcb
=
None
self
.
widget
=
self
.
glpanel
...
...
@@ -522,7 +524,7 @@ class GcodeViewFrame(wx.Frame):
else
:
self
.
model
=
None
self
.
objects
=
[
GCObject
(
self
.
platform
),
GCObject
(
None
)]
self
.
glpanel
=
GcodeViewPanel
(
self
)
self
.
glpanel
=
GcodeViewPanel
(
self
,
build_dimensions
=
build_dimensions
)
def
set_current_gline
(
self
,
gline
):
if
gline
.
is_move
and
self
.
model
and
self
.
model
.
loaded
:
...
...
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