Import Geant4 1.0.0 source tree
This commit is contained in:
@@ -1,10 +1,33 @@
|
||||
History file for geometry/solids/STEPinterface
|
||||
$Id: History,v 1.3 1999/11/08 09:53:55 gcosmo Exp $
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
History file for geometry/solids/STEPinterface
|
||||
----------------------------------------------
|
||||
This file should be used by G4 developers and category coordinators
|
||||
to briefly summarize all major modifications introduced in the code
|
||||
and keep track of all category-tags.
|
||||
It DOES NOT substitute the CVS log-message one should put at every
|
||||
committal in the CVS repository !
|
||||
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
8th November 1999 Gabriele Cosmo (stepinterface-V00-01-00)
|
||||
- Added files G4NISTStepReader[.hh.cc] and G4StepFileReader[.hh] from BREPS.
|
||||
- Added inclusion of STEPcomplex.h in G4BoundedSurfaceCreator.cc,
|
||||
G4GeometryCreator.cc and G4RepresentationRelationshipCreator.cc.
|
||||
|
||||
6th February 1999 John Allison stepinterface-01-00-00 on ONE FILE ONLY...
|
||||
- Commented out some troublesome printing in G4GeometryTable.cc. Changes
|
||||
(a) in branch stepintf-geant4-00-branch (from geant4-00), (b) in branch
|
||||
stepintf-01-00-00-branch, and (c) in head of G4GeometryTable.cc.
|
||||
|
||||
----------------------------
|
||||
revision 1.9
|
||||
date: 1998/12/09 12:00:42; author: broglia; state: Exp; lines: +22 -37
|
||||
December 9, 1998 : L. Broglia
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
//#include "G4Placement.hh"
|
||||
#include "G4Axis2Placement3D.hh"
|
||||
|
||||
//typedef RWTPtrOrderedVector<G4Curve> G4CurveVector;
|
||||
//typedef RWTPtrOrderedVector<G4CurveVector> G4BoundaryVector;
|
||||
typedef RWTPtrOrderedVector<G4PlacedSolid> G4PlacedSolidVector;
|
||||
//typedef RWTPtrOrderedVector<G4GeometryCreator> G4CreatorVector;
|
||||
typedef RWTPtrOrderedVector<G4Surface> G4SurfaceVector;
|
||||
typedef RWTPtrOrderedVector<G4BREPSolid> G4SolidVector;
|
||||
//typedef RWTPtrOrderedVector<G4Placement> G4PlacementVector;
|
||||
//typedef G4RWTPtrOrderedVector<G4Curve> G4CurveVector;
|
||||
//typedef G4RWTPtrOrderedVector<G4CurveVector> G4BoundaryVector;
|
||||
typedef G4RWTPtrOrderedVector<G4PlacedSolid> G4PlacedSolidVector;
|
||||
//typedef G4RWTPtrOrderedVector<G4GeometryCreator> G4CreatorVector;
|
||||
typedef G4RWTPtrOrderedVector<G4Surface> G4SurfaceVector;
|
||||
typedef G4RWTPtrOrderedVector<G4BREPSolid> G4SolidVector;
|
||||
//typedef G4RWTPtrOrderedVector<G4Placement> G4PlacementVector;
|
||||
|
||||
//#include "G4STEPEntity.hh"
|
||||
//erator ==(class RWTPtrOrderedVector<G4Curve> a, class RWTPtrOrderedVector<G4Curve> b){}
|
||||
//erator ==(class G4RWTPtrOrderedVector<G4Curve> a, class G4RWTPtrOrderedVector<G4Curve> b){}
|
||||
#include "globals.hh"
|
||||
#include "instmgr.h"
|
||||
#include "STEPentity.h"
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
//#include "G4OrderedTable.hh"
|
||||
//#include "G4NISTStepReader.hh"
|
||||
|
||||
//typedef RWTPtrOrderedVector<G4Curve> G4CurveVector;
|
||||
//typedef RWTPtrOrderedVector<G4CurveVector> G4BoundaryVector;
|
||||
//typedef RWTPtrOrderedVector<G4PlacedSolid> G4PlacedSolidVector;
|
||||
//typedef RWTPtrOrderedVector<G4GeometryCreator*> G4CreatorVector;
|
||||
typedef RWTPtrOrderedVector<G4GeometryCreator> G4CreatorVector;
|
||||
//typedef RWTPtrOrderedVector<G4Surface> G4SurfaceVector;
|
||||
//typedef RWTPtrOrderedVector<G4BREPSolid> G4SolidVector;
|
||||
//typedef G4RWTPtrOrderedVector<G4Curve> G4CurveVector;
|
||||
//typedef G4RWTPtrOrderedVector<G4CurveVector> G4BoundaryVector;
|
||||
//typedef G4RWTPtrOrderedVector<G4PlacedSolid> G4PlacedSolidVector;
|
||||
//typedef G4RWTPtrOrderedVector<G4GeometryCreator*> G4CreatorVector;
|
||||
typedef G4RWTPtrOrderedVector<G4GeometryCreator> G4CreatorVector;
|
||||
//typedef G4RWTPtrOrderedVector<G4Surface> G4SurfaceVector;
|
||||
//typedef G4RWTPtrOrderedVector<G4BREPSolid> G4SolidVector;
|
||||
|
||||
|
||||
|
||||
//operator ==(class RWTPtrOrderedVector<G4Curve> a, class RWTPtrOrderedVector<G4Curve> b){}
|
||||
//operator ==(class G4RWTPtrOrderedVector<G4Curve> a, class G4RWTPtrOrderedVector<G4Curve> b){}
|
||||
|
||||
|
||||
class G4GeometryTable
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
// 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: G4NISTStepReader.hh,v 1.1.4.1 1999/12/07 20:48:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
#ifndef G4NISTSTEPFILEREADER_HH
|
||||
#define G4NISTSTEPFILEREADER_HH
|
||||
#include "G4StepFileReader.hh"
|
||||
|
||||
#include "STEPfile.h" /* STEPfile class and others used by SCL */
|
||||
#include "sdai.h" /* definitions of for EXRPESS built-in types */
|
||||
#include "schema.h"
|
||||
#include "instmgr.h"
|
||||
//#include "G4StepFile.h" /* or suitable substitute */
|
||||
|
||||
|
||||
#ifdef __O3DB__
|
||||
#include <OpenOODB.h>
|
||||
#endif
|
||||
|
||||
#include "instmgr.h"
|
||||
#include "Registry.h"
|
||||
//#include "STEPfile.h"
|
||||
#include "STEPentity.h"
|
||||
#include "STEPaggregate.h"
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Function defined as a stub (necessary to use the scl)
|
||||
// The purpose of this function is to allow the DisplayNode object to delete
|
||||
// an object that it knows nothing about. It was made generic so that the scl
|
||||
// could be used with any display toolkit.
|
||||
//
|
||||
// This function is called by the DisplayNode object
|
||||
// This function needs to be defined outside the SCL libraries. It needs to do
|
||||
// two things:
|
||||
// 1) unmap the StepEntityEditor window if it is mapped.
|
||||
// 2) delete the StepEntityEditor window
|
||||
// To see an example of this function used with the Data Probe look in
|
||||
// ../clprobe-ui/StepEntEditor.cc Look at DeleteSEE() and ~StepEntityEditor().
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// this function illustrates a good way to Generate and assign file identifiers
|
||||
/*
|
||||
void AssignFileId (STEPentity *se, InstMgr& instance_list)
|
||||
{
|
||||
int fId = instance_list.MaxFileId() + 1;
|
||||
se->STEPfile_id = (fId > 0) ? fId : 1;
|
||||
}
|
||||
*/
|
||||
|
||||
// define this to be the name of the display window object for
|
||||
// STEP entity instance editing or define your own.
|
||||
// This is only needed as there's a link to these from the toolkit
|
||||
class STEPentity;
|
||||
class InstMgr;
|
||||
class StepEntityEditor
|
||||
{
|
||||
public:
|
||||
StepEntityEditor() {};
|
||||
~StepEntityEditor() {};
|
||||
};
|
||||
|
||||
extern void AssignFileId (STEPentity *se, InstMgr& instance_list);
|
||||
extern STEPentity *GetEntity (STEPnode *node, InstMgr *im);
|
||||
|
||||
// This needs to be defined for the STEPfile reader
|
||||
extern void SchemaInit (Registry &);
|
||||
|
||||
class G4NISTStepReader: public G4StepFileReader
|
||||
{
|
||||
public:
|
||||
void ReadSTEPFile(G4String);
|
||||
void SaveSTEPFile();
|
||||
void UpdateSTEPFile();
|
||||
InstMgr GetInstanceManager(){return InstanceList;}
|
||||
|
||||
private:
|
||||
InstMgr InstanceList;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,26 @@
|
||||
// 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: G4StepFileReader.hh,v 1.1.4.1 1999/12/07 20:48:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
#ifndef G4STEPFILEREADER_HH
|
||||
#define G4STEPFILEREADER_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include "instmgr.h"
|
||||
|
||||
class G4StepFileReader
|
||||
{
|
||||
public:
|
||||
virtual void ReadSTEPFile(G4String)=0;
|
||||
virtual void SaveSTEPFile()=0;
|
||||
virtual void UpdateSTEPFile()=0;
|
||||
virtual InstMgr GetInstanceManager()=0;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "G4BSplineCurveWithKnotsCreator.hh"
|
||||
#include "G4BSplineCurve.hh"
|
||||
typedef RWTValVector<G4double> G4doubleVector;
|
||||
typedef G4RWTValVector<G4double> G4doubleVector;
|
||||
|
||||
G4BSplineCurveWithKnotsCreator G4BSplineCurveWithKnotsCreator::csc;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "G4BoundedSurfaceCreator.hh"
|
||||
#include "STEPcomplex.h"
|
||||
|
||||
G4BoundedSurfaceCreator G4BoundedSurfaceCreator::csc;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "G4GeometryCreator.hh"
|
||||
#include "G4GeometryTable.hh"
|
||||
#include "STEPcomplex.h"
|
||||
|
||||
InstMgr G4GeometryCreator::instanceManager;
|
||||
G4int G4GeometryCreator::objectId = 0;
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// 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: G4NISTStepReader.cc,v 1.1.4.1 1999/12/07 20:48:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
#include "G4NISTStepReader.hh"
|
||||
|
||||
void G4NISTStepReader::ReadSTEPFile(G4String STEPfilename)
|
||||
{
|
||||
// Reads the Step file into the nist toolkit class library
|
||||
|
||||
// if the comments below look canned, it's because they're taken
|
||||
// straight from the treg source... ;-)
|
||||
|
||||
// This has to be Done before anything else. This initializes
|
||||
// all of the registry information for the schema you are using.
|
||||
// The SchemaInit() function is generated by fedex_plus... see
|
||||
// extern statement above.
|
||||
Registry *registry = new Registry(SchemaInit);
|
||||
|
||||
// The nifty thing about the Registry is that it basically keeps a List
|
||||
// of everything in your schema. What this means is that we can go
|
||||
// through the Registry and instantiate, say, one of everything, without
|
||||
// knowing at coding-time what entities there are to instantiate. So,
|
||||
// this test could be linked with other class libraries produced from
|
||||
// other schema, rather than the example, and run happily.
|
||||
|
||||
// InstMgr InstanceList;
|
||||
STEPfile *sfile = new STEPfile(*registry, InstanceList);
|
||||
|
||||
// The STEPfile is actually an object that manages the relationship
|
||||
// between what's instantiated in the instance manager, and how that
|
||||
// information gets passed to the outside, e.g., a file on disk.
|
||||
|
||||
// First we're going to read in the data from the input STEPfile,
|
||||
// and Print it to stdout
|
||||
|
||||
// Reading the STEPfile instantiates all the objects in it.
|
||||
// The instances get pointers into the InstMgr, and each type
|
||||
// and entity gets a pointer into the registry.
|
||||
G4cout << "\n### Reading exchange file from " << STEPfilename << endl;
|
||||
sfile->ReadExchangeFile(STEPfilename);
|
||||
|
||||
// Just checking... ;-)
|
||||
G4cout << "\n### The InstMgr says there are ";
|
||||
G4cout << InstanceList.InstanceCount() << " instantiated objects" << endl;
|
||||
|
||||
// G4cout << "\n### Here is the exchange file:" << endl << endl;
|
||||
// sfile->WriteExchangeFile(G4cout);
|
||||
|
||||
delete sfile;
|
||||
delete registry;
|
||||
}
|
||||
|
||||
|
||||
void G4NISTStepReader::SaveSTEPFile(){}
|
||||
|
||||
void G4NISTStepReader::UpdateSTEPFile(){}
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "G4RepresentationRelationshipCreator.hh"
|
||||
#include "G4PlacementVector.hh"
|
||||
#include "STEPcomplex.h"
|
||||
|
||||
G4RepresentationRelationshipCreator G4RepresentationRelationshipCreator::csc;
|
||||
G4int G4RepresentationRelationshipCreator::placeCount=0;
|
||||
|
||||
Reference in New Issue
Block a user