check the toolbit shape is valid

This commit is contained in:
Daniel Wood
2020-05-04 20:19:25 +01:00
parent f8e4222506
commit 9bdba32f54
2 changed files with 13 additions and 1 deletions

View File

@@ -134,6 +134,10 @@ class PathSimulation:
# handle tool bits
self.cutTool.Shape = self.tool.Shape
if not self.cutTool.Shape.isValid() or self.cutTool.Shape.isNull():
self.EndSimulation()
raise RuntimeError("Path Simulation: Error in tool geometry - {}".format(self.tool.Name))
self.cutTool.ViewObject.show()
self.voxSim.SetToolShape(self.cutTool.Shape, 0.05 * self.accuracy)
self.icmd = 0