Skip to content

feat: add Scale/Rotate/Mirror transforms#14

Merged
kraulerson merged 11 commits intomainfrom
feat/scale-rotate-mirror
Apr 8, 2026
Merged

feat: add Scale/Rotate/Mirror transforms#14
kraulerson merged 11 commits intomainfrom
feat/scale-rotate-mirror

Conversation

@kraulerson
Copy link
Copy Markdown
Owner

Summary

  • Add uniform scale, axis rotation, and axis mirror transforms with pure numpy (no trimesh dependency)
  • New TransformDialog with tabbed UI (Scale factor with live dimension preview, Rotate with axis/degrees, Mirror with axis selection)
  • Integrated into MainWindow: Ctrl+T shortcut, Edit menu, toolbar — full undo/redo support
  • New mesh_transform.py core module with _recompute_metadata helper for bounding box, surface area, and volume

Test Plan

  • 42 unit tests for transform functions (scale, rotate, mirror, metadata, normals)
  • 7 UI tests for MainWindow transform action integration
  • Full suite: 413 passed, 0 failed
  • mypy: 0 errors across 25 source files

🤖 Generated with Claude Code

Karl Raulerson and others added 11 commits April 7, 2026 23:57
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds mirror_mesh to mesh_transform.py: reflects vertices across the
model center plane on the given axis and swaps face winding columns 1/2
to maintain outward-facing normals. 10 new tests added, all passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…en rotate test

Uniform scaling preserves normal directions — copy instead of recomputing.
Rotate test now verifies actual vertex position, not just bounding box symmetry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use npt.NDArray[np.float32] and npt.NDArray[np.uint32] to satisfy
mypy type-arg and no-any-return checks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kraulerson kraulerson merged commit f2e1a55 into main Apr 8, 2026
2 of 5 checks passed
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