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
c178ad0c
Commit
c178ad0c
authored
Oct 20, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work in progress #576: Heavily optimize 2D viewer memory usage by using numpy
parent
af1df4fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
gviz.py
printrun/gviz.py
+6
-0
No files found.
printrun/gviz.py
View file @
c178ad0c
...
...
@@ -15,6 +15,7 @@
from
Queue
import
Queue
from
collections
import
deque
import
numpy
import
wx
import
time
from
.
import
gcoder
...
...
@@ -506,6 +507,11 @@ class Gviz(wx.Panel):
self
.
arcpens
[
viz_layer
]
.
append
(
self
.
arcpen
)
self
.
lastpos
=
target
# Transform into a numpy array for memory efficiency
self
.
lines
[
viz_layer
]
=
numpy
.
asarray
(
self
.
lines
[
viz_layer
])
self
.
pens
[
viz_layer
]
=
numpy
.
asarray
(
self
.
pens
[
viz_layer
])
self
.
arcs
[
viz_layer
]
=
numpy
.
asarray
(
self
.
arcs
[
viz_layer
])
self
.
arcpens
[
viz_layer
]
=
numpy
.
asarray
(
self
.
arcpens
[
viz_layer
])
# Only add layer to self.layers now to prevent the display of an
# unfinished layer
self
.
layers
[
layer_idx
]
=
viz_layer
...
...
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