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
e6eb66ea
Commit
e6eb66ea
authored
Nov 04, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factorize gviz init by calling clear()
parent
c1f315d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
gviz.py
printrun/gviz.py
+6
-14
No files found.
printrun/gviz.py
View file @
e6eb66ea
...
@@ -178,16 +178,13 @@ class Gviz(wx.Panel):
...
@@ -178,16 +178,13 @@ class Gviz(wx.Panel):
self
.
size
=
size
self
.
size
=
size
self
.
build_dimensions
=
build_dimensions
self
.
build_dimensions
=
build_dimensions
self
.
grid
=
grid
self
.
grid
=
grid
self
.
lastpos
=
[
0
,
0
,
0
,
0
,
0
,
0
,
0
]
self
.
hilightpos
=
self
.
lastpos
[:]
self
.
Bind
(
wx
.
EVT_PAINT
,
self
.
paint
)
self
.
Bind
(
wx
.
EVT_PAINT
,
self
.
paint
)
self
.
Bind
(
wx
.
EVT_SIZE
,
self
.
resize
)
self
.
Bind
(
wx
.
EVT_SIZE
,
self
.
resize
)
self
.
lines
=
{}
self
.
hilight
=
deque
()
self
.
pens
=
{}
self
.
hilightarcs
=
deque
()
self
.
arcs
=
{}
self
.
hilightqueue
=
Queue
(
0
)
self
.
arcpens
=
{}
self
.
hilightarcsqueue
=
Queue
(
0
)
self
.
layers
=
[]
self
.
clear
()
self
.
layerindex
=
0
self
.
filament_width
=
extrusion_width
# set it to 0 to disable scaling lines with zoom
self
.
filament_width
=
extrusion_width
# set it to 0 to disable scaling lines with zoom
self
.
update_basescale
()
self
.
update_basescale
()
self
.
scale
=
self
.
basescale
self
.
scale
=
self
.
basescale
...
@@ -199,12 +196,6 @@ class Gviz(wx.Panel):
...
@@ -199,12 +196,6 @@ class Gviz(wx.Panel):
self
.
hlpen
=
wx
.
Pen
(
wx
.
Colour
(
200
,
50
,
50
),
penwidth
)
self
.
hlpen
=
wx
.
Pen
(
wx
.
Colour
(
200
,
50
,
50
),
penwidth
)
self
.
fades
=
[
wx
.
Pen
(
wx
.
Colour
(
250
-
0.6
**
i
*
100
,
250
-
0.6
**
i
*
100
,
200
-
0.4
**
i
*
50
),
penwidth
)
for
i
in
xrange
(
6
)]
self
.
fades
=
[
wx
.
Pen
(
wx
.
Colour
(
250
-
0.6
**
i
*
100
,
250
-
0.6
**
i
*
100
,
200
-
0.4
**
i
*
50
),
penwidth
)
for
i
in
xrange
(
6
)]
self
.
penslist
=
[
self
.
mainpen
,
self
.
travelpen
,
self
.
hlpen
]
+
self
.
fades
self
.
penslist
=
[
self
.
mainpen
,
self
.
travelpen
,
self
.
hlpen
]
+
self
.
fades
self
.
showall
=
0
self
.
hilight
=
deque
()
self
.
hilightarcs
=
deque
()
self
.
hilightqueue
=
Queue
(
0
)
self
.
hilightarcsqueue
=
Queue
(
0
)
self
.
dirty
=
1
self
.
bgcolor
=
wx
.
Colour
()
self
.
bgcolor
=
wx
.
Colour
()
self
.
bgcolor
.
SetFromName
(
bgcolor
)
self
.
bgcolor
.
SetFromName
(
bgcolor
)
self
.
blitmap
=
wx
.
EmptyBitmap
(
self
.
GetClientSize
()[
0
],
self
.
GetClientSize
()[
1
],
-
1
)
self
.
blitmap
=
wx
.
EmptyBitmap
(
self
.
GetClientSize
()[
0
],
self
.
GetClientSize
()[
1
],
-
1
)
...
@@ -225,6 +216,7 @@ class Gviz(wx.Panel):
...
@@ -225,6 +216,7 @@ class Gviz(wx.Panel):
def
clear
(
self
):
def
clear
(
self
):
self
.
lastpos
=
[
0
,
0
,
0
,
0
,
0
,
0
,
0
]
self
.
lastpos
=
[
0
,
0
,
0
,
0
,
0
,
0
,
0
]
self
.
hilightpos
=
self
.
lastpos
[:]
self
.
lines
=
{}
self
.
lines
=
{}
self
.
pens
=
{}
self
.
pens
=
{}
self
.
arcs
=
{}
self
.
arcs
=
{}
...
...
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