Message: Boolean operation (bug?) Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Boolean operation (bug?) 

Forum: Geometry
Date: 29 Aug, 2011
From: Davit Mayilyan <Davit Mayilyan>

I have some problems with cutting a tube from a Trapezoid. Other cuts are working well (box - box, trapezoid - box) It shows a box instead of a hole and in the HepRApp viewer there are a lot of lines going from the box to the corners. I'm using geant4.9.3.p02-1.

Here is the code:

  G4Trd* trap_box = new G4Trd("Trap", trap_dx1, trap_dx2, trap_dy1, trap_dy2, trap_dz);

  G4LogicalVolume* trap_box_log
    = new G4LogicalVolume(trap_box, Pstyrene, "Trap", 0, 0, 0);

      new G4PVPlacement(0,G4ThreeVector(2.*m, 2.*m, 0), trap_box_log, "Trap", waterTank_log, false,0);

  G4VSolid* cuttube1
    = new G4Tubs("CutTube1",0.0*mm,4.5*mm,2.*cm,0.*deg,360.*deg);

  G4LogicalVolume* cuttube1_log
    = new G4LogicalVolume(cuttube1, Pstyrene, "CutTube1", 0, 0, 0);

      new G4PVPlacement(rottubes,G4ThreeVector(2.0*m, 2.0*m, 35.0*mm), cuttube1_log, "CutTube1", waterTank_log, false,0);

  G4VSolid* trap
    = new G4SubtractionSolid("trap_box-cuttube1", trap_box, cuttube1, 0, G4ThreeVector(0.,0.,0.));

  G4LogicalVolume* trap_log
    = new G4LogicalVolume(trap, Air, "Trap", 0, 0, 0);

      new G4PVPlacement(0,G4ThreeVector(2.0*m, 2.0*m, -0.1*m), trap_log, "Trap", waterTank_log, false,0);

And here is the result:


Am I doing anything wrong?

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

1 None: Re: Boolean operation (bug?)   (John Allison - 30 Aug, 2011)
 Add Message Add Message
to: "Boolean operation (bug?)"

 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 ]