shared.py 608 B

12345678910111213141516171819202122
  1. import pyigl as igl
  2. import sys
  3. TUTORIAL_SHARED_PATH = "../../tutorial/shared/"
  4. def check_dependencies(deps):
  5. available = [hasattr(igl, m) for m in deps]
  6. all_available = True
  7. for i, d in enumerate(available):
  8. if not d:
  9. all_available = False
  10. print("The libigl python bindings were compiled without %s support. Please recompile with the CMAKE flag LIBIGL_WITH_%s." %(deps[i], deps[i].upper()))
  11. if not all_available:
  12. sys.exit(-1)
  13. def print_usage(key_dict):
  14. print("Usage:")
  15. for k in key_dict.keys():
  16. print("%s : %s" %(k, key_dict[k]))