Skip to content

Extract BaseSegmentElement to eliminate p1/p2 and checkRayIntersection duplication - #8

Merged
veillette merged 1 commit into
mainfrom
claude/add-base-segment-element-aZada
Mar 17, 2026
Merged

veillette merged 1 commit into
mainfrom
claude/add-base-segment-element-aZada

Conversation

@veillette

Copy link
Copy Markdown
Collaborator

All seven segment-based optical elements (SegmentMirror, IdealCurvedMirror,
BeamSplitterElement, LineBlocker, TransmissionGrating, ReflectionGrating,
IdealLens) now extend BaseSegmentElement, which provides the shared p1/p2
fields and a default checkRayIntersection that returns a facing-ray normal.
IdealLens overrides checkRayIntersection to return an unflipped normal
required by the thin-lens equation. BaseSegmentElement is also exported
from the model barrel.

https://claude.ai/code/session_01XupECav2ryRD9DbMWgwxei

…n duplication

All seven segment-based optical elements (SegmentMirror, IdealCurvedMirror,
BeamSplitterElement, LineBlocker, TransmissionGrating, ReflectionGrating,
IdealLens) now extend BaseSegmentElement, which provides the shared p1/p2
fields and a default checkRayIntersection that returns a facing-ray normal.
IdealLens overrides checkRayIntersection to return an unflipped normal
required by the thin-lens equation. BaseSegmentElement is also exported
from the model barrel.

https://claude.ai/code/session_01XupECav2ryRD9DbMWgwxei
@veillette
veillette merged commit 442cafe into main Mar 17, 2026
1 check failed
@veillette
veillette deleted the claude/add-base-segment-element-aZada branch March 17, 2026 12:56
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