G4OCCT 0.1.0
Geant4 interface to Open CASCADE Technology (OCCT) geometry definitions
Loading...
Searching...
No Matches
G4OCCTLogicalVolume Class Reference

Extends Geant4's G4LogicalVolume with an associated OCCT shape. More...

#include <G4OCCTLogicalVolume.hh>

Inheritance diagram for G4OCCTLogicalVolume:

Public Member Functions

 G4OCCTLogicalVolume (G4VSolid *pSolid, G4Material *pMaterial, const G4String &name, const TopoDS_Shape &shape=TopoDS_Shape())
 
 ~G4OCCTLogicalVolume () override=default
 
const TopoDS_Shape & GetOCCTShape () const
 Read access to the associated OCCT shape.
 
void SetOCCTShape (const TopoDS_Shape &shape)
 Replace the associated OCCT shape.
 

Detailed Description

Extends Geant4's G4LogicalVolume with an associated OCCT shape.

Extends Geant4's G4LogicalVolume to carry an optional OCCT shape reference alongside the standard Geant4 solid, material, and field pointers.

In the OCCT framework, a "logical volume" has no direct equivalent. The closest concept is a named compound or sub-assembly in a TopoDS_Compound tree: a node that groups child shapes under a common identity (name, material attributes, visual style) without a concrete spatial location. XDE (Extended Data Exchange via TDocStd_Document / XCAFDoc) provides the XDE label mechanism that can store shape, name, colour, material, and placement information in a structured document tree, which is the OCCT counterpart to the Geant4 volume hierarchy.

Design strategies for connecting these representations are discussed in docs/geometry_mapping.md.

NOTE: The OCCT shape stored here is informational only; it is not used during navigation in this initial implementation.

Definition at line 36 of file G4OCCTLogicalVolume.hh.

Constructor & Destructor Documentation

◆ G4OCCTLogicalVolume()

G4OCCTLogicalVolume::G4OCCTLogicalVolume ( G4VSolid *  pSolid,
G4Material *  pMaterial,
const G4String &  name,
const TopoDS_Shape &  shape = TopoDS_Shape() 
)

Construct a logical volume.

Parameters
pSolidPointer to the associated Geant4 solid (may be a G4OCCTSolid wrapping an OCCT shape).
pMaterialPointer to the material filling this volume.
nameName of this logical volume.
shapeOCCT shape associated with this volume (optional).

Definition at line 9 of file G4OCCTLogicalVolume.cc.

◆ ~G4OCCTLogicalVolume()

G4OCCTLogicalVolume::~G4OCCTLogicalVolume ( )
overridedefault

Member Function Documentation

◆ GetOCCTShape()

const TopoDS_Shape & G4OCCTLogicalVolume::GetOCCTShape ( ) const
inline

Read access to the associated OCCT shape.

Definition at line 55 of file G4OCCTLogicalVolume.hh.

◆ SetOCCTShape()

void G4OCCTLogicalVolume::SetOCCTShape ( const TopoDS_Shape &  shape)
inline

Replace the associated OCCT shape.

Definition at line 58 of file G4OCCTLogicalVolume.hh.


The documentation for this class was generated from the following files: