Problem 1235

Summary: Missing neighboring facet info (G4Edge::f) in polyhedron returned by G4TesselatedSolid::CreatePolyhedron()
Product: Geant4 Reporter: Oliver Merle <Oliver.Merle>
Component: geometry/solidsAssignee: John.Allison
Status: RESOLVED FIXED    
Severity: trivial CC: John.Allison, PRTruscott
Priority: P5    
Version: other   
Hardware: All   
OS: All   
URL: http://hypernews.slac.stanford.edu/HyperNews/geant4/get/visualization/616.html

Description Oliver Merle 2011-07-22 16:33:10 CEST
Problem description:
----------------------------------------
The BooleanProcessor will raise an error if the neighboring facets are 0 for the edges in a HepPolyhedron (graphics_reps/src/BooleanProcessor.src:466). These are not set at creation in G4TesselatedSolid::CreatePolyhedron(), but can be constructed by a simple call to: 

protected: void HepPolyhedron::SetReferences();

Unfortunately, this function is protected.

Due to this bug/missing feature, results of boolean operations with G4TesselatedSolids cannot be displayed in visualization.

Proposed fix:
----------------------------------------
I don't see a reason to protect HepPolyhedron::SetReferences and would suggest to make it public. This way it can be called at the end of G4TesselatedSolid::CreatePolyhedron().

This problem may affect other solids (eg. GenericTrap -> attached link)

Regards,
Oliver
Comment 1 John.Allison 2011-07-22 18:31:51 CEST
Thanks, Oliver, for this super-detective work.  Sorry to have taken so long to realise the issue.  Your proposal looks sound.
Comment 2 Gabriele Cosmo 2011-08-05 08:48:17 CEST
Fixes are now committed and will be included in the next release or patches.