Commit 62934e96 authored by sumpfralle's avatar sumpfralle

fixed careless migration of the path generator code

git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@338 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 0bf820b0
...@@ -78,7 +78,7 @@ def generate_toolpath(model, tool_settings=None, bounds=None, direction="x", ...@@ -78,7 +78,7 @@ def generate_toolpath(model, tool_settings=None, bounds=None, direction="x",
if isinstance(cutter, basestring): if isinstance(cutter, basestring):
return cutter return cutter
cutter.set_required_distance(material_allowance) cutter.set_required_distance(material_allowance)
physics = _get_physics(cutter, calculation_backend) physics = _get_physics(model, cutter, calculation_backend)
if isinstance(physics, basestring): if isinstance(physics, basestring):
return physics return physics
generator = _get_pathgenerator_instance(model, cutter, path_generator, path_postprocessor, material_allowance, safety_height, physics) generator = _get_pathgenerator_instance(model, cutter, path_generator, path_postprocessor, material_allowance, safety_height, physics)
...@@ -144,7 +144,7 @@ def _get_pathgenerator_instance(model, cutter, pathgenerator, pathprocessor, ...@@ -144,7 +144,7 @@ def _get_pathgenerator_instance(model, cutter, pathgenerator, pathprocessor,
else: else:
return "Invalid path generator (%s): not one of %s" % (pathgenerator, PATH_GENERATORS) return "Invalid path generator (%s): not one of %s" % (pathgenerator, PATH_GENERATORS)
def _get_physics(cutter, calculation_backend): def _get_physics(model, cutter, calculation_backend):
if calculation_backend is None: if calculation_backend is None:
# triangular collision detection does not need any physical model # triangular collision detection does not need any physical model
return None return None
......
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