Skip to content

feat: Zernike flip buttons (X/Y/Z) and copy coefficients#43

Merged
JagermeisterLover merged 2 commits into
mainfrom
feature/zernike-flip-and-copy-buttons
May 5, 2026
Merged

feat: Zernike flip buttons (X/Y/Z) and copy coefficients#43
JagermeisterLover merged 2 commits into
mainfrom
feature/zernike-flip-and-copy-buttons

Conversation

@B0gdan4eg
Copy link
Copy Markdown
Collaborator

Summary

  • Flip around X: mirrors Zernike surface about the xz-plane (y -> -y). Negates all sine-type (Y) azimuthal terms.
  • Flip around Y: mirrors Zernike surface about the yz-plane (x -> -x). Negates odd-m cosine (X) and even-m sine (Y) terms.
  • Flip around Z: rotates surface 180 degrees about z-axis. Negates all odd-m terms (both X and Y).
  • Copy Coefficients: copies Z1-Z37 as tab-separated text to clipboard for Excel.

Each flip creates a new surface named ' (flipped around X)'. Radius of curvature is unchanged.

Files changed

  • src/utils/surfaceTransformations.js - 3 new pure functions
  • src/utils/surfaceOperationHandlers.js - 4 new handlers + clipboard
  • src/components/ui/SurfaceActionButtons.js - 4 new buttons (Zernike only)
  • src/components/panels/PropertiesPanel.js - new props
  • src/renderer-modular.js - import, closures, prop pass-through

B0gdan4eg and others added 2 commits May 5, 2026 11:20
For Zernike surfaces in the property panel, next to the existing
Invert button, add:

- Flip around X: mirrors the surface about the xz-plane (y → -y).
  Negates all sine-type (Y) azimuthal Zernike terms; leaves
  cosine-type (X) and spherical terms unchanged.
- Flip around Y: mirrors the surface about the yz-plane (x → -x).
  Negates odd-m cosine (X) terms and even-m sine (Y) terms.
- Flip around Z: rotates the surface 180° about the z-axis.
  Negates all odd-m terms (both X and Y components).

Each flip creates a new surface in the folder named after the
original with a suffix like '(flipped around X)'. Radius of
curvature is intentionally left unchanged.

- Copy Coefficients: copies Z1-Z37 values as tab-separated text
  to the clipboard for direct paste into Excel.

Files changed:
  src/utils/surfaceTransformations.js  — flipZernikeAroundX/Y/Z
  src/utils/surfaceOperationHandlers.js — handlers + clipboard
  src/components/ui/SurfaceActionButtons.js — 4 new buttons
  src/components/panels/PropertiesPanel.js — new props
  src/renderer-modular.js — import, closures, prop pass-through
@JagermeisterLover JagermeisterLover merged commit d81ae36 into main May 5, 2026
1 check passed
@JagermeisterLover JagermeisterLover deleted the feature/zernike-flip-and-copy-buttons branch May 9, 2026 17:09
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.

2 participants