Geant4 Version: geant4-11-01-patch-03 (branch geant4-11.1-release
)
Operating System: MacOS
Compiler/Version: Apple clang version 14.0.0
CMake Version: 3.27.4
I have a simple geometry for a project, but when I save png images with tsg_offscreen, calls I make to /vis/geometry/set/lineWidth
get ignored.
To make sure I was using the lineWidth
command correctly, I ran the same visualization with OGL, and I noticed that the lineWidth
command also gets ignored when I save a pdf or eps file. BUT, the command works in an interactive session – it’s just the output of /vis/ogl/export
(or /vis/viewer/rebuild
for tsg_offscreen) that is unchanged by the lineWidth
command.
Here is an example macro that I used to generate a png file with tsg_offscreen:
/run/initialize
/vis/open TSG_OFFSCREEN 600x600
/vis/drawVolume
/vis/viewer/set/viewpointVector 1 2 3
/vis/viewer/set/upVector 0 0 1
/vis/geometry/set/lineWidth all -1 5
/vis/tsg/offscreen/set/file auto tsg_geom
/vis/viewer/rebuild
which results in:
Then, a macro with OGL instead:
/run/initialize
/vis/open OGL 600x600
/vis/drawVolume
/vis/viewer/set/viewpointVector 1 2 3
/vis/viewer/set/upVector 0 0 1
/vis/geometry/set/lineWidth all -1 5
/vis/ogl/set/printFilename ogl_geom.pdf
/vis/ogl/export
generates (a screenshot of the original pdf, rescaled by a bit to fit my screen):
But, entering all but the last two lines into an interactive session gives (screenshot of the window):
where the lineWidth
command has clearly done some heavy lifting that wasn’t present in the last two examples. Does anyone know why this is, and how I can get the command to work?