Repository navigation
mcdisplay: filled surfaces at --trace=2 for McXtrace mirrors and capillary - #2955
Merged
willend merged 1 commit intoOct 31, 2026
Merged
Conversation
…llary Replace line-only MCDISPLAY with polygon() facets (cylinder() for Capillary), so --trace=2 shows surfaces; --trace=1 keeps outlines. optics: Capillary, Mirror (flat case), Mirror_curved, Mirror_elliptic, Mirror_parabolic, Mirror_toroid, Multilayer_elliptic. contrib: Mirror_toroid_pothole. Integer loops replace float accumulation: Multilayer_elliptic no longer draws one step past length, toroid mirrors no longer drop the last step. Display only, no change to simulation results. Co-Authored-By: Claude Opus 5.5 <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.
McXtrace counterpart of #2952 / #2953: components that only drew lines now emit
polygon()facets (cylinder()for Capillary), somcdisplay --trace=2shows surfaces. At--trace=1polygons fall back to closed multilines.optics: Capillary, Mirror (flat, non-OFF case), Mirror_curved, Mirror_elliptic, Mirror_parabolic, Mirror_toroid, Multilayer_elliptic
contrib: Mirror_toroid_pothole
Same surface formulas as the old line drawings. Integer loops replace float accumulation, which fixes two old display glitches: Multilayer_elliptic drew one step past
length, and the toroid mirrors dropped the last θ step (asymmetric in x).Display only: no change to TRACE / simulation results.
Tested (macOS arm64, clang):
mxrun --trace=2and--trace=1 -n 0on Test_Mirrors, Test_capillary, MAXIV_Bloch; per-component bounding boxes compared against the original components (match apart from the two fixes above); matplotlib frontend rendered. Not tested: Linux, Windows, GPU, webgl/pyqtgraph.🤖 Generated with Claude Code