G4OCCT 0.1.0
Geant4 interface to Open CASCADE Technology (OCCT) geometry definitions
Loading...
Searching...
No Matches
G4OCCT_STEPAssembly_impl.cc File Reference

OCCT-side implementation of the STEP assembly import bridge. More...

#include "G4OCCT_STEPAssembly_impl.hh"
#include "G4OCCT/G4OCCTAssemblyVolume.hh"
#include "G4OCCT/G4OCCTMaterialMap.hh"
#include <map>
#include <stdexcept>
#include <string>

Go to the source code of this file.

Functions

int G4OCCT_ImportSTEPAssembly (const std::string &path, const std::map< std::string, G4Material * > &materials)
 

Detailed Description

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.

Function Documentation

◆ G4OCCT_ImportSTEPAssembly()

int G4OCCT_ImportSTEPAssembly ( const std::string &  path,
const std::map< std::string, G4Material * > &  materials 
)

Import a STEP assembly, build the G4OCCTAssemblyVolume, and return the number of constituent solids found.

Parameters
pathPath to the STEP file.
materialsMap of STEP material name → G4Material*. Throws std::runtime_error on failure.

Definition at line 22 of file G4OCCT_STEPAssembly_impl.cc.

References G4OCCTMaterialMap::Add(), G4OCCTAssemblyVolume::FromSTEP(), and G4OCCTAssemblyVolume::GetLogicalVolumes().

Referenced by create_step_assembly().