feat: add Measurement Tool (Feature 9)#19
Merged
kraulerson merged 20 commits intomainfrom Apr 9, 2026
Merged
Conversation
Framework upgrade artifact — living index of features built during Phase 2 construction, populated from design specs and git history. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ase 2 Framework upgrade artifact — covers all 8 features, 4 UAT sessions, security mitigations, and infrastructure established during construction. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Framework upgrade artifact — all 7 bugs from UAT session 4 documented with severity, status (all Fixed), and session summary table. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ADR-0001: Architecture selection (Python + PySide6 + VTK stack) ADR-0002: Python 3.13 version selection (3.14 compatibility chain failure) ADR-0003: Nuitka packaging with targeted --include-module for VTK ADR-0004: STL as primary mesh format Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All 7 init steps verified: remote repo, branch protection, CI pipeline, project scaffolding, data model, pre-commit hooks, final verification. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two documents covering the full public API: - mesh-operations.md: data types, loader, exporter, analysis, repair, transform - viewport.md: main window, viewport, info panel, transform dialog, VTK adapter Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Added: Engineering Principles (priority hierarchy + best practices), Artifact Locations, Process enforcement commands, Context Health Check, Phase 2 Completion Checkpoint, Phase 3-4 Documentation, UAT HTML template reference, Qdrant Persistent Memory section. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Added <!-- Last Updated --> freshness markers to all 16 sections, ADR cross-references in Section 3, UAT Plan table format, and revision history entry. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Records approval date, key architecture decisions, scope, risk assessment, and Phase 2 progress at time of snapshot. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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>
Dedicated measure mode (M key), point-to-point surface distance, 3-measurement FIFO cap, info panel display, vtkCellPicker ray-cast. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
vtkImplicitPlaneWidget2 for direct manipulation, floating overlay with X/Y/Z presets and Reset, vtkClipClosedSurface for interior fill with terracotta cap color, C key toggle. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Feature 9 (Measurement Tool): 8 tasks covering Measurement dataclass, MeasurementManager, vtkCellPicker ray-cast, info panel section, measure mode with event filter, FIFO replacement, invalidation. Feature 10 (Cross-Section Slice Plane): 8 tasks covering SlicePlaneManager with vtkClipClosedSurface, SliceOverlayWidget, vtkImplicitPlaneWidget2 interaction, preset positioning, Nuitka config. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…MeasurementManager
Task 1: Measurement frozen dataclass + compute_distance function
Task 2: MeshDocument.measurements list with add_measurement (3-max FIFO),
clear_measurements, and next_measurement_index (gap-filling)
Task 3: MeasurementManager creates VTK line + endpoint marker actors
with 3 colorblind-safe colors (amber, sky blue, light green)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tasks 4-6: - pick_surface_point using vtkCellPicker for ray-mesh intersection - show/hide measurements + pending point actor lifecycle in SceneManager - Measurements collapsible section in InfoPanel with color indicators, distance, and coordinates Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…o MainWindow Tasks 7-8: - M key toggle for dedicated measurement mode with crosshair cursor - Event filter on VTK interactor: click (not drag) places points - Qt-to-VTK Y-flip for correct ray-cast coordinates - Clear Measurements action in Edit menu - _invalidate_measurements called from transform, repair, undo, redo, load - 30 UI tests covering actions, mode toggle, clear, and invalidation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fixes mypy attr-defined errors — QEvent doesn't have button() or position(), but QMouseEvent does. isinstance check narrows the type. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verifies that non-QMouseEvent events (e.g., FocusIn) pass through the measure mode event filter without error. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Covers the fix: sort imports commit — verifies Measurement and MeshData are both importable from mesh_data module. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implementation
Measurementfrozen dataclass +compute_distanceinmesh_data.pyMeshDocumentextended withmeasurementslist, FIFO add, gap-filling indexMeasurementManagercreates VTK line + numbered endpoint actors (3 colorblind-safe colors)SceneManagergainspick_surface_point(vtkCellPicker), show/hide measurements, pending pointInfoPanelgains Measurements collapsible section with distance + coordinatesMainWindowgains measure mode toggle, QEvent filter on VTK interactor, Clear Measurements action, invalidation on transform/repair/undo/redo/loadTest plan
🤖 Generated with Claude Code