Skip to content

Reapply "Add dusk-view CI job and generate_svg scripts"#1107

Open
wdconinc wants to merge 3 commits into
mainfrom
wdconinc/dusk-view
Open

Reapply "Add dusk-view CI job and generate_svg scripts"#1107
wdconinc wants to merge 3 commits into
mainfrom
wdconinc/dusk-view

Conversation

@wdconinc

Copy link
Copy Markdown
Contributor

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_views
  • scripts/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 output

What is the urgency of this PR?

  • High (please describe reason below)
  • Medium
  • Low

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (issue: change from dawn to dusk)
  • Optimization (issue #__)
  • Updated constants (issue #__)
  • Updated documentation
  • other: __

Please check if any of the following apply

  • This PR introduces breaking changes. Please describe changes users need to make below.
  • This PR changes default behavior. Please describe changes below.
  • AI was used in preparing this PR. Please describe usage below.

Human defined the strategy, AI created the dusk(cut) project and workflow.

Copilot AI review requested due to automatic review settings May 19, 2026 16:52
@github-actions github-actions Bot added the topic: infrastructure Regarding build system, CI, CD label May 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_views to run per-view generate_svg scripts and collect SVG outputs.
  • Adds scripts/view{1,3,6,7,11,13,50}/generate_svg scripts translating existing dawncut/dawn view logic to duskcut/dusk.
  • Extends CI (linux-eic-shell.yml) with dusk-view and merge-dusk-view jobs that build dusk from source and generate SVG artifacts from convert-to-step outputs.

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 thread .github/workflows/linux-eic-shell.yml
Comment thread scripts/view3/generate_svg Outdated
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"
Comment thread .github/workflows/linux-eic-shell.yml
wdconinc and others added 2 commits May 19, 2026 12:15
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>
@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: infrastructure Regarding build system, CI, CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants