Problem 1295 - problems with G4BREPSolidCylinder visualization
Summary: problems with G4BREPSolidCylinder visualization
Status: RESOLVED WONTFIX
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/solids (show other problems)
Version: 9.5
Hardware: Apple Mac OS X
: P5 normal
Assignee: Gabriele Cosmo
URL:
Depends on:
Blocks:
 
Reported: 2012-03-14 20:38 CET by nika.valencic
Modified: 2012-04-03 15:07 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description nika.valencic 2012-03-14 20:38:06 CET
Hi,

I'm not sure if this is the right category, since I actually have problems with visualizing G4BREPSolidCylinder. 

When I construct the G4BREPSolidCylinder code compiles and everything seems to work. But when I want to visualize it, I encounter problems.

With Qt, all I get is a bounding box so I was advised to try with RayTracer and there I don't see anything - the solid becomes invisible. I tested both drivers with CGS solids and everything works perfectly.

Here is part of Construc() method:
  G4Point3D o (0,0,0);
  G4Point3D a (0,0,1);
  G4Point3D d (1,0,0);
  G4double r = 1;
  G4double l = 1;

  G4BREPSolidCylinder* brep = new G4BREPSolidCylinder("name",o,a,d,r,l);

  G4LogicalVolume *logicbrep = new G4LogicalVolume(brep,mSi,"name");

  G4VPhysicalVolume* physicalbrep = new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),  logicbrep,"name", logicWorld,false,1);

And here is my vis.mac file:
   /vis/open OGLIQt 600x600-0+0
   /vis/drawVolume
   /vis/scene/add/axes 0 0 0 50 mm
   /vis/viewer/set/upVector 1 0 0
   /vis/open RayTracerX
   /vis/viewer/set/all viewer-0
   /vis/viewer/refresh

						      															   
Thank you!
Comment 1 Gabriele Cosmo 2012-04-03 15:07:54 CEST
Indeed the visualization problem exists as G4BREPSolidCylinder (as most of other concrete sample shapes in the BREPs library) does not provide visualization hooks to the system, they're therefore incomplete in the implementation.
There're no plans at the moment to further develop the BREPs module, due to lack of resources.
It is therefore recommended to make instead use of the CSG and specific shapes. Sorry for that.