Commit 6c1bcd63 authored by sumpfralle's avatar sumpfralle

disable the lower z boundary for contour models

improve the model type detection for toolpath generation


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@1007 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 91fb9e4c
...@@ -1195,6 +1195,9 @@ class ProjectGui: ...@@ -1195,6 +1195,9 @@ class ProjectGui:
is_projectable = (not self.model is None) \ is_projectable = (not self.model is None) \
and hasattr(self.model, "get_waterline_contour") and hasattr(self.model, "get_waterline_contour")
self.gui.get_object("Projection2D").set_sensitive(is_projectable) self.gui.get_object("Projection2D").set_sensitive(is_projectable)
# disable the lower boundary for contour models
is_contour = isinstance(self.model, pycam.Geometry.Model.ContourModel)
self.gui.get_object("boundary_z_low").set_sensitive(not is_contour)
def update_ode_settings(self, widget=None): def update_ode_settings(self, widget=None):
if pycam.Utils.threading.is_multiprocessing_enabled() \ if pycam.Utils.threading.is_multiprocessing_enabled() \
......
...@@ -137,14 +137,14 @@ def generate_toolpath(model, tool_settings=None, ...@@ -137,14 +137,14 @@ def generate_toolpath(model, tool_settings=None,
minx, miny, minz = [number(value) for value in bounds_low] minx, miny, minz = [number(value) for value in bounds_low]
maxx, maxy, maxz = [number(value) for value in bounds_high] maxx, maxy, maxz = [number(value) for value in bounds_high]
# trimesh model or contour model? # trimesh model or contour model?
if isinstance(model, pycam.Geometry.Model.Model): if isinstance(model, pycam.Geometry.Model.ContourModel):
# trimesh model
trimesh_models = [model]
contour_model = None
else:
# contour model # contour model
trimesh_models = [] trimesh_models = []
contour_model = model contour_model = model
else:
# trimesh model
trimesh_models = [model]
contour_model = None
# Due to some weirdness the height of the drill must be bigger than the # Due to some weirdness the height of the drill must be bigger than the
# object's size. Otherwise some collisions are not detected. # object's size. Otherwise some collisions are not detected.
cutter_height = 4 * abs(maxz - minz) cutter_height = 4 * abs(maxz - minz)
......
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