Message: build geometry using boolean Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None build geometry using boolean 

Forum: Geometry
Date: 23 Apr, 2010
From: Bill <Bill>

Hi,

I try to make an array of holes in a box (C1RowLog). The axis of the holes are not perpendicular to the surface of the box, but with a angle (60 degree). I attached a figure showing what I want to make (there are 5 holes in the drawing. My code tried to make 48 holes.)

Here is my code. I don't know why it doesn't work. I couldn't see anything in C1RowLog when I displayed the geometry in a window. Could anybody help with it?

Thanks, YC

************************
slantCube = new G4Para("SlantCube",
		1. * mm,
		5. * mm / tan(60 * deg),
		5. * mm,
		0,
		90 * deg,
		60 * deg);
Hole     = new G4Tubs("Hole",
		0,
		0.5 * mm,
		5. * mm * 2,
		0,
		360. * deg);
G4RotationMatrix* rm2 = new G4RotationMatrix();
rm2->rotateX(-30 * deg);
G4VSolid* CElement = new G4SubtractionSolid("SlantCube-Hole", slantCube, Hole, rm2, G4ThreeVector(0., 0., 0.));
CElementLog = new G4LogicalVolume(CElement,
			  tungsten,
			  "CElementLog",
			  0, 0, 0);
CElementPhys = new G4PVReplica("CElementPhys",
			   CElementLog,
			   C1RowLog,
			   kYAxis,
			   48,
			   1. * mm,
			   5. * mm / cos(60 * deg));

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2010/04/23/13.55-62859-Untitled.jpg

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

1 Question: Re: build geometry using boolean   (Gabriele Cosmo - 28 Apr, 2010)
(_ None: RE: build geometry using boolean   (Cui, Yonggang - 28 Apr, 2010)
 Add Message Add Message
to: "build geometry using boolean"

 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 ]