|
G4OCCT 0.1.0
Geant4 interface to Open CASCADE Technology (OCCT) geometry definitions
|
Extends Geant4's G4PVPlacement with the corresponding OCCT placement. More...
#include <G4OCCTPlacement.hh>
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. | |
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.
| 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.
| pRot | Rotation relative to the mother volume (may be nullptr for identity). |
| tlate | Translation relative to the mother volume. |
| pCurrentLogical | Logical volume being placed. |
| pName | Name of this physical volume. |
| pMotherLogical | Mother logical volume (nullptr for world). |
| pMany | Overlapping flag (must be false for now). |
| pCopyNo | Copy number. |
| location | Corresponding OCCT placement location (optional). |
| pSurfChk | Run overlap check during construction if true. |
Definition at line 9 of file G4OCCTPlacement.cc.
|
overridedefault |
|
inline |
Read access to the OCCT placement location.
Definition at line 65 of file G4OCCTPlacement.hh.
|
inline |
Replace the OCCT placement location.
Definition at line 68 of file G4OCCTPlacement.hh.