コード例 #1
0
def dynamic_scene(radiance_folder, model, outdoor, log_file):
    """Return dynamic scene."""
    try:
        folder = Folder(radiance_folder, model_folder=model)
        dynamic_scene = folder.dynamic_scene(not outdoor, reload=True)
        log_file.write(json.dumps(dynamic_scene))
    except Exception as e:
        _logger.exception('Failed to retrieve view files.\n{}'.format(e))
        sys.exit(1)
    else:
        sys.exit(0)
コード例 #2
0
def view_files(radiance_folder, model, log_file):
    """Return view files."""
    try:
        folder = Folder(radiance_folder, model_folder=model)
        view_files = folder.view_files()
        log_file.write(json.dumps(view_files))
    except Exception as e:
        _logger.exception('Failed to retrieve view files.\n{}'.format(e))
        sys.exit(1)
    else:
        sys.exit(0)
コード例 #3
0
def aperture_groups(radiance_folder, model, exterior, log_file):
    """Return aperture groups."""
    try:
        folder = Folder(radiance_folder, model_folder=model)
        aperture_groups = folder.aperture_groups(not exterior, reload=True)
        log_file.write(json.dumps(aperture_groups))
    except Exception as e:
        _logger.exception('Failed to retrieve view files.\n{}'.format(e))
        sys.exit(1)
    else:
        sys.exit(0)
コード例 #4
0
def grid_info_files(radiance_folder, model, log_file):
    """Return grid information files."""
    try:
        folder = Folder(radiance_folder, model_folder=model)
        grid_info_files = folder.grid_info_files()
        log_file.write(json.dumps(grid_info_files))
    except Exception as e:
        _logger.exception('Failed to retrieve grid information files.\n{}'.format(e))
        sys.exit(1)
    else:
        sys.exit(0)
コード例 #5
0
def scene_files(radiance_folder, model, default, log_file):
    """Return scene files."""
    try:
        folder = Folder(radiance_folder, model_folder=model)
        black_out = not default
        scene_files = folder.scene_files(black_out=black_out)
        log_file.write(json.dumps(scene_files))
    except Exception as e:
        _logger.exception('Failed to retrieve scene files.\n{}'.format(e))
        sys.exit(1)
    else:
        sys.exit(0)