Created attachment 46 [details] a)output of cylindrical test b)code to reproduce Hi, I construct three G4Torus objects, place the smallest object into a larger one as a daugther, then place the larger one as a daughter of the largest one. When I run grid test and recursive_test, while I get no real overlapping or overshooting issues, there is a bunch of messages like this one: "GeomTest Error: SolidProblem Solid has odd number of intersection points" or that one: "Unmatched intersection point" The cylinder_test does report overshooting and overlap errors between objects (see the output attached) Looking at the code I can't see where those overlaps could be coming from. Moreover: a) running CheckOverlaps(100000) for every placement yields no problem b) I shot a geantino through the stack, and it seems fine c) the objects look fine when visualized, as far as I can tell One way to reproduce the problem is to replace three files from novice example N01 (ExN01DetectorConstruction.cc and .hh, exampleN01.cc) with the ones attached, compile and run the geometry tests. I run the tests with the same results on geant4.9.0p01 and geant4.9.1p01 Thanks, Igor
If I shift the position of the daughters with respect to their mothers by 1 micron in y direction, I get rid of overshooting errors in cylinder test. I then assumed that the errors were coming from the fact that all three elbows share the two "endcap" surfaces. I tried to decrease the pDphi of the daughters and apply additional shift to exclude possibility of sharing the "endcap" surfaces between a mother and a daughter, but whatever I do I still get a bunch of "odd number of intersection points" errors. Am I overlooking something obvious? Thanks,
If you verified using CheckOverlaps() and no errors have reported, your geometry setup is almost certainly safe from overlaps. Errors which may be reported by the embedded 'GeomTest' commands may well indicate false alarms, especially in shapes with curved surfaces. 'GeomTest' results can be biased by the exact positioning of the test grid (or cylinders) utilised for the test; if lines happen to be tangent to the surfaces of the volumes being tested, errors for odd intersections or spurious intersections can be reported; 'GeomTest' provides ad-hoc commands for tuning the resolution of the grid. Avoiding shared surfaces for either caps, sections or curves among volumes is also recommended in order to avoid precision errors, particularly in cases where relatively complex equations are involved for the computation of intersections.