Commit 10027286 authored by sumpfralle's avatar sumpfralle

r560@erker: lars | 2010-02-02 01:56:09 +0100

 initial draft of PyGTK-based GUI:
  * show 3d-model (with glitches)
  * load a file
  * designed a window for basic model-oriented tasks


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@83 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent a7ea4e71
#!/usr/bin/env python
from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
import pycam.Importers.STLImporter
import pygtk
import gtk
import os
import sys
GTKBUILD_FILE = os.path.join(os.path.dirname(__file__), "gtk-interface", "pycam-project.ui")
#class OpenglWidget(Opengl):
# def __init__(self, master=None, cnf={}, **kw):
# Opengl.__init__(self, master, kw)
# glutInit()
# glShadeModel(GL_FLAT)
# glMatrixMode(GL_MODELVIEW)
# glMaterial(GL_FRONT_AND_BACK, GL_AMBIENT, (0.1, 0.1, 0.1, 1.0))
# glMaterial(GL_FRONT_AND_BACK, GL_SPECULAR, (0.1, 0.1, 0.1, 1.0))
# glMaterial(GL_FRONT_AND_BACK, GL_SHININESS, (0.5))
# glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)
VIEW_ROTATIONS = {
"reset": [(110, 1.0, 0.0, 0.0), (180, 0.0, 1.0, 0.0), (160, 0.0, 0.0, 1.0)],
"front": [(-90, 1.0, 0, 0)],
"back": [(-90, 1.0, 0, 0), (180, 0, 0, 1.0)],
"left": [(-90, 1.0, 0, 0), (90, 0, 0, 1.0)],
"right": [(-90, 1.0, 0, 0), (-90, 0, 0, 1.0)],
"top": [],
"bottom": [(180, 1.0, 0, 0)],
}
def gtkgl_functionwrapper(function):
def decorated(self, widget, *args, **kwords):
gldrawable=widget.get_gl_drawable()
glcontext=widget.get_gl_context()
if not gldrawable.gl_begin(glcontext):
return
function(self, widget, *args, **kwords)
gldrawable.gl_end()
return decorated # TODO: make this a well behaved decorator (keeping name, docstring etc)
class GLView:
def __init__(self, gui, settings):
# assume, that initialization will fail
self.enabled = False
try:
import gtk.gtkgl
except ImportError:
return
self.enabled = True
self.settings = settings
self.scale = 1
self.model_paint_func = None
self.gui = gui
self.window = self.gui.get_object("view3dwindow")
self.window.set_size_request(400,400)
self.window.connect("destroy", lambda widget, data=None: self.window.destroy())
self.container = self.gui.get_object("view3dbox")
self.gui.get_object("Reset View").connect("clicked", self.rotate_view, VIEW_ROTATIONS["reset"])
self.gui.get_object("Left View").connect("clicked", self.rotate_view, VIEW_ROTATIONS["left"])
self.gui.get_object("Right View").connect("clicked", self.rotate_view, VIEW_ROTATIONS["right"])
self.gui.get_object("Front View").connect("clicked", self.rotate_view, VIEW_ROTATIONS["front"])
self.gui.get_object("Back View").connect("clicked", self.rotate_view, VIEW_ROTATIONS["back"])
self.gui.get_object("Top View").connect("clicked", self.rotate_view, VIEW_ROTATIONS["top"])
self.gui.get_object("Bottom View").connect("clicked", self.rotate_view, VIEW_ROTATIONS["bottom"])
# OpenGL stuff
glconfig = gtk.gdkgl.Config(mode=gtk.gdkgl.MODE_RGB|gtk.gdkgl.MODE_DEPTH|gtk.gdkgl.MODE_DOUBLE)
self.area = gtk.gtkgl.DrawingArea(glconfig)
self.area.set_size_request(400,400)
# first run; might also be important when doing other fancy gtk/gdk stuff
self.area.connect_after('realize', self._realize)
# called when a part of the screen is uncovered
self.area.connect('expose_event', self._expose_event)
# resize window
self.area.connect('configure_event', self._resize_window)
self.area.show()
self.container.add(self.area)
self.container.show()
self.window.show()
def glsetup(self):
#glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)
#glEnable(GL_TEXTURE_2D)
#glEnable(GL_BLEND)
#glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
glutInit()
glShadeModel(GL_FLAT)
glMatrixMode(GL_MODELVIEW)
glMaterial(GL_FRONT_AND_BACK, GL_AMBIENT, (0.1, 0.1, 0.1, 1.0))
glMaterial(GL_FRONT_AND_BACK, GL_SPECULAR, (0.1, 0.1, 0.1, 1.0))
glMaterial(GL_FRONT_AND_BACK, GL_SHININESS, (0.5))
def draw_string(self, x, y, z, p, s, scale=.01):
glPushMatrix()
glTranslatef(x,y,z)
if p == 'xy':
pass
elif p == 'yz':
glRotatef(90, 0, 1, 0)
glRotatef(90, 0, 0, 1)
elif p == 'xz':
glRotatef(90, 0, 1, 0)
glRotatef(90, 0, 0, 1)
glRotatef(-90, 0, 1, 0)
glScalef(scale,scale,scale)
for c in str(s):
glutStrokeCharacter(GLUT_STROKE_ROMAN, ord(c))
glPopMatrix()
def paint(self):
glTranslatef(0,0,-2)
if self.settings["Unit"]() == "mm":
size = 100
else:
size = 5
bounds = self.settings["bounds"]
# axes
glBegin(GL_LINES)
glColor3f(1,0,0)
glVertex3f(0,0,0)
glVertex3f(size,0,0)
glEnd()
self.draw_string(size,0,0,'xy',"X")
glBegin(GL_LINES)
glColor3f(0,1,0)
glVertex3f(0,0,0)
glVertex3f(0,size,0)
glEnd()
self.draw_string(0,size,0,'yz',"Y")
glBegin(GL_LINES)
glColor3f(0,0,1)
glVertex3f(0,0,0)
glVertex3f(0,0,size)
glEnd()
self.draw_string(0,0,size,'xz',"Z")
# stock model
minx = float(bounds["minx"])
maxx = float(bounds["maxx"])
miny = float(bounds["miny"])
maxy = float(bounds["maxy"])
minz = float(bounds["minz"])
maxz = float(bounds["maxz"])
glBegin(GL_LINES)
glColor3f(0.3,0.3,0.3)
glVertex3f(minx, miny, minz)
glVertex3f(maxx, miny, minz)
glVertex3f(minx, maxy, minz)
glVertex3f(maxx, maxy, minz)
glVertex3f(minx, miny, maxz)
glVertex3f(maxx, miny, maxz)
glVertex3f(minx, maxy, maxz)
glVertex3f(maxx, maxy, maxz)
glVertex3f(minx, miny, minz)
glVertex3f(minx, maxy, minz)
glVertex3f(maxx, miny, minz)
glVertex3f(maxx, maxy, minz)
glVertex3f(minx, miny, maxz)
glVertex3f(minx, maxy, maxz)
glVertex3f(maxx, miny, maxz)
glVertex3f(maxx, maxy, maxz)
glVertex3f(minx, miny, minz)
glVertex3f(minx, miny, maxz)
glVertex3f(maxx, miny, minz)
glVertex3f(maxx, miny, maxz)
glVertex3f(minx, maxy, minz)
glVertex3f(minx, maxy, maxz)
glVertex3f(maxx, maxy, minz)
glVertex3f(maxx, maxy, maxz)
glEnd()
# draw the model
glColor3f(0.5,.5,1)
self.model_paint_func()
# draw the toolpath
self.settings["toolpath_repaint_func"]()
def _gl_clear(self):
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)
def _gl_finish(self):
self.area.get_gl_drawable().swap_buffers()
@gtkgl_functionwrapper
def _realize(self, widget):
self.glsetup()
@gtkgl_functionwrapper
def _expose_event(self, widget, event):
self._gl_clear()
self.paint()
self._gl_finish()
def rotate_view(self, widget=None, rotation=None):
self._gl_clear()
glMatrixMode(GL_MODELVIEW)
glLoadIdentity()
glScalef(self.scale,self.scale,self.scale)
if rotation:
for one_rot in rotation:
glRotatef(*one_rot)
self.paint()
self._gl_finish()
def reset_view(self):
self.rotate_view(rotation=VIEW_ROTATIONS["reset"])
def set_scale(self, value):
self.scale = value
def set_model_paint_func(self, func):
self.model_paint_func = func
@gtkgl_functionwrapper
def _resize_window(self, widget, data=None):
glViewport(0, 0, widget.allocation.width, widget.allocation.height)
class ProjectGui:
def __init__(self, master=None):
self.gui = gtk.Builder()
self.gui.add_from_file(GTKBUILD_FILE)
self.window = self.gui.get_object("ProjectWindow")
# file loading
self.file_selector = self.gui.get_object("File chooser")
self.file_selector.connect("file-set",
self.load_model_file, self.file_selector.get_filename)
self.window.connect("destroy", self.destroy)
self.window.show()
self.model = None
self.toolpath = None
# add some dummies - to be implemented later ...
self.settings = {
"bounds": {
"minx": 0,
"miny": 0,
"minz": 0,
"maxx": 7,
"maxy": 7,
"maxz": 2,
},
"Unit": lambda: "mm",
"toolpath_repaint_func": self.draw_toolpath,
}
def draw_toolpath(self):
if self.toolpath:
last = None
for path in self.toolpath:
if last:
glColor3f(.5,1,.5)
glBegin(GL_LINES)
glVertex3f(last.x,last.y,last.z)
last = path.points[0]
glVertex3f(last.x,last.y,last.z)
glEnd()
glColor3f(1,.5,.5)
glBegin(GL_LINE_STRIP)
for point in path.points:
glVertex3f(point.x,point.y,point.z)
glEnd()
last = path.points[-1]
def destroy(self, widget, data=None):
gtk.main_quit()
def load_model_file(self, widget=None, filename=None):
if not filename:
return
# evaluate "filename" after showing the dialog above - then we will get the new value
if callable(filename):
filename = filename()
self.model = pycam.Importers.STLImporter.ImportModel(filename)
# do the gl initialization
self.view3d = GLView(self.gui, self.settings)
if self.model and self.view3d.enabled:
# why "2.0"?
self.view3d.set_scale(2.0/self.model.maxsize())
self.view3d.set_model_paint_func(self.model.to_OpenGL)
self.view3d.reset_view()
def main(self):
gtk.main()
if __name__ == "__main__":
gui = ProjectGui()
if len(sys.argv) > 1:
gui.load_model_file(None, sys.argv[1])
gui.main()
<?xml version="1.0"?>
<interface>
<!-- interface-requires gtk+ 2.12 -->
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="ProjectWindow">
<property name="destroy_with_parent">True</property>
<child>
<object class="GtkNotebook" id="Tasks">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkVBox" id="model setup">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkFrame" id="File Selection">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<object class="GtkFileChooserButton" id="File chooser">
<property name="visible">True</property>
<property name="create_folders">False</property>
<property name="width_chars">30</property>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="File Selection Frame">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Load Model File&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHSeparator" id="hseparator1">
<property name="visible">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="Transform">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<object class="GtkTable" id="Transformations">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">3</property>
<property name="column_spacing">4</property>
<property name="row_spacing">2</property>
<child>
<object class="GtkVButtonBox" id="rotate directions">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkRadioButton" id="x-axis">
<property name="label" translatable="yes">x-axis</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="y-axis">
<property name="label" translatable="yes">y-axis</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="group">x-axis</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="z-axis">
<property name="label" translatable="yes">z-axis</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="group">x-axis</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkVButtonBox" id="flip directions">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkRadioButton" id="xy">
<property name="label" translatable="yes">xy-plane</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="xz">
<property name="label" translatable="yes">xz-plane</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="group">xy</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="yz">
<property name="label" translatable="yes">yz-plane</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="group">xy</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<object class="GtkVButtonBox" id="swap directions">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkRadioButton" id="x &lt;-&gt; y">
<property name="label" translatable="yes">x &lt;-&gt; y</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="x &lt;-&gt; z">
<property name="label" translatable="yes">x &lt;-&gt; z</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="group">x &lt;-&gt; y</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="y &lt;-&gt; z">
<property name="label" translatable="yes">y &lt;-&gt; z</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="group">x &lt;-&gt; y</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="Rotate">
<property name="label" translatable="yes">Rotate</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkButton" id="Flip">
<property name="label" translatable="yes">Flip</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkButton" id="Swap">
<property name="label" translatable="yes">Swap</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="Label Transform Model">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Transform Model&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkHSeparator" id="hseparator2">
<property name="visible">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="Scaling and Shifting">
<property name="visible">True</property>
<property name="spacing">4</property>
<child>
<object class="GtkFrame" id="Scale">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="yalign">1</property>
<property name="yscale">0</property>
<property name="top_padding">4</property>
<property name="left_padding">8</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<child>
<object class="GtkSpinButton" id="Scale factor">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x2022;</property>
<property name="width_chars">4</property>
<property name="adjustment">scale factor</property>
<property name="climb_rate">1</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="scale up">
<property name="label" translatable="yes">Enlage</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="scale down">
<property name="label" translatable="yes">Shrink</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="Scale frame">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Scale Model&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="Shift Model Frame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="yalign">1</property>
<property name="yscale">0</property>
<property name="left_padding">8</property>
<child>
<object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="n_rows">3</property>
<property name="n_columns">2</property>
<property name="column_spacing">2</property>
<property name="row_spacing">1</property>
<child>
<object class="GtkSpinButton" id="shift_x">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x2022;</property>
<property name="width_chars">5</property>
<property name="adjustment">shift-x</property>
<property name="digits">1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="shift_y">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x2022;</property>
<property name="width_chars">5</property>
<property name="adjustment">shift-y</property>
<property name="digits">1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="shift_z">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x2022;</property>
<property name="width_chars">5</property>
<property name="adjustment">shift-z</property>
<property name="digits">1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="shift_x_label">
<property name="visible">True</property>
<property name="label" translatable="yes">x:</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="shift_y_label">
<property name="visible">True</property>
<property name="label" translatable="yes">y:</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="shift_z_label">
<property name="visible">True</property>
<property name="label" translatable="yes">z:</property>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="Shift Model">
<property name="label" translatable="yes">Shift</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="Shift To Origin">
<property name="label" translatable="yes">To Origin</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="Shift Model Label">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Move Origin&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="Borders">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
<property name="left_padding">8</property>
<child>
<object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkTable" id="table2">
<property name="visible">True</property>
<property name="n_rows">4</property>
<property name="n_columns">3</property>
<property name="column_spacing">1</property>
<property name="row_spacing">1</property>
<child>
<object class="GtkSpinButton" id="spinbutton1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x2022;</property>
<property name="width_chars">4</property>
<property name="digits">2</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spinbutton5">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x2022;</property>
<property name="width_chars">4</property>
<property name="digits">2</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spinbutton4">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x2022;</property>
<property name="width_chars">4</property>
<property name="digits">2</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spinbutton6">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x2022;</property>
<property name="width_chars">4</property>
<property name="digits">2</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spinbutton3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x2022;</property>
<property name="width_chars">4</property>
<property name="digits">2</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spinbutton2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x2022;</property>
<property name="width_chars">4</property>
<property name="digits">2</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="z label">
<property name="visible">True</property>
<property name="label" translatable="yes">z:</property>
<property name="width_chars">2</property>
</object>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="y label">
<property name="visible">True</property>
<property name="label" translatable="yes">y:</property>
<property name="width_chars">2</property>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="max label">
<property name="visible">True</property>
<property name="label" translatable="yes">max</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="x label">
<property name="visible">True</property>
<property name="label" translatable="yes">x:</property>
<property name="width_chars">2</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="min label">
<property name="visible">True</property>
<property name="label" translatable="yes">min</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<child>
<object class="GtkButton" id="Reset bounds">
<property name="label" translatable="yes">Reset</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="Apply bounds">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="Boundaries Label">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Define Bounds&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">4</property>
</packing>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="Model Settings">
<property name="visible">True</property>
<property name="label" translatable="yes">Model</property>
<property name="use_markup">True</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment6">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<placeholder/>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;frame1&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="Tools">
<property name="visible">True</property>
<property name="label" translatable="yes">Tools</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment7">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<placeholder/>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;frame2&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="Processing">
<property name="visible">True</property>
<property name="label" translatable="yes">Processing</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab_fill">False</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkAdjustment" id="scale factor">
<property name="value">10</property>
<property name="lower">0.001</property>
<property name="upper">1000</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
<property name="page_size">10</property>
</object>
<object class="GtkAdjustment" id="shift-x">
<property name="lower">-1000</property>
<property name="upper">1000</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
<property name="page_size">10</property>
</object>
<object class="GtkAdjustment" id="shift-y">
<property name="lower">-1000</property>
<property name="upper">1000</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
<property name="page_size">10</property>
</object>
<object class="GtkAdjustment" id="shift-z">
<property name="lower">-1000</property>
<property name="upper">1000</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
<property name="page_size">10</property>
</object>
<object class="GtkWindow" id="view3dwindow">
<child>
<object class="GtkVBox" id="view3dbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkToolbar" id="View Controls">
<property name="visible">True</property>
<property name="toolbar_style">both</property>
<child>
<object class="GtkToolButton" id="Reset View">
<property name="visible">True</property>
<property name="label" translatable="yes">Reset</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="Front View">
<property name="visible">True</property>
<property name="label" translatable="yes">Front</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="Back View">
<property name="visible">True</property>
<property name="label" translatable="yes">Back</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="Left View">
<property name="visible">True</property>
<property name="label" translatable="yes">Left</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="Right View">
<property name="visible">True</property>
<property name="label" translatable="yes">Right</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="Top View">
<property name="visible">True</property>
<property name="label" translatable="yes">Top</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="Bottom View">
<property name="visible">True</property>
<property name="label" translatable="yes">Bottom</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>
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