Reapply "Add dusk-view CI job and generate_svg scripts"#1107
Open
wdconinc wants to merge 3 commits into
Open
Conversation
This reverts commit b06c48f.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reintroduces a dusk/duskcut (OCCT-based) SVG visualization pipeline alongside the existing dawn-view pipeline, enabling vector renderings from STEP files without Geant4 simulation.
Changes:
- Adds
bin/make_dusk_viewsto run per-viewgenerate_svgscripts and collect SVG outputs. - Adds
scripts/view{1,3,6,7,11,13,50}/generate_svgscripts translating existing dawncut/dawn view logic to duskcut/dusk. - Extends CI (
linux-eic-shell.yml) withdusk-viewandmerge-dusk-viewjobs that build dusk from source and generate SVG artifacts fromconvert-to-stepoutputs.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/view1/generate_svg |
Adds dusk-based side/top SVG generation for view1. |
scripts/view3/generate_svg |
Adds dusk-based SVG generation for view3, including clipping commentary. |
scripts/view6/generate_svg |
Adds dusk-based multi-slice SVG generation for SiTracker endcap layers. |
scripts/view7/generate_svg |
Adds dusk-based SVG generation for two XY slices. |
scripts/view11/generate_svg |
Adds dusk-based tilted beamline slice SVG generation. |
scripts/view13/generate_svg |
Adds dusk-based forward-region SVG generation with clipping explanation. |
scripts/view50/generate_svg |
Adds dusk-based side/top full-detector views. |
bin/make_dusk_views |
New Python driver to run generate_svg scripts and copy SVG outputs. |
.github/workflows/linux-eic-shell.yml |
Adds dusk-view CI matrix job and merged SVG artifact job. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # Slice b: SiTracker Endcap layer 1 (205-225 mm) | ||
| duskcut 0 0 1 225 "${INPUT_FILE}" "${FILE_TAG}b_t0.stp" | ||
| duskcut 0 0 -1 -205 "${FILE_TAG}b_t0.stp" "${FILE_TAG}b.stp" |
|
|
||
| # Slice f: SiTracker Endcap layer 1 (200-225 mm) | ||
| duskcut 0 0 1 225 "${INPUT}" "${FILE_TAG}f_t0.stp" | ||
| duskcut 0 0 -1 -205 "${FILE_TAG}f_t0.stp" "${FILE_TAG}f.stp" |
Comment on lines
+24
to
+35
| # dawncut 0 0 -1 -5000 → plane -z-5000=0 → z=-5000, clips -z-5000>0 i.e. z<-5000 | ||
| # Wait: clips front side: 0*x+0*y+(-1)*z+(-5000)>0 → -z-5000>0 → z<-5000 | ||
| # Actually let me re-read: dawncut 0 0 -1 -5000 | ||
| # plane: -z + (-5000) = 0 → z = -5000, but that's wrong for "downstream of z=5000" | ||
| # From generate_eps comment: "everything downstream of z = 5 m" | ||
| # dawncut 0 0 -1 -5000: clips -z-5000 > 0 → -z > 5000 → z < -5000. Keeps z >= -5000. | ||
| # But "downstream" in EIC is hadron-going (+z). Hmm, dawncut convention: n=(0,0,-1), d=-5000. | ||
| # Plane: -z - 5000 = 0 → z = -5000. Keep: -z - 5000 ≤ 0 → z ≥ -5000. | ||
| # That keeps z ≥ -5000, i.e. everything except z < -5000. For EIC, ion beam goes in +z, | ||
| # so "downstream" = large +z. This view must keep the z > 5000 mm region. | ||
| # Let me trust the original script literal translation: duskcut 0 0 -1 -5000 | ||
| duskcut 0 0 -1 -5000 "${INPUT_FILE}" "${FILE_TAG}b.stp" |
5mm deflection handles real npdet_to_step STEP files (~20MB) in ~10s without OOM on CI runners with 16GB RAM. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
Capybara summary for PR 1107
|
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.
Briefly, what does this PR introduce? Please link to any relevant presentations or discussions.
This reverts commit b06c48f.
This PR adds an OCCT-based SVG visualization pipeline using dusk/duskcut as a complement to the existing dawn-view pipeline. dusk reads STEP files (already produced by convert-to-step) and generates SVG vector graphics via Hidden Line Removal rendering, without requiring Geant4 simulation.
bin/make_dusk_views: Python driver analogous to make_dawn_viewsscripts/view{1,3,6,7,11,13,50}/generate_svg: per-view scripts translating dawncut + dawn calls to duskcut + dusk equivalents.github/workflows/linux-eic-shell.yml: dusk-view + merge-dusk-view jobs that build dusk from eic/dusk and run on convert-to-step outputWhat is the urgency of this PR?
What kind of change does this PR introduce?
Please check if any of the following apply
Human defined the strategy, AI created the dusk(cut) project and workflow.