Skip to content

CLI Bugs #58

@faberno

Description

@faberno

Hey,
first of all thanks for this great library, it's a big help.
I wanted to report some bugs I encountered when using the CLI to reconstruct a mesh.

  • The tessellation-level option is called tessellation-ratio in the code. This fails when arguments.tessellation_ratio is called

    self.mesh.tessellation_ratio = float(arguments.tessellation_ratio)

    Quickfixing this by changing the line to arguments.tessellation_level allows the program to continue, but setting the tessellation to another value than 1.0 will cause a TypeError: Converting py args to operator properties: : keyword "apply_as" unrecognized in the mesh builder.

  • vmv.file does not have a function read_morphology_from_file

    loading_flag, cli_morphology = vmv.file.read_morphology_from_file(options=cli_options)

  • only cli_options.mesh.export_obj is used to determine if vmv.file.export_mesh_object should be called, this ignores for example export-vascular-mesh-stl

    if cli_options.mesh.export_obj:

  • vmv.file.export_mesh_object gets wrong arguments

    vmv.file.export_mesh_object(
    mesh_object, cli_options.io.meshes_directory, cli_morphology.name,
    cli_options.mesh.export_obj, cli_options.mesh.export_ply, cli_options.mesh.export_stl,
    cli_options.mesh.export_blend)

  • Even when mesh_objects from vmv.scene.get_list_of_meshes_in_scene() is just one mesh, it's still a list object

    mesh_objects = vmv.scene.get_list_of_meshes_in_scene()
    if len(mesh_objects) == 0:
    return
    elif len(mesh_objects) == 1:
    mesh_object = mesh_objects
    else:
    mesh_object = vmv.mesh.join_mesh_objects(mesh_objects, cli_morphology.name)

    I just fixed it by setting mesh_object = mesh_objects[0] when len(mesh_objects) == 1

When these points were fixed, everything worked as expected.
If you have any questions I can provide more accurate descriptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions