Skip to content

fix: UAT session 1 — rendering, validation, and interaction fixes#6

Merged
kraulerson merged 5 commits intomainfrom
fix/uat-session-1
Apr 7, 2026
Merged

fix: UAT session 1 — rendering, validation, and interaction fixes#6
kraulerson merged 5 commits intomainfrom
fix/uat-session-1

Conversation

@kraulerson
Copy link
Copy Markdown
Owner

Summary

  • VTK rendering fixed: Import vtkRenderingOpenGL2 to register OpenGL factory, defer Initialize() to showEvent for valid GL context
  • Data validation: Reject NaN/Inf vertices and out-of-bounds face indices before passing to VTK
  • Interaction style: Set trackball camera (FRD requirement) instead of VTK's default joystick mode
  • Error handling: Clear viewport on load error, guard against re-entrant loading, wrap VTK calls in try/except
  • Entry point: Add __main__.py for python -m meshscope

Tests: 123 → 153 (+30 new). All 10 manual UAT scenarios pass.

Test plan

  • All 153 automated tests pass
  • Manual UAT: File > Open for STL, OBJ, PLY, 3MF
  • Manual UAT: Drag-and-drop loading
  • Manual UAT: Keyboard shortcuts (W, S, F)
  • Manual UAT: Mouse orbit/pan/zoom (trackball)
  • Manual UAT: Error recovery (corrupt file clears viewport)
  • Manual UAT: CLI loading (python -m meshscope <file>)

🤖 Generated with Claude Code

Karl Raulerson and others added 5 commits April 7, 2026 07:44
Address 4 findings from UAT testing of Features 1-2:

- CRIT-2: Validate face indices reference existing vertices after trimesh parse
- CRIT-3: Reject meshes with NaN or Inf vertex coordinates
- CRIT-4: Wrap VTK operations in try/except to prevent crashes on degenerate geometry
- HIGH-11: Add _is_loading guard to prevent re-entrant file loading via processEvents()

Also adds 22 new tests: drag-drop loading, keyboard shortcut verification,
degenerate geometry resilience, and data validation coverage (123 → 145 tests).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VTK Initialize() was called during ViewportWidget.__init__() before the
widget had a valid OpenGL context, resulting in a dead render context that
never displayed meshes. Deferred to showEvent/first vtk_render call.

Also adds __main__.py to enable `python -m meshscope`.

Includes regression tests for both fixes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VTK requires explicit import of vtkRenderingOpenGL2 and
vtkInteractionStyle to register its rendering factory. Without these,
VTK creates actors and mappers but renders nothing — empty windows
with just the background color.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When a file load fails after a successful load, the previous mesh
remained visible in the viewport. Now clears the scene and nulls
the document before showing the error state.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VTK's default vtkInteractorStyleSwitch uses joystick mode where holding
the mouse button causes continuous rotation. FRD requires trackball mode
where rotation follows mouse movement. Set vtkInteractorStyleTrackballCamera
explicitly during interactor initialization.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kraulerson kraulerson merged commit 64a5a45 into main Apr 7, 2026
2 of 5 checks passed
kraulerson pushed a commit that referenced this pull request Apr 8, 2026
Documentation artifact remediation: 10 new templates in templates/generated/,
UAT HTML template in templates/uat/, new artifact directories.

Process enforcement: process-checklist.sh state machine, pre-commit-gate.sh
commit gating, track-tool-usage.sh, updated session hooks and scripts.

Updated framework reference docs (builders-guide, governance, user-guide).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant