Skip to content

Commit a15c042

Browse files
committed
Merge remote-tracking branch 'origin/main' into Prepare-for-lattice-update
2 parents 0e3b196 + 05a9288 commit a15c042

File tree

3 files changed

+46
-4
lines changed

3 files changed

+46
-4
lines changed

.github/workflows/check-tracking-geometry.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,14 @@ jobs:
2828
run: |
2929
root -b -q "scripts/test_ACTS.cxx+(\"${DETECTOR_PATH}/${{matrix.detector_config}}.xml\")" | tee check_tracking_geometry.out
3030
bin/acts_geo_check check_tracking_geometry.out
31+
- uses: actions/upload-artifact@v4
32+
with:
33+
name: ${{matrix.detector_config}}.obj
34+
path: |
35+
*.obj
36+
*.mpl
37+
- uses: actions/upload-artifact@v4
38+
with:
39+
name: ${{matrix.detector_config}}.ply
40+
path: |
41+
*.ply

.github/workflows/linux-eic-shell.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ jobs:
164164
with:
165165
name: material_map
166166
path: |
167-
"scripts/material_map/*.json"
168-
"scripts/material_map/*.root"
167+
scripts/material_map/*.json
168+
scripts/material_map/*.root
169169
scripts/material_map/Surfaces/
170170
scripts/material_map/Validation/
171171
if-no-files-found: error
@@ -556,7 +556,7 @@ jobs:
556556
if-no-files-found: error
557557
- name: Download previous artifact
558558
id: download_previous_artifact
559-
uses: dawidd6/action-download-artifact@v9
559+
uses: dawidd6/action-download-artifact@v11
560560
with:
561561
branch: ${{ github.event.pull_request.base.ref || github.ref_name }}
562562
path: ref/
@@ -625,7 +625,7 @@ jobs:
625625
if-no-files-found: error
626626
- name: Download previous artifact
627627
id: download_previous_artifact
628-
uses: dawidd6/action-download-artifact@v9
628+
uses: dawidd6/action-download-artifact@v11
629629
with:
630630
branch: ${{ github.event.pull_request.base.ref || github.ref_name }}
631631
path: ref/

scripts/test_ACTS.cxx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
#include "Acts/Geometry/TrackingGeometry.hpp"
77
#include "Acts/Geometry/TrackingVolume.hpp"
88
#include "Acts/Plugins/DD4hep/ConvertDD4hepDetector.hpp"
9+
#include <Acts/Visualization/GeometryView3D.hpp>
10+
#include <Acts/Visualization/ObjVisualization3D.hpp>
11+
#include <Acts/Visualization/PlyVisualization3D.hpp>
12+
#include <Acts/Visualization/ViewConfig.hpp>
913

1014
/** Example loading ACTs.
1115
*
@@ -24,4 +28,31 @@ void test_ACTS(const char* compact = "epic.xml") {
2428

2529
// Visit all surfaces
2630
acts_tracking_geometry->visitSurfaces([](const Acts::Surface* surface) {});
31+
32+
// Export to obj+mtl and ply collections
33+
#if Acts_VERSION_MAJOR >= 37
34+
Acts::ViewConfig containerView{.color = {220, 220, 220}}; // alto
35+
Acts::ViewConfig volumeView{.color = {220, 220, 0}}; // barberry yellow
36+
Acts::ViewConfig sensitiveView{.color = {0, 180, 240}}; // picton blue
37+
Acts::ViewConfig passiveView{.color = {240, 180, 0}}; // lightning yellow
38+
Acts::ViewConfig gridView{.color = {220, 0, 0}}; // scarlet red
39+
#else
40+
Acts::ViewConfig containerView{{220, 220, 220}}; // alto
41+
Acts::ViewConfig volumeView{{220, 220, 0}}; // barberry yellow
42+
Acts::ViewConfig sensitiveView{{0, 180, 240}}; // picton blue
43+
Acts::ViewConfig passiveView{{240, 180, 0}}; // lightning yellow
44+
Acts::ViewConfig gridView{{220, 0, 0}}; // scarlet red
45+
#endif
46+
Acts::GeometryContext trackingGeoCtx;
47+
const Acts::TrackingVolume* world = acts_tracking_geometry->highestTrackingVolume();
48+
// Export to obj+mtl
49+
Acts::ObjVisualization3D objVis;
50+
Acts::GeometryView3D::drawTrackingVolume(objVis, *world, trackingGeoCtx, containerView,
51+
volumeView, passiveView, sensitiveView, gridView, true,
52+
"", "");
53+
// Export to ply
54+
Acts::PlyVisualization3D plyVis;
55+
Acts::GeometryView3D::drawTrackingVolume(plyVis, *world, trackingGeoCtx, containerView,
56+
volumeView, passiveView, sensitiveView, gridView, true,
57+
"", "");
2758
}

0 commit comments

Comments
 (0)