problem loading physvol from file
I am trying to open a somewhat complex geometry, which loads a "physvol" from a file. I was able to mock the bug with a minimal example, which I send attached (I changed the extension to "xml" so I can upload them here). I can load "part.gdml" correctly. However, I when I load "assembly.gdml" it finds the path to "part.gdml", but when it tries to parse the volumes it does not find the appropriate solids.
(EDIT) I am using FreeCAD 0.21.2 and the GDML Workbench v2.0.1 Beta, installed from the Addon Manager.
Thanks for reporting.
May I ask did you create the assembly.xml file by hand? Or Are you trying to use one of the Assembly workbenches in conjunction with the GDML workbench?
I have created it by hand. It loads correctly in geant4. I have also added "importFlag" as the first positional argument of function "processPhysVolFile" (line 3195 of importGDML.py) and to the call to "processVol" in line 3226.
This is what is printed in the console:
Full Path : /home/nico/freecad-examples/minimal-bug/part.gdml Parse : /home/nico/freecad-examples/minimal-bug/part.gdml running with lxml.etree Process Materials DocSet define xml <Element define at 0x7190ece38f80> materialsl <Element materials at 0x7190ecf7f500> Process Materials : Materials Process - Opticals: matrix_spreadsheet define xml <Element define at 0x7190ece38f80> Find all Matrix Now process Volume Process Positions Process Rotations <Element solids at 0x7190ece82e40> Process Volume : LV_part importFlag 1 solidref : Part ERROR - Solid : Part Not defined Process Surfaces skinsurface bordersurface Parse physvol : None importFlag 1 name: LV_assembly parentpart = <Part object> paramvol = None ProcessVol returning Part::PartFeature GDMLBox_assemblyWorld Process Surfaces skinsurface bordersurface End processing GDML file time : 1.1152 seconds
Please could you try branch 164fix.
Sorry it has taken a long time but it has taken me a long while to resolve an issue on my machine.
If you can let me know if it is now resolved I will merge into Main
Thanks
Hello Keith,
Thanks for addressing the issue. However, after checking out to this branch, I still run into the same issue. This is the full console output: console_output.txt
However, I have found a workaround: define all the solids in a "solids.xml" file, then add the corresponding ENTITY to the header of the gdml file, then add the reference in the