Commit e32de58c authored by sumpfralle's avatar sumpfralle

added a first draft of the GUI for simulation mode

fixed the "CTRL-C"-way of quitting the program


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@314 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent b06eba20
...@@ -267,13 +267,6 @@ def draw_bounding_box(minx, miny, minz, maxx, maxy, maxz, color): ...@@ -267,13 +267,6 @@ def draw_bounding_box(minx, miny, minz, maxx, maxy, maxz, color):
GL.glVertex3f(*(corner_pair[1])) GL.glVertex3f(*(corner_pair[1]))
GL.glEnd() GL.glEnd()
@keep_gl_mode
@keep_matrix
def draw_cutter(cutter, color):
if not cutter is None:
GL.glColor3f(*color)
cutter.to_OpenGL()
@keep_gl_mode @keep_gl_mode
@keep_matrix @keep_matrix
def draw_complete_model_view(settings): def draw_complete_model_view(settings):
...@@ -288,6 +281,12 @@ def draw_complete_model_view(settings): ...@@ -288,6 +281,12 @@ def draw_complete_model_view(settings):
float(settings.get("minz")), float(settings.get("maxx")), float(settings.get("minz")), float(settings.get("maxx")),
float(settings.get("maxy")), float(settings.get("maxz")), float(settings.get("maxy")), float(settings.get("maxz")),
settings.get("color_bounding_box")) settings.get("color_bounding_box"))
# draw the material (for simulation mode)
if settings.get("show_simulation"):
obj = settings.get("simulation_object")
if not obj is None:
GL.glColor3f(*settings.get("color_material"))
obj.to_OpenGL()
# draw the model # draw the model
if settings.get("show_model"): if settings.get("show_model"):
GL.glColor3f(*settings.get("color_model")) GL.glColor3f(*settings.get("color_model"))
...@@ -301,7 +300,10 @@ def draw_complete_model_view(settings): ...@@ -301,7 +300,10 @@ def draw_complete_model_view(settings):
settings.get("color_toolpath_return")) settings.get("color_toolpath_return"))
# draw the drill # draw the drill
if settings.get("show_drill_progress"): if settings.get("show_drill_progress"):
draw_cutter(settings.get("cutter"), settings.get("color_cutter")) cutter = settings.get("cutter")
if not cutter is None:
GL.glColor3f(*settings.get("color_cutter"))
cutter.to_OpenGL()
@keep_gl_mode @keep_gl_mode
@keep_matrix @keep_matrix
......
This diff is collapsed.
This diff is collapsed.
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