Path: Add Property to Job for geometry tolerance

This commit is contained in:
Ian Rees
2017-04-02 18:52:00 +12:00
parent 78d8272d77
commit c913481ec1
5 changed files with 57 additions and 10 deletions

View File

@@ -306,8 +306,15 @@ class ObjectSurface:
mesh = mesh.Mesh
bb = mesh.BoundBox
else:
bb = mesh.Shape.BoundBox
# try/except is for Path Jobs created before GeometryTolerance
try:
deflection = parentJob.GeometryTolerance
except AttributeError:
from PathScripts.PathPreferences import PathPreferences
deflection = PathPreferences.defaultGeometryTolerance()
mesh = MeshPart.meshFromShape(mesh.Shape, MaxLength=2)
bb = mesh.Shape.BoundBox
s = ocl.STLSurf()
for f in mesh.Facets: