def get_all_models(force=False): """Returns all models. Loads from a cache unless force is set to True""" all_model_file = os.path.join(CURDIR, ".all-models") if not force and os.path.isfile(all_model_file): return cPickle.load(open(all_model_file, 'r')) all_cdn_models = open3dhub.get_list(100000) cPickle.dump(all_cdn_models, open(all_model_file, 'w'), protocol=cPickle.HIGHEST_PROTOCOL) return all_cdn_models
def get_demo_models(force=False): """Returns demo models. Loads from a cache unless force is set to True""" demo_model_file = os.path.join(CURDIR, ".demo-models") if not force and os.path.isfile(demo_model_file): return cPickle.load(open(demo_model_file, 'r')) all_cdn_models = open3dhub.get_list(100000) demo_models = filter_for_demo(all_cdn_models) cPickle.dump(demo_models, open(demo_model_file, 'w'), protocol=cPickle.HIGHEST_PROTOCOL) return demo_models
def get_progressive_models(force=False): """Returns all models that have a progressive format.""" all_cdn_models = open3dhub.get_list(100000) progressive_models = filter_non_progressive(all_cdn_models) progressive_models = filter_bad_list(progressive_models) #progressive_models = filter_non_panda3d(progressive_models) progressive_models = filter_large_triangles(progressive_models) progressive_models = filter_too_complicated(progressive_models) progressive_models = filter_cityengine(progressive_models) return progressive_models