ROOT Version: 6.16.00-patches from git Platform: Mac OS Compiler: clang-1000.11.45.5
Synopsis: With 6.16.00 when importing a GDML file, all the volumes are placed at the origin instead of in there proper location.
I compare directly the version 6.16.00-patches from git, 6.16/01, against the identically compiled 6.14/09. Both use same compiler (llvm clang-1000.11.45.5), same operating system (Mac OS 10.14.3), same Python version (3.7.2).
With the 6.14/09 version of ROOT, the GDML file imports correctly and renders correctly. I also exported that geometry as a root file. With 6.16/01, if I import the same GDML files, all the volumes are in the wrong place, it looks like they are all translated to the origin. If I open the geometry as root file (exported by 6.14/09 version), the geometry looks fine with either version.
OK, the problem comes from the commit f7239c0 “Added support for quantity tag in the GDML parser”. While adding support for the “quantity” tag, I cleaned up the parser code replacing the hard-coded default units (mm/rad) with the user preference, using the methods TGDMLParse::SetDefaultROOTUnits() or TGDMLParse::SetDefaultG4Units(), and put as default units the ROOT ones (cm/degree). I overlooked that during TGeoManager::Import the parser is internally instantiated so one never gets the chance to set the actual units. Since the default is now changed, parsing any length or angle constants is now broken (will assume cm/deg)
I will fix the defaults to the previous mm/rad (G4) and expose the units preference as a setter in TGeoManager. Thanks for reporting this, I will let you know in this thread when the fix is done.