From d827ee62d762eb47ef42e20b82251d32a3479c56 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 22 Jun 2021 12:23:31 -0400 Subject: [PATCH] Catch poissonrecon run exceptions --- opendm/mesh.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/opendm/mesh.py b/opendm/mesh.py index 5af3d395..51632fb2 100644 --- a/opendm/mesh.py +++ b/opendm/mesh.py @@ -168,17 +168,20 @@ def screened_poisson_reconstruction(inPointCloud, outMesh, depth = 8, samples = } # Run PoissonRecon - system.run('"{bin}" --in "{infile}" ' - '--out "{outfile}" ' - '--depth {depth} ' - '--pointWeight {pointWeight} ' - '--samplesPerNode {samples} ' - '--threads {threads} ' - '--maxMemory {memory} ' - '--bType 2 ' - '--linearFit ' - '{verbose}'.format(**poissonReconArgs)) - + try: + system.run('"{bin}" --in "{infile}" ' + '--out "{outfile}" ' + '--depth {depth} ' + '--pointWeight {pointWeight} ' + '--samplesPerNode {samples} ' + '--threads {threads} ' + '--maxMemory {memory} ' + '--bType 2 ' + '--linearFit ' + '{verbose}'.format(**poissonReconArgs)) + except Exception as e: + log.ODM_WARNING(str(e)) + if os.path.isfile(outMeshDirty): break # Done! else: