pyg4ometry.convert.oce2Geant4

Attributes

Functions

oceShape_Geant4_LogicalVolume(name, solid, material, greg)

Make a logical volume from input or get from registry

oceShape_Geant4_Assembly(name, greg)

Make a assembly volume from input or get from registry

oceShape_Geant4_Tessellated(name, shape, greg[, ...])

Make a tessellated solid from a OpenCascade shape

_oce2Geant4_traverse(shapeTool, label, greg, ...[, ...])

oce2Geant4(shapeTool, shapeName[, materialMap, ...])

Convert CAD geometry starting from shapeName

Module Contents

pyg4ometry.convert.oce2Geant4.defaultLinDef = 0.5
pyg4ometry.convert.oce2Geant4.deftaulAngDef = 0.5
pyg4ometry.convert.oce2Geant4.oceShape_Geant4_LogicalVolume(name, solid, material, greg)

Make a logical volume from input or get from registry

Parameters:
pyg4ometry.convert.oce2Geant4.oceShape_Geant4_Assembly(name, greg)

Make a assembly volume from input or get from registry

Parameters:
pyg4ometry.convert.oce2Geant4.oceShape_Geant4_Tessellated(name, shape, greg, linDef=0.5, angDef=0.5)

Make a tessellated solid from a OpenCascade shape

Parameters:
  • name (str) – Name of logical volume

  • shape (TopoDS_Shape) – OpenCascade shape

  • greg (geant4.Registry) – Geant4 registry

pyg4ometry.convert.oce2Geant4._oce2Geant4_traverse(shapeTool, label, greg, materialMap, labelToSkipList, meshQualityMap, badCADLabels, addBoundingSolids=False, oceName=False)
pyg4ometry.convert.oce2Geant4.oce2Geant4(shapeTool, shapeName, materialMap={}, labelToSkipList=[], meshQualityMap={}, oceName=False)

Convert CAD geometry starting from shapeName

Parameters:
  • shapeTool (pyoce.TopoDS_Shape) – OpenCascade TopoDS_Shape

  • shapeName (str) – Name of the shape in the CAD file

  • materialMap (dict) – dictionary to map shape name to material shapeName:materialName or shapeName:Material

  • meshQualityMap (dict) – dictionary to map shape name to meshing quality str:[LinDef,AngDef]