state-of-the-art/Handy3DScanner

[BUG] Triangle mode not properly working for newly opened PCD files

Opened this issue · 1 comments

Issue description:

When you in the TRIANGLES mode on edit tab, opening a pcd file and activate it - it's not displaying correctly.

Workaround is simple: just switch to POINTS mode and back to TRIANGLES mode.

Environment:

  • Application version: 0.4.0

Steps to reproduce:

  1. Open the app
  2. Go to Edit tab
  3. Switch to TRIANGLES mode
  4. Load some PCD file
  5. Activate it
  6. See that it's not displaying correctly

Expected behavior

Mode should be noticed by pointcloud and attach indices when it's TRIANGLES mode.

Screenshots

  • Opening/activating pcd in the TRIANGLES mode:
    Screenshot_20190623-133136
  • Switch to POINTS mode:
    Screenshot_20190623-133150
  • Switch to TRIANGLES mode:
    Screenshot_20190623-133155

Additional context

It's an issue with the indices - by default PCD files don't attaching indices buffer by default.

Fixed by adding a new option UI.Edit.display_mode that globally control the Edit POINTS/TRIANGLES mode and changed the logic of switching the indexes for pointclouds.