I have a question that may have an easy answer, but it currently eludes me! I would like to ingest two separate .obj files that represent volume elements of my instrument using CAD Mesh. If I ingest just one file, I have no problem placing it anywhere in my World Volume. See here:
To produce this figure in my DetectorConstruction class, I open the .obj file to process it; however, if I try to open another .obj file, I am unable to while this file is opened.
The line in question is
auto ram1_mesh = CADMesh::TesselatedMesh::FromOBJ(“file.obj”);
Is there a way to free ram1_mesh so that another file could be opened?
Furthermore, I tried concatenating these two files, and according to the CADMesh multiple example, I should be able to pick off each entry and include it in my geometrical setup. I can do it, but I get a good first volume, but a rather faulty second volume.
I would like to ask all of you if you have any experience with inputting physical volumes by way of .obj files, into Geant4 using CADMesh, I’d like some advice for the problem I am facing by using more than one file in DetectorConstruction? I appreciate your time.