Commit 0b2f2d6d authored by sumpfralle's avatar sumpfralle

fixed the last layer of engraving

reset the model view after loading a new model


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@936 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 036a5028
...@@ -2800,6 +2800,8 @@ class ProjectGui: ...@@ -2800,6 +2800,8 @@ class ProjectGui:
self.model = model self.model = model
# do some initialization # do some initialization
self._update_all_model_attributes() self._update_all_model_attributes()
if self.model and self.view3d and self.view3d.enabled:
self.append_to_queue(self.view3d.reset_view)
return True return True
else: else:
return False return False
......
...@@ -140,8 +140,8 @@ class EngraveCutter: ...@@ -140,8 +140,8 @@ class EngraveCutter:
self.pa_drop.new_direction(0) self.pa_drop.new_direction(0)
self.pa_drop.new_scanline() self.pa_drop.new_scanline()
for line in line_group.get_lines(): for line in line_group.get_lines():
self.GenerateToolPathLineDrop(self.pa_drop, line, minz, last_z, self.GenerateToolPathLineDrop(self.pa_drop, line, minz, maxz,
horiz_step, draw_callback=draw_callback) horiz_step, last_z, draw_callback=draw_callback)
if progress_counter.increment(): if progress_counter.increment():
# quit requested # quit requested
quit_requested = True quit_requested = True
...@@ -208,8 +208,8 @@ class EngraveCutter: ...@@ -208,8 +208,8 @@ class EngraveCutter:
def GenerateToolPathLineDrop(self, pa, line, minz, maxz, horiz_step, def GenerateToolPathLineDrop(self, pa, line, minz, maxz, horiz_step,
draw_callback=None): previous_z, draw_callback=None):
if line.minz >= maxz: if line.minz >= previous_z:
# the line is not below maxz -> nothing to be done # the line is not below maxz -> nothing to be done
return return
pa.new_direction(0) pa.new_direction(0)
......
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