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
b07f7855
Commit
b07f7855
authored
Jul 28, 2013
by
Gary Hodgson
Committed by
Guillaume Seguin
Aug 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed one scale bug where between 1 and 2 resulted in no actua scaling
Conflicts: printrun/projectlayer.py
parent
38d6ab5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
projectlayer.py
printrun/projectlayer.py
+5
-5
No files found.
printrun/projectlayer.py
View file @
b07f7855
...
...
@@ -89,7 +89,7 @@ class DisplayFrame(wx.Frame):
if
self
.
slicer
==
'Slic3r'
or
self
.
slicer
==
'Skeinforge'
:
if
int
(
self
.
scale
)
!=
1
:
if
self
.
scale
!=
1.0
:
layercopy
=
copy
.
deepcopy
(
image
)
height
=
float
(
layercopy
.
get
(
'height'
)
.
replace
(
'm'
,
''
))
width
=
float
(
layercopy
.
get
(
'width'
)
.
replace
(
'm'
,
''
))
...
...
@@ -101,7 +101,7 @@ class DisplayFrame(wx.Frame):
g
=
layercopy
.
find
(
"{http://www.w3.org/2000/svg}g"
)
g
.
set
(
'transform'
,
'scale('
+
str
(
self
.
scale
)
+
')'
)
stream
=
cStringIO
.
StringIO
(
PNGSurface
.
convert
(
dpi
=
self
.
dpi
,
bytestring
=
xml
.
etree
.
ElementTree
.
tostring
(
layercopy
)))
else
:
else
:
stream
=
cStringIO
.
StringIO
(
PNGSurface
.
convert
(
dpi
=
self
.
dpi
,
bytestring
=
xml
.
etree
.
ElementTree
.
tostring
(
image
)))
image
=
wx
.
ImageFromStream
(
stream
)
...
...
@@ -325,13 +325,13 @@ class SettingsFrame(wx.Frame):
# Right Column
fieldsizer
.
Add
(
wx
.
StaticText
(
self
.
panel
,
-
1
,
"X (px):"
),
pos
=
(
0
,
2
),
flag
=
wx
.
ALIGN_CENTER_VERTICAL
)
self
.
X
=
wx
.
SpinCtrl
(
self
.
panel
,
-
1
,
str
(
int
(
self
.
_get_setting
(
"project_x"
,
1
024
))),
max
=
999999
,
size
=
(
80
,
-
1
))
self
.
X
=
wx
.
SpinCtrl
(
self
.
panel
,
-
1
,
str
(
int
(
self
.
_get_setting
(
"project_x"
,
1
920
))),
max
=
999999
,
size
=
(
80
,
-
1
))
self
.
X
.
Bind
(
wx
.
EVT_SPINCTRL
,
self
.
update_resolution
)
self
.
X
.
SetHelpText
(
"The projector resolution in the X axis."
)
fieldsizer
.
Add
(
self
.
X
,
pos
=
(
0
,
3
))
fieldsizer
.
Add
(
wx
.
StaticText
(
self
.
panel
,
-
1
,
"Y (px):"
),
pos
=
(
1
,
2
),
flag
=
wx
.
ALIGN_CENTER_VERTICAL
)
self
.
Y
=
wx
.
SpinCtrl
(
self
.
panel
,
-
1
,
str
(
int
(
self
.
_get_setting
(
"project_y"
,
768
))),
max
=
999999
,
size
=
(
80
,
-
1
))
self
.
Y
=
wx
.
SpinCtrl
(
self
.
panel
,
-
1
,
str
(
int
(
self
.
_get_setting
(
"project_y"
,
1200
))),
max
=
999999
,
size
=
(
80
,
-
1
))
self
.
Y
.
Bind
(
wx
.
EVT_SPINCTRL
,
self
.
update_resolution
)
self
.
Y
.
SetHelpText
(
"The projector resolution in the Y axis."
)
fieldsizer
.
Add
(
self
.
Y
,
pos
=
(
1
,
3
))
...
...
@@ -349,7 +349,7 @@ class SettingsFrame(wx.Frame):
fieldsizer
.
Add
(
self
.
offset_Y
,
pos
=
(
3
,
3
))
fieldsizer
.
Add
(
wx
.
StaticText
(
self
.
panel
,
-
1
,
"ProjectedX (mm):"
),
pos
=
(
4
,
2
),
flag
=
wx
.
ALIGN_CENTER_VERTICAL
)
self
.
projected_X_mm
=
floatspin
.
FloatSpin
(
self
.
panel
,
-
1
,
value
=
self
.
_get_setting
(
"project_projected_x"
,
415
.0
),
increment
=
1
,
digits
=
1
,
size
=
(
80
,
-
1
))
self
.
projected_X_mm
=
floatspin
.
FloatSpin
(
self
.
panel
,
-
1
,
value
=
self
.
_get_setting
(
"project_projected_x"
,
560
.0
),
increment
=
1
,
digits
=
1
,
size
=
(
80
,
-
1
))
self
.
projected_X_mm
.
Bind
(
floatspin
.
EVT_FLOATSPIN
,
self
.
update_projected_Xmm
)
self
.
projected_X_mm
.
SetHelpText
(
"The actual width of the entire projected image. Use the Calibrate grid to show the full size of the projected image, and measure the width at the same level where the slice will be projected onto the resin."
)
fieldsizer
.
Add
(
self
.
projected_X_mm
,
pos
=
(
4
,
3
))
...
...
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