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

Question Re: build geometry using boolean 

Forum: Geometry
Re: None build geometry using boolean (Bill)
Date: 28 Apr, 2010
From: Gabriele Cosmo <Gabriele Cosmo>

Have you tried using normal placements instead of replicas ?
For replications along the Cartesian axis, slices should be perpendicular
to the axis of replication (see docs); here it doesn't seem the case.

Cheers, Gabriele

---------------
On Fri, 23 Apr 2010 20:58:27 GMT, Bill wrote:
> 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));

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

1 None: RE: build geometry using boolean   (Cui, Yonggang - 28 Apr, 2010)
 Add Message Add Message
to: "Re: 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 ]