Hello,
If I define a 5x5 grid of boxes using assembly (where the first assembly is a row of boxes) I can visualize it without problems (to visualize: TGeoManager::Import("file.gdml");gGeoManager->GetTopVolume()->Draw("ogl");
). Here is the GDML:
<?xml version='1.0'?>
<gdml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd">
<define/>
<materials>
<material name="material-0"/>
</materials>
<solids>
<box name="worldBox" x="100.0" y="100.0" z="100.0"/>
<box name="box" x="1.0" y="1.0" z="1.0"/>
</solids>
<structure>
<volume name="boxVolume">
<materialref ref="material-0"/>
<solidref ref="box"/>
</volume>
<assembly name="assembly-1">
<physvol name="box1">
<volumeref ref="boxVolume"/>
<position name="box1.position" z="5.0"/>
</physvol>
<physvol name="box2">
<volumeref ref="boxVolume"/>
<position name="box2.position" z="10.0"/>
</physvol>
<physvol name="box3">
<volumeref ref="boxVolume"/>
<position name="box3.position" z="15.0"/>
</physvol>
<physvol name="box4">
<volumeref ref="boxVolume"/>
<position name="box4.position" z="20.0"/>
</physvol>
<physvol name="box5">
<volumeref ref="boxVolume"/>
<position name="box5.position" z="25.0"/>
</physvol>
</assembly>
<assembly name="assembly-0">
<physvol name="box1">
<volumeref ref="assembly-1"/>
<position name="box1.position" y="5.0"/>
</physvol>
<physvol name="box2">
<volumeref ref="assembly-1"/>
<position name="box2.position" y="10.0"/>
</physvol>
<physvol name="box3">
<volumeref ref="assembly-1"/>
<position name="box3.position" y="15.0"/>
</physvol>
<physvol name="box4">
<volumeref ref="assembly-1"/>
<position name="box4.position" y="20.0"/>
</physvol>
<physvol name="box5">
<volumeref ref="assembly-1"/>
<position name="box5.position" y="25.0"/>
</physvol>
</assembly>
<volume name="world">
<physvol name="Boxes">
<volumeref ref="assembly-0"/>
</physvol>
<materialref ref="material-0"/>
<solidref ref="worldBox"/>
</volume>
</structure>
<setup name="Default" version="1.0">
<world ref="world"/>
</setup>
</gdml>
However, if I add one more layer of depth to make it a grid of 5x5x5 boxes, the visualization breaks and I don’t see a thing, but the gdml seems to be correct. I also don’t get anything in the console indicating an error has ocurred. Here is the gdml for a 5x5x5 grid of boxes.
<?xml version='1.0'?>
<gdml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd">
<define/>
<materials>
<material name="material-0"/>
</materials>
<solids>
<box name="worldBox" x="100.0" y="100.0" z="100.0"/>
<box name="box" x="1.0" y="1.0" z="1.0"/>
</solids>
<structure>
<volume name="boxVolume">
<materialref ref="material-0"/>
<solidref ref="box"/>
</volume>
<assembly name="assembly-2">
<physvol name="box1">
<volumeref ref="boxVolume"/>
<position name="box1.position" z="5.0"/>
</physvol>
<physvol name="box2">
<volumeref ref="boxVolume"/>
<position name="box2.position" z="10.0"/>
</physvol>
<physvol name="box3">
<volumeref ref="boxVolume"/>
<position name="box3.position" z="15.0"/>
</physvol>
<physvol name="box4">
<volumeref ref="boxVolume"/>
<position name="box4.position" z="20.0"/>
</physvol>
<physvol name="box5">
<volumeref ref="boxVolume"/>
<position name="box5.position" z="25.0"/>
</physvol>
</assembly>
<assembly name="assembly-1">
<physvol name="box1">
<volumeref ref="assembly-2"/>
<position name="box1.position" y="5.0"/>
</physvol>
<physvol name="box2">
<volumeref ref="assembly-2"/>
<position name="box2.position" y="10.0"/>
</physvol>
<physvol name="box3">
<volumeref ref="assembly-2"/>
<position name="box3.position" y="15.0"/>
</physvol>
<physvol name="box4">
<volumeref ref="assembly-2"/>
<position name="box4.position" y="20.0"/>
</physvol>
<physvol name="box5">
<volumeref ref="assembly-2"/>
<position name="box5.position" y="25.0"/>
</physvol>
</assembly>
<assembly name="assembly-0">
<physvol name="box1">
<volumeref ref="assembly-1"/>
<position name="box1.position" x="5.0"/>
</physvol>
<physvol name="box2">
<volumeref ref="assembly-1"/>
<position name="box2.position" x="10.0"/>
</physvol>
<physvol name="box3">
<volumeref ref="assembly-1"/>
<position name="box3.position" x="15.0"/>
</physvol>
<physvol name="box4">
<volumeref ref="assembly-1"/>
<position name="box4.position" x="20.0"/>
</physvol>
<physvol name="box5">
<volumeref ref="assembly-1"/>
<position name="box5.position" x="25.0"/>
</physvol>
</assembly>
<volume name="world">
<physvol name="Boxes">
<volumeref ref="assembly-0"/>
</physvol>
<materialref ref="material-0"/>
<solidref ref="worldBox"/>
</volume>
</structure>
<setup name="Default" version="1.0">
<world ref="world"/>
</setup>
</gdml>
I couldn’t see this behavior documented anywhere, so I am asking here.
Regards,
Luis.