Commit 44bb60b4 authored by Guillaume Seguin's avatar Guillaume Seguin

Add support for circular platforms

parent 22394c73
......@@ -261,7 +261,7 @@ class GCObject(object):
class GcodeViewMainWrapper(object):
def __init__(self, parent, build_dimensions, root):
def __init__(self, parent, build_dimensions, root, circular):
self.root = root
self.glpanel = GcodeViewPanel(parent, realparent = self,
build_dimensions = build_dimensions)
......@@ -270,7 +270,7 @@ class GcodeViewMainWrapper(object):
self.widget = self.glpanel
self.refresh_timer = wx.CallLater(100, self.Refresh)
self.p = self # Hack for backwards compatibility with gviz API
self.platform = actors.Platform(build_dimensions)
self.platform = actors.Platform(build_dimensions, circular = circular)
self.model = None
self.objects = [GCObject(self.platform), GCObject(None)]
......
......@@ -318,7 +318,7 @@ class VizPane(wx.BoxSizer):
if root.settings.mainviz == "3D":
try:
import printrun.gcview
root.gviz = printrun.gcview.GcodeViewMainWrapper(parentpanel, root.build_dimensions_list, root = root)
root.gviz = printrun.gcview.GcodeViewMainWrapper(parentpanel, root.build_dimensions_list, root = root, circular = root.settings.circular_bed)
root.gviz.clickcb = root.showwin
except:
use2dview = True
......
......@@ -122,6 +122,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
monitorsetting.hidden = True
self.settings._add(monitorsetting)
self.settings._add(StringSetting("simarrange_path", "", _("Simarrange command"), _("Path to the simarrange binary to use in the STL plater"), "External"))
self.settings._add(BooleanSetting("circular_bed", False, _("Circular build platform"), _("Draw a circular (or oval) build platform instead of a rectangular one"), "Printer"))
self.settings._add(SpinSetting("extruders", 0, 1, 5, _("Extruders count"), _("Number of extruders"), "Printer"))
self.settings._add(BooleanSetting("clamp_jogging", False, _("Clamp manual moves"), _("Prevent manual moves from leaving the specified build dimensions"), "Printer"))
self.settings._add(StringSetting("bgcolor", "#FFFFFF", _("Background color"), _("Pronterface background color"), "UI"))
......
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