OpenGL visualization driver fails to draw HepPolyhedron based solids, namely G4Orb, G4Tubs, G4Sphere with radius less then 1 nm. In most case a redraw attempt is accompanied by following error message: Polyhedron::RotateAroundZ: number of generated faces (0) is not equal to the number of allocated faces (24) This is a message from file source/graphics_reps/src/HepPolyhedron.cc. John Allison further identified the issue as being related to use of CLHEP::perMillion constant for checking the radius. Namely, in RotateAroundZ in HepPolyhedron.cc, line 470 the r[i] radii are compared with perMillion and once the user requests r < 1 nm, here it's set to zero. Setting perMillion=1e-9 for HepPolyhedron, or just changing occurence of perMillion on line 470 to 1.0e-3*perMillion allows us to use r < 1 nm. (Which is of high importance for detailed DNA models.)
- HepPolyhedron.cc: o Introduced const G4double spatialTolerance = 0.01*nm; o Used in RotateAroundZ and in HepPolyhedronSphere and HepPolyhedronTorus constructors. o Allows creation of nm-sized objects. Note: This now allows the creation of polyhedral representations of nm-sized volumes for visualisation, but one may still have issues at very high zoom. For example, if one wishes to see a nm-sized volume in a normal-sized geometry one might wish to zoom in by factors of 1e9 or more. This stretches the capability of systems that convert to 32-bit floats for internal representation, for example, OpenGL. If you get a problem, e.g., not drawn at high zoom, try splitting the zoom between "zoom" and "scale". For example, to achieve a magnification of 1e10, try: /vis/viewer/zoomTo 1e5 /vis/viewer/scaleTo 1e5 1e5 1e5 At high zooms, it is often not easy to find things. If you know where they are try using "/vis/viewer/set/targetPoint".
Thank you very much, John.