Import Geant4 2.0.0 source tree
This commit is contained in:
@@ -1,11 +1,36 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ConicalSurfaceCreator.cc,v 1.3 2000/02/25 16:36:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ConicalSurfaceCreator
|
||||
//
|
||||
// Authors: J.Sulkimo, P.Urban.
|
||||
// Revisions by: L.Broglia, G.Cosmo.
|
||||
//
|
||||
// History:
|
||||
// 18-Nov-1999: First step of re-engineering - G.Cosmo
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4ConicalSurfaceCreator.hh"
|
||||
#include "G4GeometryTable.hh"
|
||||
#include "G4ConicalSurface.hh"
|
||||
#include "G4FConicalSurface.hh"
|
||||
|
||||
G4ConicalSurfaceCreator G4ConicalSurfaceCreator::csc;
|
||||
|
||||
G4ConicalSurfaceCreator::G4ConicalSurfaceCreator(){G4GeometryTable::RegisterObject(this);}
|
||||
G4ConicalSurfaceCreator::G4ConicalSurfaceCreator()
|
||||
{
|
||||
G4GeometryTable::RegisterObject(this);
|
||||
}
|
||||
|
||||
G4ConicalSurfaceCreator::~G4ConicalSurfaceCreator(){}
|
||||
G4ConicalSurfaceCreator::~G4ConicalSurfaceCreator() {}
|
||||
|
||||
void G4ConicalSurfaceCreator::CreateG4Geometry(STEPentity& Ent)
|
||||
{
|
||||
@@ -29,14 +54,17 @@ void G4ConicalSurfaceCreator::CreateG4Geometry(STEPentity& Ent)
|
||||
angle = *Attr->ptr.r; // Be careful, angle is in degree
|
||||
|
||||
|
||||
G4ConicalSurface* aG4cone =
|
||||
new G4ConicalSurface( (*place).GetLocation() ,
|
||||
(*place).GetAxis() ,
|
||||
angle * 2*M_PI/360 );
|
||||
G4ConicalSurface* aG4cone = 0;
|
||||
if (place)
|
||||
aG4cone = new G4ConicalSurface( (*place).GetLocation() ,
|
||||
(*place).GetAxis() ,
|
||||
abs(angle * 2*M_PI/360) );
|
||||
else
|
||||
G4cerr << "WARNING - G4ConicalSurfaceCreator::CreateG4Geometry" << G4endl
|
||||
<< "\tUnexpected NULL axis placement (G4Axis2Placement3D) !" << G4endl
|
||||
<< "\tConical Surface NOT created." << G4endl;
|
||||
|
||||
createdObject = aG4cone;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void G4ConicalSurfaceCreator::CreateSTEPGeometry(void* G4obj)
|
||||
@@ -47,20 +75,17 @@ void G4ConicalSurfaceCreator::CreateSTEPGeometry(void* G4obj)
|
||||
G4String placementName("Axis2Placement3d");
|
||||
void * tmp =G4GeometryTable::CreateSTEPObject(&fCon, placementName);
|
||||
SdaiAxis2_placement_3d *place = (SdaiAxis2_placement_3d*)tmp;
|
||||
srf->Position(place);
|
||||
srf->position_(place);
|
||||
// radius
|
||||
srf->Radius(fCon->GetSmallRadius());
|
||||
srf->radius_(fCon->GetSmallRadius());
|
||||
// semi-angle
|
||||
//srf->Semi_angle(fCon->GetAngle());
|
||||
// Set STEP info
|
||||
srf->SetFileId(GetNextId());
|
||||
srf->Name("");
|
||||
srf->name_("");
|
||||
|
||||
// Write out object
|
||||
srf->STEPwrite(G4cout);
|
||||
|
||||
createdObject = srf;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user