Commit 1ff64ca8 authored by Guillaume Seguin's avatar Guillaume Seguin

Support circular beds in plater

parent 8a495942
...@@ -213,10 +213,13 @@ class StlPlater(Plater): ...@@ -213,10 +213,13 @@ class StlPlater(Plater):
save_wildcard = _("STL files (*.stl;*.STL)|*.stl;*.STL") save_wildcard = _("STL files (*.stl;*.STL)|*.stl;*.STL")
def __init__(self, filenames = [], size = (800, 580), callback = None, def __init__(self, filenames = [], size = (800, 580), callback = None,
parent = None, build_dimensions = None, simarrange_path = None): parent = None, build_dimensions = None, circular_platform = False,
simarrange_path = None):
super(StlPlater, self).__init__(filenames, size, callback, parent, build_dimensions) super(StlPlater, self).__init__(filenames, size, callback, parent, build_dimensions)
if glview: if glview:
viewer = stlview.StlViewPanel(self, (580, 580), build_dimensions = self.build_dimensions) viewer = stlview.StlViewPanel(self, (580, 580),
build_dimensions = self.build_dimensions,
circular = circular_platform)
else: else:
viewer = showstl(self, (580, 580), (0, 0)) viewer = showstl(self, (580, 580), (0, 0))
self.simarrange_path = simarrange_path if simarrange_path else "./simarrange/sa" self.simarrange_path = simarrange_path if simarrange_path else "./simarrange/sa"
......
...@@ -786,6 +786,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>.""" ...@@ -786,6 +786,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
plater.StlPlater(size = (800, 580), callback = self.platecb, plater.StlPlater(size = (800, 580), callback = self.platecb,
parent = self, parent = self,
build_dimensions = self.build_dimensions_list, build_dimensions = self.build_dimensions_list,
circular_platform = self.settings.circular_bed,
simarrange_path = self.settings.simarrange_path).Show() simarrange_path = self.settings.simarrange_path).Show()
def platecb(self, name): def platecb(self, name):
......
...@@ -57,7 +57,8 @@ class stlview(object): ...@@ -57,7 +57,8 @@ class stlview(object):
class StlViewPanel(wxGLPanel): class StlViewPanel(wxGLPanel):
def __init__(self, parent, size, id = wx.ID_ANY, build_dimensions = None): def __init__(self, parent, size, id = wx.ID_ANY,
build_dimensions = None, circular = False):
super(StlViewPanel, self).__init__(parent, id, wx.DefaultPosition, size, 0) super(StlViewPanel, self).__init__(parent, id, wx.DefaultPosition, size, 0)
self.batches = [] self.batches = []
self.rot = 0 self.rot = 0
...@@ -71,7 +72,8 @@ class StlViewPanel(wxGLPanel): ...@@ -71,7 +72,8 @@ class StlViewPanel(wxGLPanel):
self.build_dimensions = build_dimensions self.build_dimensions = build_dimensions
else: else:
self.build_dimensions = [200, 200, 100, 0, 0, 0] self.build_dimensions = [200, 200, 100, 0, 0, 0]
self.platform = actors.Platform(self.build_dimensions, light = True) self.platform = actors.Platform(self.build_dimensions, light = True,
circular = circular)
self.dist = max(self.build_dimensions[0], self.build_dimensions[1]) self.dist = max(self.build_dimensions[0], self.build_dimensions[1])
self.basequat = [0, 0, 0, 1] self.basequat = [0, 0, 0, 1]
wx.CallAfter(self.forceresize) wx.CallAfter(self.forceresize)
......
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