|
G4OCCT 0.1.0
Geant4 interface to Open CASCADE Technology (OCCT) geometry definitions
|
OCCT-side implementation of the STEP assembly import bridge. More...
#include "G4OCCT_STEPAssembly_impl.hh"#include "G4OCCT/G4OCCTAssemblyRegistry.hh"#include "G4OCCT/G4OCCTAssemblyVolume.hh"#include "G4OCCT/G4OCCTMaterialMap.hh"#include <map>#include <memory>#include <stdexcept>#include <string>#include <vector>Go to the source code of this file.
Functions | |
| int | G4OCCT_ImportSTEPAssembly (const std::string &path, const std::map< std::string, G4Material * > &materials, const std::string &detectorName, const std::vector< std::string > &) |
OCCT-side implementation of the STEP assembly import bridge.
This TU includes G4OCCT and OpenCASCADE headers and must NOT include any DD4hep or ROOT headers to avoid the Printf return-type collision (see G4OCCT_STEPAssembly_impl.hh).
Definition in file G4OCCT_STEPAssembly_impl.cc.
| int G4OCCT_ImportSTEPAssembly | ( | const std::string & | path, |
| const std::map< std::string, G4Material * > & | materials, | ||
| const std::string & | detectorName, | ||
| const std::vector< std::string > & | sensitiveNames | ||
| ) |
Import a STEP assembly, build the G4OCCTAssemblyVolume, register it in G4OCCTAssemblyRegistry under detectorName, and return the number of constituent solids found. The assembly lifetime is managed by the registry.
| path | Path to the STEP file. |
| materials | Map of STEP material name → G4Material*. |
| detectorName | Key to register the assembly under in G4OCCTAssemblyRegistry. |
| sensitiveNames | Volume name patterns to receive SD assignment (informational; SD assignment happens at ConstructSDandField time). Throws std::runtime_error on failure. |
Definition at line 25 of file G4OCCT_STEPAssembly_impl.cc.
References G4OCCTMaterialMap::Add(), G4OCCTAssemblyVolume::FromSTEP(), G4OCCTAssemblyRegistry::Instance(), and G4OCCTAssemblyRegistry::Register().
Referenced by create_step_assembly().