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

DD4hep detector-element plugin: single solid from a STEP file. More...

#include <DD4hep/DetFactoryHelper.h>
#include <DD4hep/Printout.h>
#include <TGeoTessellated.h>
#include "G4OCCT_STEPSolid_impl.hh"
#include <cstddef>
#include <limits>
#include <stdexcept>
#include <string>

Go to the source code of this file.

Functions

static Ref_t create_step_solid (Detector &description, xml_h e, SensitiveDetector)
 

Detailed Description

DD4hep detector-element plugin: single solid from a STEP file.

Compact XML usage:

<detector id="1" name="MyBeamPipe" type="G4OCCT_STEPSolid" vis="BlueVis">
<step_file path="geometry/beampipe.step"/>
<position x="0" y="0" z="0"/>
<rotation x="0" y="0" z="0"/>
<material name="Aluminium"/>
</detector>

Phase 1 implementation notes

The plugin imports the STEP file via G4OCCTSolid::FromSTEP and tessellates the resulting solid (1 % relative deflection) to produce a dd4hep::TessellatedSolid for the TGeo representation. This gives TGeo and visualisation tools the actual surface geometry rather than a bounding-box approximation.

Todo:
Phase 2: replace the TessellatedSolid with a proper TGeo↔G4OCCTSolid bridge so that Geant4 navigation uses the exact OCCT BRep geometry for all geometric queries (SurfaceNormal, DistanceToIn, etc.).

Definition in file G4OCCT_STEPSolid.cc.

Function Documentation

◆ create_step_solid()

static Ref_t create_step_solid ( Detector &  description,
xml_h  e,
SensitiveDetector   
)
static

Definition at line 49 of file G4OCCT_STEPSolid.cc.

References G4OCCT_ImportSTEPSolid().