Yes sure!
The code is translated into a GAMOS script but its fairly easy to figure out. There are two of those, one that did not work i.e generated no solid data (and I have included error messages from GAMOS output) and the other that did work …
The one that DID NOT work. The error message is provided at the end of the script below.
{beginning of script 1
// BUILD GEOMETRY
:VOLU world BOX 10.*m 10.*m 10.*m G4_AIR
:VIS world OFF
:Colour world 0. 0. 1.
:ROTM RM0 0. 0. 0.
:VOLU sph1 SPHERE 195.*cm 200.*cm 0.*deg 360.*deg 0.deg 3.0deg G4_Pyrex_Glass
:VOLU sph2 SPHERE 195.*cm 200.*cm 0.deg 360.deg 2.9deg 6.0deg G4_Pyrex_Glass
:VOLU sph4 SPHERE 195.*cm 200.*cm 0.deg 360.deg 5.9deg 9.0deg G4_Pyrex_Glass
:VOLU sph5 SPHERE 195.*cm 200.*cm 0.deg 360.deg 8.9deg 12.0deg G4_Pyrex_Glass
:VOLU sph6 SPHERE 195.*cm 200.*cm 0.deg 360.deg 11.9deg 15.0deg G4_Pyrex_Glass
:VOLU sph7 SPHERE 195.*cm 200.*cm 0.deg 360.deg 14.9deg 18.0deg G4_Pyrex_Glass
:SOLID spc UNION sph1 sph2 RM0 0.*mm 0.*mm 0.*mm
:VOLU spc spc G4_Pyrex_Glass
:SOLID spc2 UNION sph4 sph5 RM0 0.*mm 0.*mm 0.*mm
:VOLU spc2 spc2 G4_Pyrex_Glass
:SOLID spc4 UNION spc spc2 RM0 0.0mm 0.0mm 0.0mm
:VOLU spc4 spc4 G4_Pyrex_Glass
:PLACE spc4 1 world RM0 0.0cm 0.0cm 0.0mm
//make sph1 as the final GmGenerDistPositionInG4Volumes in .in file. If you use any other such as spc4 it does not work strangely…
:VOLU sph3 SPHERE 0. 20.*mm 0.*deg 360.*deg 0.deg 2.0deg G4_Pyrex_Glass
:PLACE sph3 1 spc4 RM0 0. 0. 0.
:VIS sph3 OFF
end of script 1}
Error messages:
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Two world volumes found, second will be taken
issued by : G4tgrVolumeMgr::GetTopVolume()
Both volumes are at the top of a hierarchy: spc & world
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
AND
G4Scene::AddWorldIfEmpty: The scene was empty of run-duration models.
“world” has been added.
AND
===========================================
Output VRML 2.0 file: g4_00.wrl
Maximum number of files in the destination directory: 100
(Customizable with the environment variable: G4VRMLFILE_MAX_FILE_NUM)
ERROR: G4VSceneHandler::RequestPrimitives
Polyhedron not available for spc4
Touchable path: world 0 spc4 1
This means it cannot be visualized on most systems (try RayTracer).
- The solid may not have implemented the CreatePolyhedron method.
- For Boolean solids, the BooleanProcessor, which attempts to create
the resultant polyhedron, may have failed.
*** VRML 2.0 File g4_00.wrl is generated.
…
…
…
This changed solid geometry DOES WORK!
{beginning of script2…
Here is the geometry file
// BUILD GEOMETRY
:VOLU world BOX 10.*m 10.*m 10.*m G4_AIR
:ROTM RM0 0. 0. 0.
:VIS world OFF
:Colour world 0. 0. 1.
:VOLU sph1 SPHERE 195.*cm 200.*cm 0.*deg 360.*deg 0.deg 3.0deg G4_Pyrex_Glass
:VOLU sph2 SPHERE 195.*cm 200.*cm 0.*deg 360.*deg 3.deg 3.0deg G4_Pyrex_Glass
#Even if I make the above start theta to be 3.1 deg instead of 3 for sph2 it works!!
:VOLU sph4 SPHERE 195.*cm 200.*cm 0.*deg 360.*deg 6.deg 3.0deg G4_Pyrex_Glass
:VOLU sph5 SPHERE 195.*cm 200.*cm 0.*deg 360.*deg 9.deg 3.0deg G4_Pyrex_Glass
:VOLU spc UNION sph1 sph2 RM0 0.*mm 0.*mm 0.*mm G4_Pyrex_Glass
:VOLU spc2 UNION sph4 sph5 RM0 0.*mm 0.*mm 0.*mm G4_Pyrex_Glass
:VOLU spc4 UNION spc2 spc RM0 0.0mm 0.0mm 0.0*mm G4_Pyrex_Glass
:PLACE spc4 1 world RM0 0.0cm 0.0cm 0.0*mm
:VIS spc4 ON
//make sph1 as the final GmGenerDistPositionInG4Volumes in .in file. If you use any other such as spc4 it does not work strangely…
:VOLU sph3 SPHERE 0. 20.*mm 0.*deg 360.*deg 0.deg 2.0deg G4_Pyrex_Glass
:PLACE sph3 1 world RM0 0. 0. 0.
:VIS sph3 OFF
end of script2}
I am attaching a .png of an spc4 lens created by this second script except that (surprisingly!) I had NO overlap between the two Boolean solids spc and spc2 (unlike in the above script where they touch each other on one face). And yet it generated a single Boolean from both.