Hello. I have some G4Polyhedra in my geometry, also I use a box subtraction from the polyhedron. I used to visualize my geometry using HepRepFile system. It worked fine in g4.9.3 (up to patch-02) and now in 4.9.4 it gets stuck with no messages. I tried to trace the problem with gdb/ddd. I end up somewhere around HepPolyhedronProcessor::execute1. Then I tried also OGLIX and this time it was somewhere around BooleanProcessor::takePolyhedron(). I didn't try the other systems. These functions are called many times (constantly?). I think it comes somehow from the recursive boolean processing announced in 4.9.4. I have to mention that the event simulation seems to work fine, no warnings/stuck. This is all the information I have at the moment. Unfortunately, I don't have time to dig even deeper. I would appreciate if you can give a hint where the problems can come from, or if you are not able to reproduce the problem, then I could try to provide a small test program that gets stuck (not sure how much time would take this though). Thank you very much.
Any news on this bug? It still remains in G4.9.4.p01.
Created attachment 139 [details] The union of 5 rails
Created attachment 140 [details] A single rail zoomed
Created attachment 141 [details] Source code of a simple test program to reproduce the bug
Hello again, I tried to dig deeper and found out the source of the problem. We have series of solid unions. The first union is of the rail shape (three united boxes). The 4 of rails are positions in parallel, and then 8 more perpendicular with intersections. It creates a complicated volume and as far as I understood this solid is internally converted to G4Polyhedra for visualization. I guess there appear too many vertices/edges that the BooleanProcessor goes to a very long loop, and cannot handle it (or at least does it very slow). However, if I put 4 parallel and 1 perpendicular rail, it works. Putting 2 perpendicular may work, I did not wait enough, but this outputs warnings: BooleanProcessor::createPolyhedron : too many edges Maybe this is not a very good way to create solids, I simplified that in our geometry, but if you consider this as a problem in G4, then I created a very simple test program based on exampleN01+exampleN02. I made comments in src/ExN01DetectorConstruction.cc to explain what cases work and what don't. There is also a vis.mac macro to create a HepRep file. I also attach two pictures of a) the single rail and b) the union of 4+1 of them (the maximum that works). Alex.
Because we are aware that the boolean visualization is imperfect, we will save this as a test case for whatever future time when we have sufficient resources to significantly revise the boolean visualization. We thank the user for providing a clear test case.