From 09a4d0cdf692ab71cbb6aa2bf0f81db2ec05f892 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Wed, 25 May 2022 17:55:44 +0000 Subject: [PATCH] Always use entwine first --- opendm/entwine.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/opendm/entwine.py b/opendm/entwine.py index 265e4fd9..66361a9a 100644 --- a/opendm/entwine.py +++ b/opendm/entwine.py @@ -28,17 +28,13 @@ def build(input_point_cloud_files, output_path, max_concurrency=8, rerun=False): if rerun: dir_cleanup() - # On Windows we always use Untwine - if sys.platform == 'win32': + # Attempt with entwine (faster, more memory hungry) + try: + build_entwine(input_point_cloud_files, tmpdir, output_path, max_concurrency=max_concurrency) + except Exception as e: + log.ODM_WARNING("Cannot build EPT using entwine (%s), attempting with untwine..." % str(e)) + dir_cleanup() build_untwine(input_point_cloud_files, tmpdir, output_path, max_concurrency=max_concurrency) - else: - # Attempt with entwine (faster, more memory hungry) - try: - build_entwine(input_point_cloud_files, tmpdir, output_path, max_concurrency=max_concurrency) - except Exception as e: - log.ODM_WARNING("Cannot build EPT using entwine (%s), attempting with untwine..." % str(e)) - dir_cleanup() - build_untwine(input_point_cloud_files, tmpdir, output_path, max_concurrency=max_concurrency) if os.path.exists(tmpdir): shutil.rmtree(tmpdir)