Commit b07f7855 authored by Gary Hodgson's avatar Gary Hodgson Committed by Guillaume Seguin

fixed one scale bug where between 1 and 2 resulted in no actua scaling

Conflicts:
	printrun/projectlayer.py
parent 38d6ab5c
...@@ -89,7 +89,7 @@ class DisplayFrame(wx.Frame): ...@@ -89,7 +89,7 @@ class DisplayFrame(wx.Frame):
if self.slicer == 'Slic3r' or self.slicer == 'Skeinforge': if self.slicer == 'Slic3r' or self.slicer == 'Skeinforge':
if int(self.scale) != 1: if self.scale != 1.0:
layercopy = copy.deepcopy(image) layercopy = copy.deepcopy(image)
height = float(layercopy.get('height').replace('m','')) height = float(layercopy.get('height').replace('m',''))
width = float(layercopy.get('width').replace('m','')) width = float(layercopy.get('width').replace('m',''))
...@@ -101,7 +101,7 @@ class DisplayFrame(wx.Frame): ...@@ -101,7 +101,7 @@ class DisplayFrame(wx.Frame):
g = layercopy.find("{http://www.w3.org/2000/svg}g") g = layercopy.find("{http://www.w3.org/2000/svg}g")
g.set('transform', 'scale('+str(self.scale)+')') g.set('transform', 'scale('+str(self.scale)+')')
stream = cStringIO.StringIO(PNGSurface.convert(dpi=self.dpi, bytestring=xml.etree.ElementTree.tostring(layercopy))) 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))) stream = cStringIO.StringIO(PNGSurface.convert(dpi=self.dpi, bytestring=xml.etree.ElementTree.tostring(image)))
image = wx.ImageFromStream(stream) image = wx.ImageFromStream(stream)
...@@ -325,13 +325,13 @@ class SettingsFrame(wx.Frame): ...@@ -325,13 +325,13 @@ class SettingsFrame(wx.Frame):
# Right Column # Right Column
fieldsizer.Add(wx.StaticText(self.panel, -1, "X (px):"), pos=(0, 2), flag=wx.ALIGN_CENTER_VERTICAL) 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", 1024))), max=999999, size=(80,-1)) self.X = wx.SpinCtrl(self.panel, -1, str(int(self._get_setting("project_x", 1920))), max=999999, size=(80,-1))
self.X.Bind(wx.EVT_SPINCTRL, self.update_resolution) self.X.Bind(wx.EVT_SPINCTRL, self.update_resolution)
self.X.SetHelpText("The projector resolution in the X axis.") self.X.SetHelpText("The projector resolution in the X axis.")
fieldsizer.Add(self.X, pos=(0, 3)) fieldsizer.Add(self.X, pos=(0, 3))
fieldsizer.Add(wx.StaticText(self.panel, -1, "Y (px):"), pos=(1, 2), flag=wx.ALIGN_CENTER_VERTICAL) 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.Bind(wx.EVT_SPINCTRL, self.update_resolution)
self.Y.SetHelpText("The projector resolution in the Y axis.") self.Y.SetHelpText("The projector resolution in the Y axis.")
fieldsizer.Add(self.Y, pos=(1, 3)) fieldsizer.Add(self.Y, pos=(1, 3))
...@@ -349,7 +349,7 @@ class SettingsFrame(wx.Frame): ...@@ -349,7 +349,7 @@ class SettingsFrame(wx.Frame):
fieldsizer.Add(self.offset_Y, pos=(3, 3)) 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) 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.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.") 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)) fieldsizer.Add(self.projected_X_mm, pos=(4, 3))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment