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
b2f95128
Commit
b2f95128
authored
Nov 07, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import gviz/gviz depending things just in time to lighten base memory usage
parent
c635bd67
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
viz.py
printrun/gui/viz.py
+2
-2
pronterface.py
printrun/pronterface.py
+1
-1
No files found.
printrun/gui/viz.py
View file @
b2f95128
...
@@ -18,8 +18,6 @@ import logging
...
@@ -18,8 +18,6 @@ import logging
import
wx
import
wx
from
printrun
import
gviz
class
NoViz
(
object
):
class
NoViz
(
object
):
showall
=
False
showall
=
False
...
@@ -78,6 +76,7 @@ class VizPane(wx.BoxSizer):
...
@@ -78,6 +76,7 @@ class VizPane(wx.BoxSizer):
+
"Falling back to 2D view, and here is the backtrace:
\n
"
+
"Falling back to 2D view, and here is the backtrace:
\n
"
+
traceback
.
format_exc
())
+
traceback
.
format_exc
())
if
use2dview
:
if
use2dview
:
from
printrun
import
gviz
root
.
gviz
=
gviz
.
Gviz
(
parentpanel
,
(
300
,
300
),
root
.
gviz
=
gviz
.
Gviz
(
parentpanel
,
(
300
,
300
),
build_dimensions
=
root
.
build_dimensions_list
,
build_dimensions
=
root
.
build_dimensions_list
,
grid
=
(
root
.
settings
.
preview_grid_step1
,
root
.
settings
.
preview_grid_step2
),
grid
=
(
root
.
settings
.
preview_grid_step1
,
root
.
settings
.
preview_grid_step2
),
...
@@ -100,6 +99,7 @@ class VizPane(wx.BoxSizer):
...
@@ -100,6 +99,7 @@ class VizPane(wx.BoxSizer):
+
"Falling back to 2D view, and here is the backtrace:
\n
"
+
"Falling back to 2D view, and here is the backtrace:
\n
"
+
traceback
.
format_exc
())
+
traceback
.
format_exc
())
if
not
use3dview
:
if
not
use3dview
:
from
printrun
import
gviz
root
.
gwindow
=
gviz
.
GvizWindow
(
build_dimensions
=
root
.
build_dimensions_list
,
root
.
gwindow
=
gviz
.
GvizWindow
(
build_dimensions
=
root
.
build_dimensions_list
,
grid
=
(
root
.
settings
.
preview_grid_step1
,
root
.
settings
.
preview_grid_step2
),
grid
=
(
root
.
settings
.
preview_grid_step1
,
root
.
settings
.
preview_grid_step2
),
extrusion_width
=
root
.
settings
.
preview_extrusion_width
,
extrusion_width
=
root
.
settings
.
preview_extrusion_width
,
...
...
printrun/pronterface.py
View file @
b2f95128
...
@@ -57,7 +57,6 @@ class PronterfaceQuitException(Exception):
...
@@ -57,7 +57,6 @@ class PronterfaceQuitException(Exception):
pass
pass
from
.gui
import
MainWindow
from
.gui
import
MainWindow
from
.excluder
import
Excluder
from
.settings
import
wxSetting
,
HiddenSetting
,
StringSetting
,
SpinSetting
,
\
from
.settings
import
wxSetting
,
HiddenSetting
,
StringSetting
,
SpinSetting
,
\
FloatSpinSetting
,
BooleanSetting
,
StaticTextSetting
FloatSpinSetting
,
BooleanSetting
,
StaticTextSetting
from
printrun
import
gcoder
from
printrun
import
gcoder
...
@@ -775,6 +774,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -775,6 +774,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
wx
.
CallAfter
(
self
.
statusbar
.
SetStatusText
,
_
(
"No file loaded. Please use load first."
))
wx
.
CallAfter
(
self
.
statusbar
.
SetStatusText
,
_
(
"No file loaded. Please use load first."
))
return
return
if
not
self
.
excluder
:
if
not
self
.
excluder
:
from
.excluder
import
Excluder
self
.
excluder
=
Excluder
()
self
.
excluder
=
Excluder
()
self
.
excluder
.
pop_window
(
self
.
fgcode
,
bgcolor
=
self
.
bgcolor
,
self
.
excluder
.
pop_window
(
self
.
fgcode
,
bgcolor
=
self
.
bgcolor
,
build_dimensions
=
self
.
build_dimensions_list
)
build_dimensions
=
self
.
build_dimensions_list
)
...
...
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