Repository navigation
Conversation
Display only, no change to the simulated neutrons: - ESS blue (#0099dc, from the ess.eu logo) as base pen colour, dark grey proton-beam arrow. - The 2 m "empty zone" and 5.5 m target-monolith circles (3 rings each) become open, lid-less vertical cylinder walls of 36 polygons. - The butterfly is drawn last: light-blue cold wings, red thermal boxes, yellow emission planes (also the extra TBL cold-wing plane). At --trace=2 the cold and thermal moderators are also shown as closed, shaded solids (new butterfly_prism() polyhedron helper; --trace=1 keeps the outlines only). - The beamline loop now uses its own rotation variables instead of overwriting the Br11..Br22 moderator rotation, which the butterfly outline relies on now that it is drawn after that loop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Draw the proton-beam arrow as a line and a cone (as in Arm) instead of three lines, 13.7 cm below the moderator plane, so the arrowhead tip sits under the moderator centre rather than inside the moderator assembly. Display only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Proton-beam arrow shaft is now a 1 cm radius cylinder (was a line). - The ESS emblem (digitised from the ess.eu logo-small.svg: 7 contours, 439 points, 437 cap triangles) is drawn in ESS blue where the target wheel sits: at proton-beam level, 2.6 m diameter, 8 cm thick, its rim at the beam impact point and centred downstream of it. Solid at --trace=2, outlines at --trace=1. - butterfly_prism() now builds on a general butterfly_solid() slab writer shared with the emblem; the moderator solids are unchanged. Display only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- New setting parameter logo=1: 0 suppresses the ESS emblem in MCDISPLAY. - Emblem centre moved from 1.3 m to 1.138 m downstream of the beam impact point, so the proton-beam arrowhead sits inside the nearest swoosh with a 2 cm margin (2.5 cm measured clearance in all sectors). - Add share/ESS_butterfly-logo.py, which digitises the ess.eu emblem SVG and rewrites the generated block (now between BEGIN/END markers) in ESS_butterfly-geometry.c, with --dry-run and --preview. Re-running it reproduces the committed data exactly. Display only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
willend
marked this pull request as draft
October 31, 2026 13:07
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.








Display-only update of the
ESS_butterflysource's MCDISPLAY (inESS_butterfly.compandshare/ESS_butterfly-geometry.c). Nothing in INITIALIZE/TRACE changes, so simulated results are unaffected.Changes
#0099dcas the base pen colour (from the logo SVG on ess.eu,/themes/custom/ess/logo.svg), and a dark grey (#a9a9a9) proton-beam arrow. The arrow is now drawn in the style ofArm, as a line plus acone, 13.7 cm below the moderator plane, so the arrowhead tip sits under the moderator centre instead of inside the moderator assembly. The shaft is a 1 cm radius cylinder.themes/custom/ess/graphics/logo-small.svg(7 contours, 439 points, 437 cap triangles; ear-clipped offline, with the triangle area checked against the contour area). It is drawn in ESS blue at proton-beam level: 2.6 m in diameter (the ESS figure for the wheel) and 8 cm thick (the tungsten brick height). Its centre is 1.138 m downstream of the beam impact point, so the arrowhead sits inside the nearest swoosh with a 2 cm margin (2.5 cm measured clearance in all sectors tested). It reads correctly seen from above, with the letters' up direction along the proton beam. Solid at--trace=2, outlines at--trace=1. Its polyhedron uses the samebutterfly_solid()writer as the moderator solids. A new setting parameterlogo=1controls it, andlogo=0suppresses it. The ESS logo is (c) ESS, all rights reserved. This is stated in the component header (%D, rendered by mcdoc) and in the comment above the generated logo data, and the digitiser script writes it with every regeneration.share/ESS_butterfly-logo.pyregenerates the emblem data block (between BEGIN/END markers inESS_butterfly-geometry.c) from the SVG. It has--dry-runand--previewoptions and checks that the triangle area equals the contour area. Re-running it reproduces the committed data exactly.mcdis_polygonrectangles. The built-incylinderprimitive always draws lids.#66ccff) cold wings, red thermal boxes and yellow emission planes, including the extra TBL cold-wing plane. Cold vs. thermal is taken from the emission geometry: the cold plane at 24.24° runs along the lobes, and the thermal plane spans the notch opening.--trace=2: the newbutterfly_prism()helper emits each moderator as one closed triangle-meshmcdis_polyhedron. Each non-convex outline is split into convex pieces for the top and bottom faces. Nothing extra is drawn at--trace=1.Br11..Br22moderator rotation, which the butterfly outline needs now that it is drawn after that loop.Testing (macOS arm64, clang)
mcrun --trace=2 -n 0with a minimal test instrument, after deleting the generated .c. For N1, N7, S3, E5, W2 and W11 (TBL), every line segment matches the previous version exactly, except the proton-beam arrow (3 lines at y = 0 become 1 line plus a cone at y = −0.137 m). The only other additions are the 72 wall polygons, the 3 moderator solids and the emblem.mcdisplay-webgl-classic: all walls and solids are Lambert-shaded surfaces in the expected colours.--trace=1emits outlines only.-Wall -Wextra.logo=0removes exactly the emblem (1 polyhedron at--trace=2, 439 outline segments at--trace=1).ESS_butterfly_testruns with the new component (mcrun -n 10000).Not tested: Linux, Windows/MSVC, the new webgl frontend in a browser, and the matplotlib/pyqtgraph frontends at
--trace=2. The display code is excluded from OpenACC builds.🤖 Generated with Claude Code