Message: Boolean operatin problem (big problem) Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Boolean operatin problem (big problem) 

Forum: Geometry
Date: 24 Feb, 2014
From: Lu, Wei <Lu, Wei>

Actually I have a big problem with it. It seems to me when using union, intersection and subtraction boolean operations for construction geometry it often gives me such error:

ERROR: G4VSceneHandler::RequestPrimitives
  Polyhedron not available for irp_tp_nt1hhh.
  This means it cannot be visualized on most systems.
  Contact the Visualization Coordinator.

While I understand such error message is due to the shared surface or vertices between solids in the boolean operation, in most cases I do not have shared surfaces or vertices at all. Here is an example, in which I used union to put two trapezoid together. Then the united trapezoid is subtracted by a union solid (which is a box + two half cylinders). It all goes fine until I want to the final shape, which is a cylinder subtracted by this. The detailed code is shown below, please let me know whether it is due to the fact that GEANT4 can not handle so many boolean operations or something else? The weird thing is that I was able to contract such a shape in a smaller size. Thanks a lot.


    // neutron beam tube 1: aluminum structure
    G4Trd* irp_tp_nt1aaa = new G4Trd("irp_tp_nt1aaa", 31.38*cm, 6.91*cm, 7.091*cm, 7.091*cm,50.0*cm);
    G4Trd* irp_tp_nt1bbb = new G4Trd("irp_tp_nt1bbb", 4.31*cm, 0.01*cm, 7.091*cm, 7.091*cm,51.48*cm);
    G4RotationMatrix* y1Rot= new G4RotationMatrix;
    G4ThreeVector x5Trl(-19.14*cm,0.0,0.0);
    G4UnionSolid* irp_tp_nt1ddd = new G4UnionSolid("irp_tp_nt1ddd",irp_tp_nt1aaa, irp_tp_nt1bbb,y1Rot,x5Trl);

    G4double irp_ct2_hh = 1.8*cm;
    G4double irp_ct2a1_r= 3.83*cm;
    G4double irp_ct2a2_hx=3.85*cm;
    G4double irp_ct2a2_hy=4.65*cm;
    G4double irp_ct2a2_hz=10.00*cm;  // a dummy height
    G4Box* irp_ct2a_m= new G4Box("irp_ct2a_m",irp_ct2a2_hx,irp_ct2a2_hy,irp_ct2a2_hz);
    G4Tubs* irp_ct2a_l= new G4Tubs("irp_ct2a_l",0.0, irp_ct2a1_r,11.00*cm,0,2.0*pi);
    G4Tubs* irp_ct2a_r= new G4Tubs("irp_ct2a_r",0.0, irp_ct2a1_r,12.00*cm,0,2.0*pi);
    G4ThreeVector y3Trl(0.0,-4.65*cm,0.0);
    G4ThreeVector y5Trl(0.0,4.65*cm,0.0);
    G4UnionSolid* irp_ct2b = new G4UnionSolid("irp_ct2b",irp_ct2a_m,irp_ct2a_l,0,y3Trl);
    G4UnionSolid* irp_ct2d = new G4UnionSolid("irp_ct2d",irp_ct2b,irp_ct2a_r,0,y5Trl);

    G4ThreeVector u(0, 1.0, 0);  // cosine of x'/y'/z' and x
     G4ThreeVector v(0, 0, 1.0);
    G4ThreeVector w(1.0, 0, 0);
     G4RotationMatrix rotM1(u,v,w);
    G4ThreeVector z5Trl(0,0,52.98*cm);
    G4SubtractionSolid* irp_tp_nt1eee= new G4SubtractionSolid("irp_tp_nt1eee",irp_tp_nt1ddd,irp_ct2d,&rotM1,z5Trl);
    G4Tubs* irp_tp_nt1g = new G4Tubs("irp_tp_nt1g",0.0, IRP_r,36.0*cm,0.0,2.0*pi);
    G4IntersectionSolid* irp_tp_nt1hhh = new G4IntersectionSolid("irp_tp_nt1hhh",irp_tp_nt1g,irp_tp_nt1eee);

    G4LogicalVolume* IRP_tp_nt1_Al_logicV = new G4LogicalVolume(irp_tp_nt1hhh,
    G4VPhysicalVolume* IRP_tp_nt1_Al_physV = new G4PVPlacement(0,

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Boolean operatin problem (big problem)   (John Allison - 24 Feb, 2014)
1 None: Re: Boolean operatin problem (big problem)   (Lu, Wei - 25 Feb, 2014)
2 Question: Re: Boolean operatin problem (big problem)   (Erik Dietz-Laursonn - 04 Aug, 2015)
 Add Message Add Message
to: "Boolean operatin problem (big problem)"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]