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

Extends Geant4's G4PVPlacement with the corresponding OCCT placement. More...

#include <G4OCCTPlacement.hh>

Inheritance diagram for G4OCCTPlacement:

Public Member Functions

 G4OCCTPlacement (G4RotationMatrix *pRot, const G4ThreeVector &tlate, G4LogicalVolume *pCurrentLogical, const G4String &pName, G4LogicalVolume *pMotherLogical, G4bool pMany, G4int pCopyNo, const TopLoc_Location &location=TopLoc_Location(), G4bool pSurfChk=false)
 
 ~G4OCCTPlacement () override=default
 
const TopLoc_Location & GetOCCTLocation () const
 Read access to the OCCT placement location.
 
void SetOCCTLocation (const TopLoc_Location &location)
 Replace the OCCT placement location.
 

Detailed Description

Extends Geant4's G4PVPlacement with the corresponding OCCT placement.

Extends Geant4's G4PVPlacement to carry the corresponding OCCT placement (TopLoc_Location), enabling round-trip translation between the two geometry frameworks.

In OCCT, placement information is encoded in TopLoc_Location objects that are attached to TopoDS_Shape instances. A TopLoc_Location wraps a gp_Trsf (4×3 homogeneous transformation), which may be a pure rotation, translation, or a general rigid-body motion—closely matching the rotation (G4RotationMatrix*) and translation (G4ThreeVector) pair stored in a Geant4 physical volume.

The correspondence between the two representations is: G4PVPlacement / G4VPhysicalVolume ↔ TopoDS_Shape with TopLoc_Location G4RotationMatrix + G4ThreeVector ↔ gp_Trsf (stored in TopLoc_Location)

Design strategies for efficiently converting between these representations are discussed in docs/geometry_mapping.md.

NOTE: The OCCT location stored here is informational only; conversion helpers are planned for a future milestone.

Definition at line 39 of file G4OCCTPlacement.hh.

Constructor & Destructor Documentation

◆ G4OCCTPlacement()

G4OCCTPlacement::G4OCCTPlacement ( G4RotationMatrix *  pRot,
const G4ThreeVector &  tlate,
G4LogicalVolume *  pCurrentLogical,
const G4String &  pName,
G4LogicalVolume *  pMotherLogical,
G4bool  pMany,
G4int  pCopyNo,
const TopLoc_Location &  location = TopLoc_Location(),
G4bool  pSurfChk = false 
)

Construct a placement using a rotation matrix and translation.

Parameters
pRotRotation relative to the mother volume (may be nullptr for identity).
tlateTranslation relative to the mother volume.
pCurrentLogicalLogical volume being placed.
pNameName of this physical volume.
pMotherLogicalMother logical volume (nullptr for world).
pManyOverlapping flag (must be false for now).
pCopyNoCopy number.
locationCorresponding OCCT placement location (optional).
pSurfChkRun overlap check during construction if true.

Definition at line 9 of file G4OCCTPlacement.cc.

◆ ~G4OCCTPlacement()

G4OCCTPlacement::~G4OCCTPlacement ( )
overridedefault

Member Function Documentation

◆ GetOCCTLocation()

const TopLoc_Location & G4OCCTPlacement::GetOCCTLocation ( ) const
inline

Read access to the OCCT placement location.

Definition at line 65 of file G4OCCTPlacement.hh.

◆ SetOCCTLocation()

void G4OCCTPlacement::SetOCCTLocation ( const TopLoc_Location &  location)
inline

Replace the OCCT placement location.

Definition at line 68 of file G4OCCTPlacement.hh.


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