Skip to content

UI: turn the editor into a sequential optical layout table#496

Open
dragonleopardpig wants to merge 7 commits intoDCC-Lab:masterfrom
dragonleopardpig:ui/editable-element-table
Open

UI: turn the editor into a sequential optical layout table#496
dragonleopardpig wants to merge 7 commits intoDCC-Lab:masterfrom
dragonleopardpig:ui/editable-element-table

Conversation

@dragonleopardpig
Copy link
Copy Markdown

@dragonleopardpig dragonleopardpig commented Apr 2, 2026

Summary

This PR improves the UI editor for sequential optical layouts and fixes several issues in the Object = Infinity workflow.

Main changes

  • make the element table editable with a constrained element-type selector
  • preserve the sequential optical layout model in the editor
  • protect special rows from invalid reordering:
    • Object
    • Image
    • the first real element when the object is at infinity
  • fix solver behavior for the image plane so the solved value is the relative image thickness
  • keep the finite image plane tied to the table state instead of silently replacing it with a solved back focal distance
  • fix plotting/runtime issues around infinity-object mode:
    • first lens remains at physical position 0
    • object arrow is drawn at the first negative x tick
    • that tick is relabeled to −∞
    • incoming collimated rays originate from that object-side tick
    • image position / image thickness / red image arrow stay aligned with the current table state

Result

For infinity-object setups, the display now follows a physically consistent axis model:

  • optical elements stay on their real coordinates
  • the first lens stays at 0
  • the object is represented on the object-side tick labeled −∞
  • the image plane shown in the plot and information panel matches the current editor state

Notes

This PR also removes stale display-offset behavior that caused incorrect plotting and runtime errors while editing.

Suggested update comment on the PR:

Updated this PR substantially on the same branch.

The current version focuses on fixing the infinity-object workflow in the editor: the first lens stays at physical position 0, the object is shown on the object-side tick labeled −∞, and the image plane handling now stays aligned with the table state.

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