Message: Weird auxiliary edges in G4UnionSolid Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Weird auxiliary edges in G4UnionSolid 

Forum: Geometry
Date: 02 May, 2005
From: Emanuele Leonardi <Emanuele Leonardi>

I am trying to create a G4UnionSolid by catenating 3 sections of G4Tubs.

The idea is to have a central semi-circular (180 deg) cylindrical
section with two smaller tails (90 deg) at the side.

This is the code I am using:

G4UnionSolid* SpaCalDetectorConstruction::SpaCalSnakeBox
(const G4String& name, G4double CoreInnerRadius, G4double CoreOuterRadius,
 G4double TailInnerRadius, G4double HalfZLength)
{

  G4Tubs* solidCore =
    new G4Tubs("core",CoreInnerRadius,CoreOuterRadius,HalfZLength,
	       0.*deg,180.*deg);

  G4double TailOuterRadius = TailInnerRadius+(CoreOuterRadius-CoreInnerRadius);
  G4Tubs* solidTail =
    new G4Tubs("tail",TailInnerRadius,TailOuterRadius,HalfZLength,
		0.*deg,90.*deg);

  G4RotationMatrix* tail1Rotation = new G4RotationMatrix;
  tail1Rotation->rotateZ(90.*deg);
  G4ThreeVector tail1Translation(-CoreOuterRadius-TailInnerRadius,0.,0.);
  G4UnionSolid* shortSnake =
    new G4UnionSolid("shortSnake",solidCore,solidTail,
  		     tail1Rotation,tail1Translation);
  
  G4RotationMatrix* tail2Rotation = new G4RotationMatrix;
  tail2Rotation->rotateZ(180.*deg);
  G4ThreeVector tail2Translation(CoreOuterRadius+TailInnerRadius,0.,0.);
  G4UnionSolid* fullSnake =
    new G4UnionSolid(name,shortSnake,solidTail,tail2Rotation,tail2Translation);

  return fullSnake;

}

The result looks correct but if I activate the auxiliary edges from
the OGLSXm visulaizer I get some weird lines where one of the tails
connects to the central body.

You can see an example of the output at
http://leonardi.home.cern.ch/leonardi/Weirdauxiliaryedges.gif

Is there a problem here? Should I be worried by this?

              Emanuele Leonardi

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

1 None: Re: Weird auxiliary edges in G4UnionSolid   (John Allison - 02 May, 2005)
 Add Message Add Message
to: "Weird auxiliary edges in G4UnionSolid"

 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 ]