nb.AddPage(alterationPanel.alterationPanel(nb), "Start/End-GCode")
- (left, right) = self.CreateConfigTab(nb, '3D Model')
- configBase.TitleRow(right, "Rotate")
- c = configBase.SettingRow(right, "Rotate (deg)", 'model_rotate_base', '0', '')
- validators.validFloat(c)
- configBase.settingNotify(c, self.preview3d.updateModelTransform)
-
# load and slice buttons.
loadButton = wx.Button(self, -1, 'Load Model')
sliceButton = wx.Button(self, -1, 'Slice to GCode')
self.SetMinSize(self.GetSize())
self.Centre()
self.Show(True)
+ print self.GetSize()
def OnLoadProfile(self, e):
dlg=wx.FileDialog(self, "Select profile file to load", self.lastPath, style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST)
wx.Panel.__init__(self, parent,-1)\r
\r
self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_3DDKSHADOW))\r
- self.SetMinSize((400,300))\r
+ self.SetMinSize((440,320))\r
\r
self.glCanvas = PreviewGLCanvas(self)\r
self.init = 0\r
\r
self.toolbar2 = wx.ToolBar( self, -1 )\r
self.toolbar2.SetToolBitmapSize( ( 21, 21 ) )\r
- self.toolbar2.AddControl(wx.StaticText(self.toolbar2, -1, 'Flip:'))\r
+ self.toolbar2.AddControl(wx.StaticText(self.toolbar2, -1, 'Flip'))\r
\r
self.flipX = wx.CheckBox(self.toolbar2, -1, "X")\r
self.flipX.SetValue(profile.getProfileSetting('flip_x') == 'True')\r
self.scale = wx.TextCtrl(self.toolbar2, -1, profile.getProfileSetting('model_scale'), size=(21*2,21))\r
self.toolbar2.AddControl(self.scale)\r
self.Bind(wx.EVT_TEXT, self.OnScale, self.scale)\r
- self.toolbar2.InsertSeparator(self.toolbar2.GetToolsCount())\r
\r
- self.toolbar2.AddControl(wx.StaticText(self.toolbar2, -1, 'Copy:'))\r
+ self.toolbar2.InsertSeparator(self.toolbar2.GetToolsCount())\r
+ self.toolbar2.AddControl(wx.StaticText(self.toolbar2, -1, 'Copy'))\r
self.mulXsub = wx.Button(self.toolbar2, -1, '-', size=(21,21))\r
self.toolbar2.AddControl(self.mulXsub)\r
self.Bind(wx.EVT_BUTTON, self.OnMulXSubClick, self.mulXsub)\r
self.toolbar2.AddControl(self.mulYadd)\r
self.Bind(wx.EVT_BUTTON, self.OnMulYAddClick, self.mulYadd)\r
\r
+ self.toolbar2.InsertSeparator(self.toolbar2.GetToolsCount())\r
+ self.toolbar2.AddControl(wx.StaticText(self.toolbar2, -1, 'Rot'))\r
+ self.rotate = wx.SpinCtrl(self.toolbar2, -1, profile.getProfileSetting('model_rotate_base'), size=(21*3,21), style=wx.SP_WRAP|wx.SP_ARROW_KEYS)\r
+ self.rotate.SetRange(0, 360)\r
+ self.toolbar2.AddControl(self.rotate)\r
+ self.Bind(wx.EVT_SPINCTRL, self.OnRotate, self.rotate)\r
+ \r
self.toolbar2.Realize()\r
self.updateToolbar()\r
\r
scale = 1.0\r
profile.putProfileSetting('model_scale', str(scale))\r
self.updateModelTransform()\r
+ \r
+ def OnRotate(self, e):\r
+ profile.putProfileSetting('model_rotate_base', self.rotate.GetValue())\r
+ self.updateModelTransform()\r
\r
def On3DClick(self, e):\r
self.glCanvas.yaw = 30\r