Module Contents
This documentation is automatically generated by scanning all the source code. Parts may be incomplete.
Defines and variables
- pyg4ometry.gdml.Defines.acos(arg)
ArcCos of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of acos
- pyg4ometry.gdml.Defines.asin(arg)
ArcSin of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of asin
- pyg4ometry.gdml.Defines.atan(arg)
ArcTan of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of tan
- pyg4ometry.gdml.Defines.cos(arg)
Cosine of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of cos
- pyg4ometry.gdml.Defines.exp(arg)
Exponential of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of exp
- pyg4ometry.gdml.Defines.log(arg)
Natural logarithm of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of log
- pyg4ometry.gdml.Defines.log10(arg)
Base 10 logarithm of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of log10
- pyg4ometry.gdml.Defines.sin(arg)
Sin of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of sin
- pyg4ometry.gdml.Defines.sqrt(arg)
Square root of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of sin
- pyg4ometry.gdml.Defines.tan(arg)
Tangent of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of tan
- pyg4ometry.gdml.Defines.upgradeToStringExpression(reg, obj)
Take a float, str, ScalarBase and return string expression
- Parameters:
reg (Registry) – Registry for lookup in define dictionary
obj (str,float,ScalarBase) – Object to upgrade
- Returns:
String expression
- Return type:
str
- pyg4ometry.gdml.Defines.upgradeToTransformation(var, reg, addRegistry=False)
Take a list of lists [[rx,ry,rz],[x,y,z]] and create a transformation [Rotation,Position]
- pyg4ometry.gdml.Defines.upgradeToVector(var, reg, type='position', unit='', addRegistry=False)
Take a list [x,y,z] and create a vector
- class pyg4ometry.gdml.Defines.ScalarBase
Bases:
object
Base class for all scalars (Constants, Quantity, Variable and Expression)
- __add__(other)
- __mul__(other)
- __neg__()
- __rsub__(other)
- __sub__(other)
- setExpression(expr)
- setName(name)
Set name of scalar
- Parameters:
name (str) – name of object
- setRegistry(registry)
- class pyg4ometry.gdml.Defines.Constant(name, value, registry, addRegistry=True)
Bases:
ScalarBase
GDML constant define wrapper object
- Parameters:
- eval()
Evaluate constant
- Returns:
numerical evaluation of Constant
- Return type:
float
- class pyg4ometry.gdml.Defines.Quantity(name, value, unit, type, registry, addRegistry=True)
Bases:
ScalarBase
GDML quantity define wrapper object
- Parameters:
- eval()
Evaluate quantity
- Returns:
numerical evaluation of Quantity
- Return type:
float
- class pyg4ometry.gdml.Defines.Variable(name, value, registry, addRegistry=True)
Bases:
ScalarBase
GDML variable define wrapper object
- Parameters:
- eval()
Evaluate variable
- Returns:
numerical evaluation of Constant
- Return type:
float
- class pyg4ometry.gdml.Defines.Expression(name, value, registry, addRegistry=False)
Bases:
ScalarBase
General expression, does not have an analogue in GDML
- Parameters:
- eval()
Evaluate expression
- Returns:
numerical evaluation of Constant
- Return type:
float
- pyg4ometry.gdml.Defines.acos(arg)
ArcCos of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of acos
- pyg4ometry.gdml.Defines.asin(arg)
ArcSin of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of asin
- pyg4ometry.gdml.Defines.atan(arg)
ArcTan of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of tan
- pyg4ometry.gdml.Defines.cos(arg)
Cosine of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of cos
- pyg4ometry.gdml.Defines.exp(arg)
Exponential of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of exp
- pyg4ometry.gdml.Defines.log(arg)
Natural logarithm of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of log
- pyg4ometry.gdml.Defines.log10(arg)
Base 10 logarithm of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of log10
- pyg4ometry.gdml.Defines.sin(arg)
Sin of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of sin
- pyg4ometry.gdml.Defines.sqrt(arg)
Square root of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of sin
- pyg4ometry.gdml.Defines.tan(arg)
Tangent of a ScalarBase object, returns a Constant
- Parameters:
arg (Constant, Quantity, Variable or Expression) – Argument of tan
- class pyg4ometry.gdml.Defines.VectorBase
Bases:
object
- __add__(other)
- __mul__(other)
- __rmul__(other)
- __sub__(other)
- eval()
Evaluate vector
- Returns:
numerical evaluation of vector
- Return type:
list of floats
- nonzero()
Evaluate vector
- Returns:
Check if the vector is trivial (all elements zero)
- Return type:
bool
- setName(name)
Set name of vector
- Parameters:
name (str) – name of object
- setRegistry(registry)
- class pyg4ometry.gdml.Position(name, x, y, z, unit='mm', registry=None, addRegistry=True)
Bases:
VectorBase
GDML position define wrapper object
- class pyg4ometry.gdml.Rotation(name, rx, ry, rz, unit='rad', registry=None, addRegistry=True)
Bases:
VectorBase
GDML rotation define wrapper object
- class pyg4ometry.gdml.Scale(name, sx, sy, sz, unit=None, registry=None, addRegistry=True)
Bases:
VectorBase
GDML scale define wrapper object
- class pyg4ometry.gdml.Matrix(name, coldim, values, registry, addRegistry=True)
Bases:
object
GDML matrix define wrapper object
- Parameters:
- eval()
Evaluate matrix
- Returns:
numerical evaluation of matrix
- Return type:
numpy.array
- pyg4ometry.gdml.MatrixFromVectors(e, v, name, registry, eunit='eV', vunit='')
Creates a GDML Matrix from an energy and a value vector
- Parameters:
name (str) – of matrix of registry
e (list or numpy.array - shape (1,)) – energy list/vector in units of eunit
v (list or numpy.array - shape (1,)) – value list/vector in units of vunit
registry (Registry) – for storing define
eunit (str) – unit for the energy vector (default: eV)
vunit (str) – unit for the value vector (default: unitless)
Geant4 solids
- class pyg4ometry.geant4.solid.Plane.Plane(name, normal, dist, zlength=10000)
Constructs a infinite plane. Should not be used to construct geant4 geometry.
- Parameters:
name (str) – of object in registry
normal (tuple) – normal [x,y,z]
dist (float) – distance from origin to plane
zlength (float) – large transverse box size to emulate infinite plane
- class pyg4ometry.geant4.solid.Wedge.Wedge(name, pRMax=1000, pSPhi=0, pDPhi=1.5, halfzlength=10000, nslice=None)
Constructs a infinite wedge. Should not be used to construct geant4 geometry.
- Parameters:
name (str) – of object in registry
normal (tuple) – normal [x,y,z]
dist (float) – distance from origin to plane
zlength (float) – large transverse box size to emulate infinite plane
- class pyg4ometry.geant4.solid.Box.Box(name, pX, pY, pZ, registry, lunit='mm', addRegistry=True)
Constructs a box. Note the lengths are full lengths and not half lengths as in Geant4
- Parameters:
name (str) – of solid for registry
pX (float, Constant, Quantity, Variable, Expression) – length along x
pY (float, Constant, Quantity, Variable, Expression) – length along y
pZ (float, Constant, Quantity, Variable, Expression) – length along z
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
- class pyg4ometry.geant4.solid.Tubs.Tubs(name, pRMin, pRMax, pDz, pSPhi, pDPhi, registry, lunit='mm', aunit='rad', nslice=None, addRegistry=True)
Constructs a cylindrical section.
- Parameters:
name (str) – of solid for registry
pDz (float, Constant, Quantity, Variable) – full length along z
pSPhi (float, Constant, Quantity, Variable) – starting phi angle
pDPhi (float, Constant, Quantity, Variable) – angle of segment in phi
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
aunit (str) – angle unit (rad,deg) for solid
nslice (int) – number of phi elements for meshing
- class pyg4ometry.geant4.solid.CutTubs.CutTubs(name, pRMin, pRMax, pDz, pSPhi, pDPhi, pLowNorm, pHighNorm, registry, lunit='mm', aunit='rad', nslice=None, addRegistry=True)
Constructs a cylindrical section with end face cuts. Note pLowNorm and pHighNorm can be lists of floats, Constants, Quantities or Variables.
- class pyg4ometry.geant4.solid.Cons.Cons(name, pRmin1, pRmax1, pRmin2, pRmax2, pDz, pSPhi, pDPhi, registry, lunit='mm', aunit='rad', nslice=None, addRegistry=True)
Constructs a conical section.
- Parameters:
name (str) – of the solid
pRMin1 (float, Constant, Quantity, Variable) – inner radius at -pDz/2
pRMax1 (float, Constant, Quantity, Variable) – outer radius at -pDz/2
pRMin2 (float, Constant, Quantity, Variable) – inner radius at +pDZ/2
pRMax2 (float, Constant, Quantity, Variable) – outer radius at +pDz/2
pSPhi (float, Constant, Quantity, Variable) – starting phi angle
pDPhi (float, Constant, Quantity, Variable) – angle of segment in radians
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
aunit (str) – angle unit (rad,deg) for solid
nslice (int) – number of phi elements for meshing
- class pyg4ometry.geant4.solid.Para.Para(name, pDx, pDy, pDz, pAlpha, pTheta, pPhi, registry, lunit='mm', aunit='rad', addRegistry=True)
Constructs a parallelepiped.
- Parameters:
name (str) – of the volume
pAlpha (float, Constant, Quantity, Variable) – angle formed by the y axis and the plane joining the centres of the faces parallel tothe z-x plane at -dy/2 and +dy/2
pTheta (float, Constant, Quantity, Variable) – polar angle of the line joining the centres of the faces at -dz/2 and +dz/2 in z
pPhi (float, Constant, Quantity, Variable) – azimuthal angle of the line joining the centres of the faces at -dx/2 and +dz/2 in z
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
aunit (str) – angle unit (rad,deg) for solid
- class pyg4ometry.geant4.solid.Trd.Trd(name, pDx1, pDx2, pDy1, pDy2, pDz, registry, lunit='mm', addRegistry=True)
Constructs a trapezoid.
- Parameters:
name (str) – of the solid
pDx1 (float, Constant, Quantity, Variable) – length along x at the surface positioned at -dz/2
pDx2 (float, Constant, Quantity, Variable) – length along x at the surface postitioned at +dz/2
pDy1 (float, Constant, Quantity, Variable) – length along y at the surface positioned at -dz/2
pDy2 (float, Constant, Quantity, Variable) – length along y at the surface positioned at +dz/2
dz (float, Constant, Quantity, Variable) – length along the z axis
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
- class pyg4ometry.geant4.solid.Trap.Trap(name, pDz, pTheta, pDPhi, pDy1, pDx1, pDx2, pAlp1, pDy2, pDx3, pDx4, pAlp2, registry, lunit='mm', aunit='rad', addRegistry=True)
Constructs a general trapezoid.
- Parameters:
name (str) – name of the volume
pDz (float, Constant, Quantity, Variable, Expression) – half length along z
pTheta (float, Constant, Quantity, Variable, Expression) – polar angle of the line joining the centres of the faces at -/+pDz
pPhi (float, Constant, Quantity, Variable, Expression) – azimuthal angle of the line joining the centres of the faces at -/+pDz
pDy1 (float, Constant, Quantity, Variable, Expression) – half-length at -pDz
pDx1 (float, Constant, Quantity, Variable, Expression) – half length along x of the side at y=-pDy1
pDx2 (float, Constant, Quantity, Variable, Expression) – half length along x of the side at y=+pDy1
pAlp1 (float, Constant, Quantity, Variable, Expression) – angle wrt the y axis from the centre of the side (lower endcap)
pDy2 (float, Constant, Quantity, Variable, Expression) – half-length at +pDz
pDx3 (float, Constant, Quantity, Variable, Expression) – half-length of the side at y=-pDy2 of the face at +pDz
pDx4 (float, Constant, Quantity, Variable, Expression) – half-length of the side at y=+pDy2 of the face at +pDz
pAlp2 (float, Constant, Quantity, Variable, Expression) – angle wrt the y axis from the centre of the side (upper endcap)
- class pyg4ometry.geant4.solid.Sphere.Sphere(name, pRmin, pRmax, pSPhi, pDPhi, pSTheta, pDTheta, registry, lunit='mm', aunit='rad', nslice=None, nstack=None, addRegistry=True)
Constructs a section of a spherical shell.
- Parameters:
name (str) – of object in registry
pRmin (float, Constant, Quantity, Variable) – inner radius of the shell
pRmax (float, Constant, Quantity, Variable) – outer radius of the shell
pSPhi (float, Constant, Quantity, Variable) – starting phi angle in radians
pSTheta (float, Constant, Quantity, Variable) – starting theta angle in radians
pDPhi (float, Constant, Quantity, Variable) – delta phi angle in radians
pDTheta (float, Constant, Quantity, Variable) – delta theta angle in radians
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
aunit (str) – angle unit (rad,deg) for solid
nslice (int) – number of phi elements for meshing
nstack (int) – number of theta elements for meshing
- mesh()
working off 0 < phi < 2pi 0 < theta < pi
- class pyg4ometry.geant4.solid.Orb.Orb(name, pRMax, registry, lunit='mm', nslice=None, nstack=None, addRegistry=True)
Constructs a solid sphere.
- Parameters:
name (str) – of the sold
pRMax (float, Constant, Quantity, Variable, Expression) – outer radius
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
nslice (int) – number of phi elements for meshing
nstack (int) – number of theta elements for meshing
- class pyg4ometry.geant4.solid.Torus.Torus(name, pRmin, pRmax, pRtor, pSPhi, pDPhi, registry, lunit='mm', aunit='rad', nslice=None, nstack=None, addRegistry=True)
Constructs a torus.
- Parameters:
name (str) – string, name of the volume
pRmin (float, Constant, Quantity, Variable, Expression) – innder radius
pRmax – outer radius
pRtor (float, Constant, Quantity, Variable, Expression) – swept radius of torus
pSphi (float, Constant, Quantity, Variable, Expression) – start phi angle
pDPhi (float, Constant, Quantity, Variable, Expression) – delta phi angle
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
aunit (str) – angle unit (rad,deg) for solid
nslice (int) – number of phi elements for meshing
nstack (int) – number of theta elements for meshing
- class pyg4ometry.geant4.solid.Polycone.Polycone(name, pSPhi, pDPhi, pZpl, pRMin, pRMax, registry, lunit='mm', aunit='rad', nslice=None, addRegistry=True)
Constructs a solid of rotation using an arbitrary 2D surface.
- Parameters:
name (str) – of the solid
pSPhi (float, Constant, Quantity, Variable, Expression) – starting rotation angle in radians
pDPhi (float, Constant, Quantity, Variable, Expression) – total rotation angle in radius
pZPlns (list of float, Constant, Quantity, Variable, Expression) – z-positions of planes used
pRInr (list of float, Constant, Quantity, Variable, Expression) – inner radii of surface at each z-plane
pROut (list of float, Constant, Quantity, Variable, Expression) – outer radii of surface at each z-plane
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
aunit (str) – angle unit (rad,deg) for solid
nslice (int) – number of phi elements for meshing
Optional registration as this solid is used as a temporary solid in Polyhedra and needn’t be always registered.
- class pyg4ometry.geant4.solid.GenericPolycone.GenericPolycone(name, pSPhi, pDPhi, pR, pZ, registry, lunit='mm', aunit='rad', nslice=None, addRegistry=True)
Constructs a solid of rotation using an arbitrary 2D surface defined by a series of (r,z) coordinates.
- Parameters:
name (str) – of solid
pSPhi (float, Constant, Quantity, Variable, Expression) – angle phi at start of rotation
pDPhi (float, Constant, Quantity, Variable, Expression) – angle Phi at end of rotation
pR (list of float, Constant, Quantity, Variable, Expression) – r coordinate
pZ (list of float, Constant, Quantity, Variable, Expression) – z coordinate
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
aunit (str) – angle unit (rad,deg) for solid
nslice (int) – number of phi elements for meshing
- class pyg4ometry.geant4.solid.GenericPolyhedra.GenericPolyhedra(name, pSPhi, pDPhi, numSide, pR, pZ, registry, lunit='mm', aunit='rad', addRegistry=True)
Constructs a solid of rotation using an arbitrary 2D surface defined by a series of (r,z) coordinates.
- Parameters:
name (str) – name
pSPhi (float, Constant, Quantity, Variable, Expression) – angle Phi at start of rotation
pDPhi (float, Constant, Quantity, Variable, Expression) – angle Phi at end of rotation
numSide (float, Constant, Quantity, Variable, Expression) – number of polygon sides
pR (list of float, Constant, Quantity, Variable, Expression) – r coordinate list
pZ (list of float, Constant, Quantity, Variable, Expression) – z coordinate list
- class pyg4ometry.geant4.solid.Polyhedra.Polyhedra(name, pSPhi, pDPhi, numSide, numZPlanes, zPlane, rInner, rOuter, registry, lunit='mm', aunit='rad', addRegistry=True)
Constructs a polyhedra.
- Parameters:
name (str) – of solid
pSPhi (float, Constant, Quantity, Variable, Expression) – start phi angle
pDPhi (float, Constant, Quantity, Variable, Expression) – delta phi angle
numSide (int) – number of sides
numZPlanes (int) – number of planes along z
zPlane (list of float, Constant, Quantity, Variable, Expression) – position of z planes
rInner (list of float, Constant, Quantity, Variable, Expression) – tangent distance to inner surface per z plane
rOuter (list of float, Constant, Quantity, Variable, Expression) – tangent distance to outer surface per z plane
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
aunit (str) – angle unit (rad,deg) for solid
- class pyg4ometry.geant4.solid.EllipticalCone.EllipticalCone(name, pxSemiAxis, pySemiAxis, zMax, pzTopCut, registry, lunit='mm', nslice=None, nstack=None, addRegistry=True)
Constructs a cone with elliptical cross-section and an optional cut. Both zMax and pzTopCut are half lengths extending from the centre of the cone, at z=0.
- Parameters:
name (str) – name of the volume
pxSemiAxis (float, Constant, Quantity, Variable, Expression) – semiaxis in x at z=0 as a fraction of zMax.
pySemiAxis (float, Constant, Quantity, Variable, Expression) – semiaxis in y at z=0 as a fraction of zMax
zMax (float, Constant, Quantity, Variable, Expression) – half length of the cone.
pzTopCut (float, Constant, Quantity, Variable, Expression) – half length of the cut.
- class pyg4ometry.geant4.solid.EllipticalTube.EllipticalTube(name, pDx, pDy, pDz, registry, lunit='mm', nstack=None, nslice=None, addRegistry=True)
Constructs a tube of elliptical cross-section.
- Parameters:
name (str) – name of the solid
pDx (float, Constant, Quantity, Variable, Expression) – length in x
pDy (float, Constant, Quantity, Variable, Expression) – length in y
pDz (float, Constant, Quantity, Variable, Expression) – length in z
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
nslice (int) – number of phi elements for meshing
nstack (int) – number of theta elements for meshing
- mesh()
new meshing based of Tubs meshing
- class pyg4ometry.geant4.solid.Ellipsoid.Ellipsoid(name, pxSemiAxis, pySemiAxis, pzSemiAxis, pzBottomCut, pzTopCut, registry, lunit='mm', nslice=None, nstack=None, addRegistry=True)
Constructs an ellipsoid optinoally cut by planes perpendicular to the z-axis.
- Parameters:
name (str) – of the solid
pxSemiAxis (float, Constant, Quantity, Variable, Expression) – length of x semi axis
pySemiAxis (float, Constant, Quantity, Variable, Expression) – length of y semi axis
pzSemiAxis (float, Constant, Quantity, Variable, Expression) – length of z semi axis
pzBottomCut (float, Constant, Quantity, Variable, Expression) – z-position of bottom cut plane
pzTopCut (float, Constant, Quantity, Variable, Expression) – z-position of top cut plane
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
nslice (int) – number of phi elements for meshing
nstack (int) – number of theta elements for meshing
- class pyg4ometry.geant4.solid.Paraboloid.Paraboloid(name, pDz, pR1, pR2, registry, lunit='mm', nslice=16, nstack=8, addRegistry=True)
Constructs a paraboloid with possible cuts along the z axis.
- Parameters:
name (str) – of solid
pDz (float, Constant, Quantity, Variable, Expression) – length along z
pR1 (float, Constant, Quantity, Variable, Expression) – radius at -Dz/2
pR2 (float, Constant, Quantity, Variable, Expression) – radius at +Dz/2 (pR2 > pR1)
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
nslice (int) – number of phi elements for meshing
nstack (int) – number of theta elements for meshing
- class pyg4ometry.geant4.solid.Hype.Hype(name, innerRadius, outerRadius, innerStereo, outerStereo, lenZ, registry, lunit='mm', aunit='rad', nslice=None, nstack=None, addRegistry=True)
Constructs a tube with hyperbolic profile.
- Parameters:
name (str) – of solid
innerRadius (float, Constant, Quantity, Variable, Expression) – inner radius
outerRadius (float, Constant, Quantity, Variable, Expression) – outer radius
innerStereo (float, Constant, Quantity, Variable, Expression) – inner stereo angle
outerStereo (float, Constant, Quantity, Variable, Expression) – outer stereo angle
lenZ – length along z
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
aunit (str) – angle unit (rad,deg) for solid
nslice (int) – number of phi elements for meshing
nstack (int) – number of theta elements for meshing
- class pyg4ometry.geant4.solid.Tet.Tet(name, anchor, p2, p3, p4, registry, lunit='mm', degeneracyFlag=False, addRegistry=True)
Constructs a tetrahedra.
- Parameters:
name – of the solid
anchor (list) – point 1 (anchor point)
p2 (list) – point 2
p3 (list) – point 3
p4 (list) – point 4
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
degeneracyFlag – bool, indicates degeneracy of points
- class pyg4ometry.geant4.solid.ExtrudedSolid.ExtrudedSolid(name, pPolygon, pZslices, registry, lunit='mm', addRegistry=True)
Construct an extruded solid
- Parameters:
name (str) – of solid
pPolygon (list of lists) – x-y coordinates of vertices for the polygon.
pZslices (list of lists) – z-coordinates of a slice, slice offsets in x-y and scaling
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
Example: Triangular prism with 2 slices pPoligon = [[x1,y1],[x2,y2],[x3,y3]] - vertices of polygon in clockwise order zSlices = [[z1,[offsx1, offsy1],scale1],[z2,[offsx2, offsy2],scale2]]
- class pyg4ometry.geant4.solid.TwistedBox.TwistedBox(name, twistedangle, pDx, pDy, pDz, registry, lunit='mm', aunit='rad', nstack=None, refine=0, addRegistry=True)
Constructs a box that is twisted though angle twisted angle
- Parameters:
name (str) – of the solid
twistedangle (float, Constant, Quantity, Variable, Expression) – twist angle, must be less than pi/2
pDx (float, Constant, Quantity, Variable, Expression) – length in x
pDy (float, Constant, Quantity, Variable, Expression) – length in y
pDz (float, Constant, Quantity, Variable, Expression) – length in z
refine (int) – number of steps to iteratively smoothen the mesh by doubling the number of vertices at every step
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
aunit (str) – angle unit (rad,deg) for solid
nstack (int) – Not written
- class pyg4ometry.geant4.solid.TwistedTrap.TwistedTrap(name, twistedAngle, pDz, pTheta, pDPhi, pDy1, pDx1, pDx2, pDy2, pDx3, pDx4, pAlp, registry, lunit='mm', aunit='rad', nstack=None, addRegistry=True)
Constructs a general trapezoid with a twist around one axis.
- Parameters:
name (str) – of the solid
twistedAngle – angle of twist (<90 deg)
pDz (float, Constant, Quantity, Variable, Expression) – length along z
pDx1 (float, Constant, Quantity, Variable, Expression) – length along x of the side at y=-pDy1/2
pDx2 (float, Constant, Quantity, Variable, Expression) – length along x of the side at y=+pDy1/2
pTheta (float, Constant, Quantity, Variable, Expression) – polar angle of the line joining the centres of the faces at -/+pDz/2
pPhi (float, Constant, Quantity, Variable, Expression) – azimuthal angle of the line joining the centres of the faces at -/+pDz/2
pDy1 (float, Constant, Quantity, Variable, Expression) – length at -pDz/2
pDy2 (float, Constant, Quantity, Variable, Expression) – length at +pDz/2
pDx3 (float, Constant, Quantity, Variable, Expression) – length of the side at y=-pDy2 of the face at +pDz/2
pDx4 (float, Constant, Quantity, Variable, Expression) – length of the side at y=+pDy2 of the face at +pDz/2
pAlp (float, Constant, Quantity, Variable, Expression) – angle wrt the y axi from the centre of the side
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
aunit (str) – angle unit (rad,deg) for solid
- class pyg4ometry.geant4.solid.TwistedTrd.TwistedTrd(name, twistedangle, pDx1, pDx2, pDy1, pDy2, pDz, registry, lunit='mm', aunit='rad', nstack=None, refine=0, addRegistry=True)
Constructs a twisted general trapezoid.
- Parameters:
name (str) – of solid
twistedangle (float, Constant, Quantity, Variable, Expression) – twist angle, must be less than 0.5*pi
pDx1 (float, Constant, Quantity, Variable, Expression) – length in x at surface positioned at -pDz/2
pDx2 (float, Constant, Quantity, Variable, Expression) – length in x at surface positioned at +pDz/2
pDy1 (float, Constant, Quantity, Variable, Expression) – length in y at surface positioned at -pDz/2
pDy2 (float, Constant, Quantity, Variable, Expression) – length in y at surface positioned at +pDz/2
pDz (float, Constant, Quantity, Variable, Expression) – length in z
refine (int) – number of steps to iteratively smoothen the mesh by doubling the number of vertices at every step
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
aunit (str) – angle unit (rad,deg) for solid
nstack (int) – number of theta elements for meshing
- class pyg4ometry.geant4.solid.TwistedTubs.TwistedTubs(name, endinnerrad, endouterrad, zlen, phi, twistedangle, registry, lunit='mm', aunit='rad', nslice=None, nstack=None, addRegistry=True)
Creates a twisted tube segement. Note that only 1 constructor is supprted.
- Parameters:
name (str) – of solid
endinnerrad (float, Constant, Quantity, Variable, Expression) – inner radius at the end of the segment
endinnerrad – outer radius at the end of the segment
zlen (float, Constant, Quantity, Variable, Expression) – length of the tube segement
twistedangle (float, Constant, Quantity, Variable, Expression) – twist angle
registry (Registry) – for storing solid
lunit (str) – length unit (nm,um,mm,m,km) for solid
aunit (str) – angle unit (rad,deg) for solid
nslice – number of phi elements for meshing
nstack (int) – number of theta elements for meshing
- class pyg4ometry.geant4.solid.GenericTrap.GenericTrap(name, v1x, v1y, v2x, v2y, v3x, v3y, v4x, v4y, v5x, v5y, v6x, v6y, v7x, v7y, v8x, v8y, dz, registry, nstack=20, lunit='mm', addRegistry=True)
Constructs an arbitrary trapezoid using two quadrilaterals sitting on two parallel planes. Vertices 1-4 define the quadrilateral at -dz and vertices 5-8 define the quadrilateral at +dz. This solid is called Arb8 in GDML notation.
- Parameters:
name – string, name of the volume
v1x – vertex 1 x position
v1y – vertex 1 y position
v2x – vertex 2 x position
v2y – vertex 2 y position
v3x – vertex 3 x position
v3y – vertex 3 y position
v4x – vertex 4 x position
v4y – vertex 4 y position
v5x – vertex 5 x position
v5y – vertex 5 y position
v6x – vertex 6 x position
v6y – vertex 6 y position
v7x – vertex 7 x position
v7y – vertex 7 y position
v8x – vertex 8 x position
v8y – vertex 8 y position
dz – half length along z
registry (Registry) – for storing solid
- class pyg4ometry.geant4.solid.TessellatedSolid.TessellatedSolid(name, meshTess, registry, meshtype=1, addRegistry=True)
Constructs a tessellated solid
- Parameters:
name (str) – of solid
mesh (Freecad, Gdml or Stl) – mesh
registry (Registry) – for storing solid
meshtype (MeshType.Freecad) – type of mesh
- pyg4ometry.geant4.solid.TessellatedSolid.createTessellatedSolid(name, polygons, reg)
- Args:
name: Name of the tessallated solid polygons: list of polygons (list of points given in clockwise order). All polygons should have the same number of points. reg: registry
Returns: TessellatedSolid
- class pyg4ometry.geant4.solid.Union.Union(name, obj1, obj2, tra2, registry, addRegistry=True)
Union between two solids
- Parameters:
name (str) – of solid
obj1 (pyg4ometry.geant4.solid) – unrotated, untranslated solid
obj2 (pyg4ometry.geant4.solid) – solid rotated and translated according to tra2
tra2 (list) – [rot,tra] = [[a,b,g],[dx,dy,dz]]
registry (Registry) – for storing solid
- class pyg4ometry.geant4.solid.MultiUnion.MultiUnion(name, objects, transformations, registry, addRegistry=True)
Union between two or more solids.
- Parameters:
name (str) – of solid
objects – unrotated, untranslated solid objects to form union
transformations – [[rot1,tra1],[rot2,tra2], [rot3,tra3] .. ] or [[[a,b,g],[dx,dy,dz]], [[a,b,g],[dx,dy,dz]], [[a,b,g],[dx,dy,dz]], …]
registry (Registry) – for storing solid
addRegistry – Add solid to registry
- class pyg4ometry.geant4.solid.Intersection.Intersection(name, obj1, obj2, tra2, registry, addRegistry=True)
Intersection between two solids
- Parameters:
name (str) – of solid
obj1 (pyg4ometry.geant4.solid) – unrotated, untranslated solid
obj2 (pyg4ometry.geant4.solid) – solid rotated and translated according to tra
tra2 (list) – [rot,tra] = [[a,b,g],[dx,dy,dz]]
registry (Registry) – for storing solid
- class pyg4ometry.geant4.solid.Subtraction.Subtraction(name, obj1, obj2, tra2, registry, addRegistry=True)
Subtraction between two solids
- Parameters:
name (str) – of solid
obj1 (pyg4ometry.geant4.solid) – unrotated, untranslated solid
obj2 (pyg4ometry.geant4.solid) – solid rotated and translated according to tra2
tra2 (list) – [rot,tra] = [[a,b,g],[dx,dy,dz]]
registry (Registry) – for storing solid
- class pyg4ometry.geant4.solid.OpticalSurface.OpticalSurface(name, finish, model, surf_type, value, registry, addRegistry=True)
Geant4 module
- class pyg4ometry.geant4.Registry
Bases:
object
Object to store geometry for input and output. All of the pyg4ometry classes can be used without storing them in the Registry. The registry is used to write the GDML output file. A registry needs to be used in conjunction with GDML Define objects for evaluation of expressions.
- addDefine(define)
Register a define with this registry.
- addLogicalVolume(volume)
Register a logical volume with this registry. Also accepts Assembly Volumes.
- Parameters:
volume (LogicalVolume) – LogicalVolume object for storage
- addMaterial(material, dontWarnIfAlreadyAdded=False)
Register a material with this registry.
- Parameters:
material (Material) – Material object for storage
- addPhysicalVolume(volume)
Registry a physical volume with this registry.
- Parameters:
volume (PhysicalVolume) – PhysicalVolume object for storage
- addSolid(solid)
Register a solid with this registry.
- Parameters:
solid (One of the geant4 solids) – Solid object for storage
- pyg4ometry.geant4.AnalyseGeometryComplexity(logicalVolume)
Analyse a geometry tree starting from a logical volume. Produces an instance of
GeometryComplexityInformation
with summary information. Provides:count per solid type
number of daughters per logical volume
dictionary of N daughters for each logical volume name
depth count of Boolean solids
ie a Boolean of a Boolean returns 2, a Boolean of two primitives returns 1
a dictionary of boolean depth for each logical volume name
Example:
info = AnalyseGeometryComplexity(lv) info.printSummary()
- class pyg4ometry.geant4.Material(**kwargs)
Bases:
MaterialBase
This class provides an interface to GDML material definitions.
Because of the different options for constructing a material instance the constructor is kwarg only. Proxy methods are provided to instantiate particular types of material. Those proxy methods are:
MaterialSingleElement MaterialCompound MaterialPredefined
It is possible to instantiate a material directly through kwargs. The possible kwargs are (but note some are mutually exclusive): name - string density - float atomic_number - int atomic_weight - float number_of_components - int state - string pressure - float pressure_unit - string temperature - float temperature_unit - string
- addConstProperty(name, value, vunit='')
Add a constant scalar property to this object.
- Parameters:
name (str) – key of property
value (str,float,int) – constant value for this property
vunit (str) – unit for the value vector (default: unitless)
- addProperty(name, matrix)
Add a material property from a matrix.
- Parameters:
name (str) – key of the material property
matrix (Matrix) – matrix defining the value(s) of the property
- addVecProperty(name, e, v, eunit='eV', vunit='')
Add a property from an energy and a value vector to this object.
- Parameters:
name (str) – key of property
e (list or numpy.array - shape (1,)) – energy list/vector in units of eunit
v (list or numpy.array - shape (1,)) – value list/vector in units of vunit
eunit (str) – unit for the energy vector (default: eV)
vunit (str) – unit for the value vector (default: unitless)
- add_element_massfraction(element, massfraction)
Add an element as a component to a material as a fraction of the material mass. Can only add elements to materials defined as composite.
- Inputs:
element - pyg4ometry.geant4.Material.Element instance massfraction - float, 0.0 < massfraction <= 1.0
- add_element_natoms(element, natoms)
Add an element as a component to a material as a number of atoms in the material molecule. Can only add elements to materials defined as composite.
- Inputs:
element - pyg4ometry.geant4.Material.Element instance natoms - int, number of atoms in the compound molecule
- add_material(material, fractionmass)
Add a material as a component to another material (mixture) as a fraction of the mixture mass. Can only add new materials to materials defined as composite.
- Inputs:
material - pyg4ometry.geant4.Material.Material instance massfraction - float, 0.0 < massfraction <= 1.0
- set_pressure(value, unit='pascal')
- set_temperature(value, unit='K')
- property state_variables
- class pyg4ometry.geant4.LogicalVolume.LogicalVolume(solid, material, name, registry=None, addRegistry=True, **kwargs)
Bases:
object
LogicalVolume : G4LogicalVolume
- Parameters:
solid –
material –
name (str) –
registry –
addRegistry (bool) –
- add(physicalVolume)
Add physical volume to this logicalVolume
- Parameters:
physicalVolume (PhysicalVolume, ReplicaVolume, ParameterisedVolume, DivisionVolume) – physical volume to add
- addAuxiliaryInfo(auxiliary)
Add auxilary information to logical volume :param auxiliary: auxiliary information for the logical volume :type auxiliary: tuple or list
- addBDSIMObject(bdsimobject)
- assemblyVolume(materialName='G4_AIR0x7f8441173ac0')
Return an assembly volume of this this logical volume, in effect removing the solid and material of this logical volume, but retaining all of the relative daughter placements.
- changeSolidAndTrimGeometry(newSolid, rotation=(0, 0, 0), position=(0, 0, 0), runit='rad', punit='mm')
Change the solid of this logical volume, remove any daughters that will lie outside it, and form new Boolean intersection solids for any daughters that cross the boundary (intersect) it. The rotation and translation are with respect to the original frame and all daughters will now be replaced with respect to the new frame. Therefore, that same rotation and translation should be use to re-place this logical volume if desired. The default is none though, so the frame would nominally remain the same.
- Parameters:
newSolid (any of pyg4ometry.geant4.solid) – new solid to use for this logical volume
rotation (list(float, float, float) or None - 3 values in radians) – Tait-Bryan rotation for the new solid w.r.t. old frame (i.e. current lv)
position (list(float, float, float) or None - 3 values in mm) – translation for the new solid w.r.t. old frame (i.e. current lv)
- checkOverlaps(recursive=False, coplanar=False, debugIO=False, printOut=True, nOverlapsDetected=[0])
Check based on the meshes in each logical volume if there are any geometrical overlaps. By default, overlaps are checked between daughter volumes and with the mother volume itself (protrusion). Coplanar overlaps may also be checked (default on).
Print out will be given for any overlaps detected and the visualiser will show the colour coded overlaps.
- Parameters:
recursive – bool - Whether to descend into the daughter volumes and check their contents also.
coplanar – bool - Whether to check for coplanar overlaps
debugIO – bool - Print out for every check made
printOut – bool - (internal) Whether to print out a summary of N overlaps detected
nOverlapsDetected – [int] - (internal) counter for recursion - ignore
- clipGeometry(newSolid, rotation=(0, 0, 0), position=(0, 0, 0), runit='rad', punit='mm', replace=False, depth=0, solidUsageCount={}, lvUsageCount={})
Clip the geometry to newSolid, placed with rotation and position.
- Parameters:
newSolid (pyg4ometry.geant4.solid) – object to clip the geometry to
rotation (list(float, float, float) or None - 3 values in radians) – Tait-Bryan angles for rotation of the solid w.r.t. this lv
position (list(float, float, float) or None - 3 values in mm) – translation of the solid w.r.t. this lv
runit (str) – angular unit for rotation (rad,deg)
punit (str) – length unit for position (m,mm,km)
replace (bool) – replace the outer solid or not
depth (int) – recursion depth (DO NOT USE)
solidUsageCount (defaultdict) – solid name dictionary for replacement recursion (DO NOT USE)
lvUsageCount (defaultdict) – lv name dictionary for replacement recursion (DO NOT USE)
- clipSolid(lengthSafety=1e-06)
Assuming the solid of this LV is a Box, reduce its dimensions and re-placement all daughters to reduce the box to the minimum (axis-aligned) bounding box. This updates the dimensions of the box and the translation of each daughter physical volume.
- Parameters:
lengthSafety (float) – safety length
- cullDaughtersOutsideSolid(solid, rotation=None, position=None)
Given a solid with a placement rotation and position inside this logical volume, remove (cull) any daughters that would not lie entirely within it. The rotation and position are applied to the solid w.r.t. the frame of this logical volume.
- Parameters:
rotation (list(float, float, float) or None - 3 values in radians) – Tait-Bryan angles for rotation of the solid w.r.t. this lv
position (list(float, float, float) or None - 3 values in mm) – translation of the solid w.r.t. this lv
- depth(depth=0)
Depth for LV-PV tree
- dumpStructure(depth=0)
- extent(includeBoundingSolid=False)
Compute the axis aligned extent of the logical volume.
- Parameters:
includeBoundingSolid (bool) – Include the bounding solid or not
- findLogicalByName(name)
Return a list of LogicalVolume instances used inside this logical volume as daughters (at any level inside) with the given name.
- Parameters:
name (str) – lv name
- makeLogicalPhysicalNameSets()
Return a set of logical names and physical names used in this logical volume and any daughters. This is built up recursively by checking all daughters etc etc.
- makeMaterialNameSet()
Return a set of material names used in this logical volume and any daughters. This is built up recursively by checking all daughters etc etc.
- makeSolidTessellated()
Make solid tesselated. Sometimes useful when a boolean cannot be visualised in Geant4
- makeWorldVolume(worldMaterial='G4_Galactic')
This will create a container box according to the extents of this logical volume: an axis-aligned bounding-box. It will be filled with the given material (predefined by name) and assigned as the world volume (outermost) of the registry according to this logical volume.
- reMesh(recursive=False)
Regenerate the visualisation for this logical volume. Required if the geometry is modified and overlap checking is subsequently required or revisualisation.
- replaceSolid(newSolid, rotation=(0, 0, 0), position=(0, 0, 0), runit='rad', punit='mm')
Replace the outer solid with optional position and rotation
- Parameters:
newSolid (pyg4ometry.geant4.solid) – object to clip the geometry to
rotation (list(float, float, float) or None - 3 values in radians) – Tait-Bryan angles for rotation of the solid w.r.t. this lv
position (list(float, float, float) or None - 3 values in mm) – translation of the solid w.r.t. this lv
runit (str) – angular unit for rotation (rad,deg)
punit (str) – length unit for position (m,mm,km)
- setSolid(solid)
Set (replace) the outer solid. Does not change the placement of the daughters in the volume. If there is a transformation then use replaceSolid
- transformDaughters(rotation=(0, 0, 0), position=(0, 0, 0), runit='rad', punit='mm')
Transform the daugter volumes (without clipping)
- Parameters:
rotation (list(float, float, float) or None - 3 values in radians) – Tait-Bryan angles for rotation of the solid w.r.t. this lv
position (list(float, float, float) or None - 3 values in mm) – translation of the solid w.r.t. this lv
runit (str) – angular unit for rotation (rad,deg)
punit (str) – length unit for position (m,mm,km)
- class pyg4ometry.geant4.PhysicalVolume.PhysicalVolume(rotation, position, logicalVolume, name, motherVolume, registry=None, copyNumber=0, addRegistry=True, scale=None)
Bases:
object
PhysicalVolume : G4VPhysicalVolume, G4PVPlacement
- Parameters:
rotation – [float,float,float] - rotations about x,y,z axes of mother volume
position – [float,float,float] - translation with respect to mother volume
logicalVolume –
pyg4ometry.geant4.LogicalVolume
- instance to placename – str - name of this placement
motherVolume –
pyg4ometry.geant4.LogicalVolume
- mother volume to place intoregistry –
pyg4ometry.geant4.Registry
- registry to register tocopyNumber – int - copy number of the placement that can be used for sensitivity
addRegistry – bool - whether to add to the registry or not
- extent(includeBoundingSolid=True)
- getAABBMesh()
return CSG.core (symmetric around the origin) axis aligned bounding box mesh
- class pyg4ometry.geant4.ReplicaVolume.ReplicaVolume(name, logicalVolume, motherVolume, axis, nreplicas, width, offset=0, registry=None, addRegistry=True, wunit='mm', ounit='mm')
Bases:
PhysicalVolume
ReplicaVolume: G4PVReplica
- Parameters:
name – of physical volume
logical – volume to be placed
mother – logical volume,
axis – kXAxis,kYAxis,kZAxis,kRho,kPhi
ncopies – number of replicas
width – spacing between replicas along axis
offset – of grid
- GetAxisName()
- createReplicaMeshes()
- extent(includeBoundingSolid=True)
- getPhysicalVolumes()
return a list of temporary (ie not added to the relevant registry) PhysicalVolume instances with appropriate transforms including any daughter ReplicaVolumes.
The exception is for kRho axis where new unique solids and logical volumes are required. Therefore, these are added to the registry and inadvertently to the mother LV as PVS.
- class pyg4ometry.geant4.ParameterisedVolume.ParameterisedVolume(name, logicalVolume, motherVolume, ncopies, paramData, transforms, registry=None, addRegistry=True)
Bases:
ReplicaVolume
ParametrisedVolume :param name: of parametrised volume :type name: str :param logical: volume to be placed :type logical: logicalVolume :param mother: volume logical volume :type mother: logicalVolume :param ncopies: number of parametrised volumes :type ncopies: int
- class BoxDimensions(pX, pY, pZ, lunit='mm')
Bases:
object
- class ConeDimensions(pRMin1, pRMax1, pRMin2, pRMax2, pDz, pSPhi, pDPhi, lunit='mm', aunit='rad')
Bases:
object
- class EllipsoidDimensions(pxSemiAxis, pySemiAxis, pzSemiAxis, pzBottomCut, pzTopCut, lunit='mm')
Bases:
object
- class HypeDimensions(innerRadius, outerRadius, innerStereo, outerStereo, lenZ, lunit='mm', aunit='rad')
Bases:
object
- class OrbDimensions(pRMax, lunit='mm')
Bases:
object
- class ParaDimensions(pX, pY, pZ, pAlpha, pTheta, pPhi, lunit='mm', aunit='rad')
Bases:
object
- class PolyconeDimensions(pSPhi, pDPhi, pZpl, pRMin, pRMax, lunit='mm', aunit='rad')
Bases:
object
- class PolyhedraDimensions(pSPhi, pDPhi, numSide, pZpl, pRMin, pRMax, lunit='mm', aunit='rad')
Bases:
object
- class SphereDimensions(pRMin, pRMax, pSPhi, pDPhi, pSTheta, pDTheta, lunit='mm', aunit='rad')
Bases:
object
- class TorusDimensions(pRMin, pRMax, pRTor, pSPhi, pDPhi, lunit='mm', aunit='rad')
Bases:
object
- class TrapDimensions(pDz, pTheta, pDPhi, pDy1, pDx1, pDx2, pAlp1, pDy2, pDx3, pDx4, pAlp2, lunit='mm', aunit='rad')
Bases:
object
- class TrdDimensions(pX1, pX2, pY1, pY2, pZ, lunit='mm')
Bases:
object
- class TubeDimensions(pRMin, pRMax, pDz, pSPhi, pDPhi, lunit='mm', aunit='rad')
Bases:
object
- createParameterisedMeshes()
- extent(includeBoundingSolid=True)
- class pyg4ometry.geant4.BorderSurface.BorderSurface(name, physref1, physref2, surface_property, registry, addRegistry=True)
Bases:
SurfaceBase
- class pyg4ometry.geant4.SkinSurface.SkinSurface(name, volumeref, surface_property, registry, addRegistry=True)
Bases:
SurfaceBase
Visualisation module
- class pyg4ometry.visualisation.VtkViewer.MouseInteractorNamePhysicalVolume(renderer, vtkviewer)
Bases:
vtkInteractorStyleTrackballCamera
- rightButtonPressEvent(obj, event)
- pyg4ometry.visualisation.VtkViewer.PubViewer
alias of
VtkViewerColoured
- class pyg4ometry.visualisation.VtkViewer.VtkViewer(size=(1024, 1024), interpolation='none', **kwargs)
Bases:
object
Visualiser.
- Parameters:
size – (int,int) - (nPixelsHorizontal, nPixelsVeritcal), default (1024,1024)
interpolation – (str) - one of “none”, “flat”, “gouraud”, “phong”
- Examples:
>>> v = VtkViewer() >>> v.addLogicalVolume(someLV) >>> v.view()
- addActor(actor)
- addAxes(length=20.0, origin=(0, 0, 0))
Add x,y,z axis to the scene.
- Parameters:
length – float - length of each axis in mm
origin – (float,float,float) - (x,y,z) of origin in mm
- addAxesWidget()
- addBooleanSolidRecursive(solid, mtra=matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]]), tra=array([0, 0, 0]), first=True)
- Parameters:
solid (pyg4ometry.geant4.solid.SolidBase) – pyg4ometry.geant4.solid instance.
Other parameters are for internal recursion and don’t need to be provided.
Render only a Boolean solid. If one of the constituent solids is also a Boolean, visualise those too. The resultant Boolean is shown in solid form and each constituent in a wireframe. In the case of a null mesh, only the constituents can be shown.
- addCutterPlane(position, normal, colour=None)
Add a cutting plane at position=[x,y,z] with normal [nx,ny,nz].
- Parameters:
position – [float, float, float] - (x,y,z) position in scene (mm)
normal – [float, float, float] - (nx,ny,z) normal unit vector
colour – None or [float, float, float] - [r,g,b] in range [0:1]
Cutters are stored in self.usercutters.
- addLogicalVolume(logical, mtra=matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]]), tra=array([0, 0, 0]), recursive=True, addWorld=True)
- addLogicalVolumeBounding(logical)
- addLogicalVolumeRecursive(logical, mtra=matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]]), tra=array([0, 0, 0]))
- addMaterialVisOption(materialName, visOptionInstance)
Append a visualisation option instance to the dictionary of materials.
- Parameters:
materialName – str - material name to match
visOptionInstance –
VisualisationOptions
instance
- addMesh(pv_name, solid_name, mesh, mtra, tra, localmeshes, filters, mappers, mapperMap, actors, actorMap, visOptions=None, overlap=False, cutters=True, clippers=False)
- addMeshSimple(csgMesh, visOptions=<VisOpt: rep=surface, rgba=[0.5, 0.5, 0.5, 0.5], vis=True, linewidth=1, depth=0>, clip=False, name='mesh')
- addSolid(solid, rotation=[0, 0, 0], position=[0, 0, 0], representation='surface', colour=[0.5, 0.5, 0.5], opacity=0.2)
Add a solid to the view with an optional rotation and translation.
- Parameters:
solid (any solid in pyg4ometry.geant4.solid) – solid to add to the view
rotation (list(float, float, float) - 3 values) – list of TB rotation angles in radians
position (list(float, float, float) - 3 values) – translation in global from from centre in mm
representation (str) – the way to visualise it, e.g. ‘surface’ or ‘wireframe’
colour (list(float, float, float) - 3 values ranging from 0 - 1) – normalised rgb colour to use for the solid mesh
opacity (float, from 0 to 1) – the opacity of the solid if surface style
- exportCutterSection(filename, normal='x', scaling=1.0)
Export the section lines in plane perpendicular to normal. Exported as json text.
- Parameters:
filename – (str) - name of file to export to
normal – (str) - one of “x”, “y” or “z”
scaling – (float) - multiplier for all cutter line coordinates on export
- Examples:
>>> v.exportCutterSection("xz-section.dat", normal="y", scaling=1000)
- exportGLTFScene(fileName='scene.gltf')
- exportOBJScene(fileName='scene')
- exportScreenShot(fileName='screenshot.png', rgba=True)
Write the render window view to an image file.
Image types supported are: BMP, JPEG, PNM, PNG, PostScript, TIFF. The default parameters are used for all writers, change as needed.
- Parameters:
fileName – The file name, if no extension then PNG is assumed.
renWin – The render window.
rgba – Used to set the buffer type.
- Returns:
- exportVRMLScene(fileName='scene')
- getMaterialVisOptions(pv)
- getOverlapVisOptions(overlaptype)
- printViewParameters()
- setCameraFocusPosition(focalPoint=[0, 0, 0], position=[100, 100, 100])
- setCutterNormal(dimension, normal)
- Parameters:
dimension – str - ‘x’, ‘y’, or ‘z’
normal – list([x,y,z]) - should be unit vector
- setCutterOrigin(dimension, origin)
- Parameters:
dimension – str - ‘x’, ‘y’, or ‘z’
origin – list([x,y,z])
- setMaterialVisOptions(materialDict)
Replace the (by default None) dictionary for materials to colours :param materialDict: {“materialName”: VisualisationOptions}
See also
VisualisationOptions
.
- setOpacity(v, iActor=-1)
- setOpacityOverlap(v, iActor=-1)
- setRandomColours(seed=0)
- setSurface(iActor=-1)
- setSurfaceOverlap(iActor=-1)
- setWireframe(iActor=-1)
- setWireframeOverlap(iActor=-1)
- start()
- view(interactive=True, resetCamera=True)
- viewSection(dir='x')
- class pyg4ometry.visualisation.VtkViewer.VtkViewerColoured(*args, defaultColour=None, materialVisOptions=None, **kwargs)
Bases:
VtkViewer
Visualiser that extends VtkViewer. Uses “flat” interpolation and introduces control over colours.
- Keyword Arguments:
materialVisOptions: {“materialName”:
VisualisationOptions
or list or tuple, …}interpolation (str): see
VtkViewer
defaultColour (str): “random” or [r,g,b]
- Examples:
>>> vMaterialMap = VtkViewerColoured(materialVisOptions={"G4_WATER":[0,0,1]}) >>> vRandom = VtkViewerColoured(defaultColour="random") >>> vColoured = VtkViewerColoured(defaultColour=[0.1,0.1,0.1]) >>> vColourAlpha = VtkViewerColoured(defaultColour=[0.1,0.1,0.1,0.5])
of use visualisation options instances
>>> vo = pyg4ometry.visualisation.VisualisationOptions() >>> vo.colour = [0.1,1.0,0.5] >>> vo.alpha = 0.3 >>> options = {'G4_WATER':vo} >>> vis = VtkViewerColoured(materialVisOptions=options)
If the value in the materialVisOptions is a list or a tuple, it will be upgraded to a
VisualisationOptions
instance.
- class pyg4ometry.visualisation.VtkViewer.VtkViewerColouredMaterial(*args, **kwargs)
Bases:
VtkViewerColoured
Extension of VtkViewerColoured that uses a default material dictionary for several common materials. Material colours are in defined Colour.py for many Geant4, FLUKA and BDSIM materials.
- pyg4ometry.visualisation.VtkViewer.axesFromExtents(extent)
- pyg4ometry.visualisation.VtkViewer.viewLogicalVolumeDifference(referenceLV, otherLV, otherTranslation=[0, 0, 0], otherRotation=[0, 0, 0], viewDifference=True)
- Parameters:
referenceLV (pyg4ometry.geant4.LogicalVolume.) – LogicalVolume instance to view viewed in red.
referenceLV – LogicalVolume instance to view viewed in blue.
otherTranslation ([float, float, float]) – Translation (in native units, mm) of otherLV w.r.t. referenceLV
otherRotation ([float, float, float]) – Rotation (in native units, rad) of other LV w.r.t. referenceLV.
View the shapes of 2 logical volumes without their contents. The reference one will be red and the ‘other’ one will be blue.
The other one may optionally be translated and rotated (Tait-Bryant x,y,z) relative to the reference.
- class pyg4ometry.visualisation.ViewerBase.ViewerBase
Bases:
object
Base class for all viewers and exporters. Handles unique meshes and their instances
- addInstance(name, transformation, translation, instanceName='')
Add a new instance for mesh with name
- Parameters:
name (str) – name of mesh to add instance
transformation (matrix(3,3)) – Transformation matrix for instance
translation (array(3)) – Translation for instance
instanceName (str) – Name of the instance e.g PV
- addLogicalVolume(lv, mtra=matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]]), tra=array([0, 0, 0]), visOptions=<VisOpt: rep=wireframe, rgba=[0.5, 0.5, 0.5, 0.5], vis=True, linewidth=1, depth=0>, depth=0, name=None)
Add a logical volume to viewer (recursively)
- Parameters:
mtra (matrix(3,3)) – Transformation matrix for logical volume
tra (array(3)) – Displacement for logical volume
visOptions (VisualisationOptions) – VisualisationOptions for the lv mesh
- addMaterialPbrOption(materialName, visOption)
Append a visualisation option instance to the dictionary of materials.
- Parameters:
materialName (str) – material name to match
visOption (
VisualisationOptions
) – instance
- addMaterialVisOption(materialName, visOption)
Append a visualisation option instance to the dictionary of materials.
- Parameters:
materialName (str) – material name to match
visOption (
VisualisationOptions
) – instance
- addMesh(name, mesh)
Add a single mesh
- Parameters:
name (str) – Name of mesh (e.g logical volume name)
mesh (CSG) – Mesh to be added
- addPbrOptions(name, pbrOption)
Add pbr options to mesh with name
- Parameters:
name (str) – name of mesh
pbrOptions (PbrOptions) –
- addVisOptions(name, visOption)
Add vis options to mesh with name
- Parameters:
name (str) – name of mesh
visOptions (VisualisationOptions) –
- clear()
- exportGLTFAssets(gltfFileName='test.gltf')
Export all the assets (meshes) without all the instances. The position of the asset is the position of the first instance
- exportGLTFScene(gltfFileName='test.gltf', singleInstance=False)
Export entire scene as gltf file, filename extension dictates binary (glb) or readable json (gltf) singleInstance is a Boolean flag to supress all but one instance
- exportThreeJSScene(fileNameBase='test', lightBoxHDR='concrete_tunnel_02_4k.hdr')
html based on https://threejs.org/examples/#webgl_loader_gltf HRDI https://polyhaven.com/a/concrete_tunnel_02
npm install node wget https://dl.polyhaven.org/file/ph-assets/HDRIs/exr/4k/concrete_tunnel_02_4k.exr conver EXR to HDR e.g. https://convertio.co/exr-hdr/ python -m http.server 8000 open test.html
- getDefaultVisOptions()
- getMaterialVisOptions(material)
- getOverlapVisOptions(overlaptype)
- removeInvisible()
Remove wireframe or transparent instances from self
- scaleScene(scaleFactor)
- setCoplanarVisOption(visOption)
- setDefaultVisOptions(visOption)
- setOverlapVisOption(visOption)
- setProtusionVisOption(visOption)
- setSubtractDaughters(subtractDaughters=True)
STL module
- class pyg4ometry.stl.Reader.Reader(filename, solidname='stl_tessellated', scale=1, centre=False, registry=None, forcebinary=False)
Bases:
object
STL file reader
- Parameters:
filename (str) – Input STL filename
solidname (str) – Name of the solid to be created
scale (float) – Scaling of STL (e.g. for units)
centre (boolean) – Flag to centre STL solid
registry (Registry) – Registry to add solid to
forcebinary (boolean) – Forces to load this STL file in binary format, otherwise the file format is determined from whether it starts with the string ‘solid’
- extent()
Compute the axis aligned extent of the STL solid.
- Returns:
list of minima and maxima in 3 axes
- Return type:
[[xmin,ymin,zmin],[xmax, ymax, zmax]]
- extentCentre()
Translate STL mesh to centre of the extent
- getRegistry()
Return registry
- getSolid()
Get geant4.solid
- Returns:
G4Tesselated for STL
- Return type:
- translate(translation=[0, 0, 0])
Translate STL mesh by translation
- Parameters:
translation (list(3) or array(3)) – Vector to translate mesh
- visualise()
View solid directly by using a dummy world
- writeDefaultGDML(filename='default', gmad_tester=False)
Write the tessellated solid loaded from STL to GDML. The placement has no rotation or translation. The world material is G4_Galactic, the solid material is G4_Fe.
- Parameters:
filename (str) – Output file name
gmad_tester (boolean) – Flag for writing BDSIM gmad tester
GDML module
- class pyg4ometry.gdml.Reader.Reader(fileName, registryOn=True, reduceNISTMaterialsToPredefined=False)
Bases:
object
Read a GDML file.
- Parameters:
fileName (str) – path to gdml file to load
registryOn (bool) – whether to build a registry
reduceNISTMaterialsToPredefined (bool) – change NIST-named materials to predefined ones
When loading a GDML file that was exported by Geant4, the NIST materials may be fully expanded to include their full element / isotope composition. With the reduceNISTMaterialsToPredefined flag set to True, these will be ignored and the materials that have a name that matches a NIST one will be ‘reduced’ back to a predefined material by name only.
- extractStructureNodeData(node, materialSubstitutionNames=None)
- getRegistry()
- load()
- parseBox(node)
- parseCone(node)
- parseCutTube(node)
- parseDefines(xmldoc)
- parseEllipsoid(node)
- parseEllipticalCone(node)
- parseEllipticalTube(node)
- parseExtrudedSolid(node)
- parseGenericPolycone(node)
- parseGenericPolyhedra(node)
- parseGenericTrap(node)
- parseHype(node)
- parseIntersection(node)
- parseMaterials(xmldoc)
- parseMultiUnion(node)
- parseOpticalSurface(node)
- parseOrb(node)
- parsePara(node)
- parseParaboloid(node)
- parsePhysicalVolumeChildren(node, vol)
- parsePolycone(node)
- parsePolyhedra(node)
- parseScaledSolid(node)
- parseSolidLoop(node)
- parseSolids(xmldoc)
- parseSphere(node)
- parseStructure(xmldoc, materialSubstitutionNames=None)
- parseSubtraction(node)
- parseTessellatedSolid(node)
- parseTet(node)
- parseTorus(node)
- parseTrap(node)
- parseTrd(node)
- parseTube(node)
- parseTwistedBox(node)
- parseTwistedTrap(node)
- parseTwistedTrd(node)
- parseTwistedTubs(node)
- parseUnion(node)
- parseUserInfo(xmldoc)
- parseVector(node, type='position', addRegistry=True)
- class pyg4ometry.gdml.Writer.Writer(prepend='')
Bases:
object
- addDetector(registry)
- checkDefineName(defineName)
- checkLogicalVolumeName(logicalVolumeName)
- checkMaterialName(materialName)
- checkPhysicalVolumeName(physicalVolumeName)
- checkSolidName(solidName)
- createPosition(name, x, y, z)
- createQuadrangularFacet(vertex1, vertex2, vertex3, vertex4)
- createSection(zOrder, zPosition, xOffset, yOffset, scalingFactor)
- createTriangularFacet(vertex1, vertex2, vertex3)
- createTwoDimVertex(x, y)
- createrzPoint(r, z)
- createzPlane(rInner, rOuter, zplane)
- getValueOrExpr(var)
- getValueOrExprFromInstance(instance, variable, index=None)
- write(filename)
- writeAssemblyVolume(lv)
- writeAuxiliary(aux, parent=None)
- writeBorderSurface(instance)
- writeBox(instance)
- writeCons(instance)
- writeCutTubs(instance)
- writeDefaultLattice(filename='lattice.gmad')
- writeDefine(define)
- writeDivisionVolume(instance)
- writeEllipsoid(instance)
- writeEllipticalCone(instance)
- writeEllipticalTube(instance)
- writeExtrudedSolid(instance)
- writeGMADTesterNoBeamline(gmad, gdml)
- writeGenericPolycone(instance)
- writeGenericPolyhedra(instance)
- writeGenericTrap(instance)
- writeGmadTester(filenameGmad, filenameGDML, writeDefaultLattice=False, preprocessGDML=True, energy=250)
- writeHype(instance)
- writeIntersection(instance)
- writeLogicalVolume(lv)
- writeMaterial(material)
- writeMaterialProps(material, oe)
- writeMultiUnion(instance)
- writeOpticalSurface(instance)
- writeOrb(instance)
- writePara(instance)
- writeParaboloid(instance)
- writeParametrisedVolume(instance)
- writePhysicalVolume(pv)
- writePolycone(instance)
- writePolyhedra(instance)
- writeReplicaVolume(instance)
- writeScaled(instance)
- writeSkinSurface(instance)
- writeSolid(solid)
Dispatch to correct member function based on type string in SolidBase.
- writeSphere(instance)
- writeSubtraction(instance)
- writeTessellatedSolid(instance)
- writeTet(instance)
- writeTorus(instance)
- writeTrap(instance)
- writeTrd(instance)
- writeTubs(instance)
- writeTwistedBox(instance)
- writeTwistedTrap(instance)
- writeTwistedTrd(instance)
- writeTwistedTubs(instance)
- writeUnion(instance)
- writeVectorVariable(node, vector_var, allow_ref=True, suppress_trivial=True)
Writes an XML child node for a vector variable - position, rotation, scale. If allow_ref is enabled, it will write a ref to a registry define where possible. If suppress_trivial is enabled it won’t write vectors with all elements zero.
CGAL module
- class pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK
Bases:
pybind11_object
- cartesian(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK, arg0: int, arg1: int) pyg4ometry.pycgal.CGAL.EPECK_NT
- hm(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK, arg0: int, arg1: int) pyg4ometry.pycgal.CGAL.EPECK_NT
- inverse(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK) pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK
- is_even(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK) bool
- is_odd(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK) bool
- is_scaling(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK) bool
- is_translation(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK) bool
- m(*args, **kwargs)
Overloaded function.
m(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK, arg0: int, arg1: int) -> pyg4ometry.pycgal.CGAL.EPECK_NT
m(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK, arg0: int, arg1: int) -> pyg4ometry.pycgal.CGAL.EPECK_NT
- transform(*args, **kwargs)
Overloaded function.
transform(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK, arg0: pyg4ometry.pycgal.Point_3.Point_3_EPECK) -> pyg4ometry.pycgal.Point_3.Point_3_EPECK
transform(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK, arg0: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK) -> pyg4ometry.pycgal.Vector_3.Vector_3_EPECK
transform(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK, arg0: pyg4ometry.pycgal.Direction_3.Direction_3_EPECK) -> pyg4ometry.pycgal.Direction_3.Direction_3_EPECK
transform(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK, arg0: pyg4ometry.pycgal.Plane_3.Plane_3_EPECK) -> pyg4ometry.pycgal.Plane_3.Plane_3_EPECK
- class pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK
Bases:
pybind11_object
- cartesian(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK, arg0: int, arg1: int) float
- hm(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK, arg0: int, arg1: int) float
- inverse(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK) pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK
- is_even(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK) bool
- is_odd(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK) bool
- is_scaling(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK) bool
- is_translation(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK) bool
- m(*args, **kwargs)
Overloaded function.
m(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK, arg0: int, arg1: int) -> float
m(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK, arg0: int, arg1: int) -> float
- transform(*args, **kwargs)
Overloaded function.
transform(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK, arg0: pyg4ometry.pycgal.Point_3.Point_3_EPICK) -> pyg4ometry.pycgal.Point_3.Point_3_EPICK
transform(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK, arg0: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK) -> pyg4ometry.pycgal.Vector_3.Vector_3_EPICK
transform(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK, arg0: pyg4ometry.pycgal.Direction_3.Direction_3_EPICK) -> pyg4ometry.pycgal.Direction_3.Direction_3_EPICK
transform(self: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK, arg0: pyg4ometry.pycgal.Plane_3.Plane_3_EPICK) -> pyg4ometry.pycgal.Plane_3.Plane_3_EPICK
- class pyg4ometry.pycgal.CGAL.CDT2_EPECK
Bases:
pybind11_object
- all_face_handles(self: pyg4ometry.pycgal.CGAL.CDT2_EPECK) Iterator
- all_faces(self: pyg4ometry.pycgal.CGAL.CDT2_EPECK) Iterator
- dimension(self: pyg4ometry.pycgal.CGAL.CDT2_EPECK) int
- finite_face_handles(self: pyg4ometry.pycgal.CGAL.CDT2_EPECK) Iterator
- finite_faces(self: pyg4ometry.pycgal.CGAL.CDT2_EPECK) Iterator
- is_infinite(self: pyg4ometry.pycgal.CGAL.CDT2_EPECK, arg0: CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Constrained_triangulation_face_base_2<CGAL::Epeck, CGAL::Triangulation_face_base_2<CGAL::Epeck, CGAL::Triangulation_ds_face_base_2<CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<CGAL::Epeck, CGAL::Triangulation_ds_vertex_base_2<void> >, CGAL::Constrained_triangulation_face_base_2<CGAL::Epeck, CGAL::Triangulation_face_base_2<CGAL::Epeck, CGAL::Triangulation_ds_face_base_2<void> > > > > > >, CGAL::Default, CGAL::Default, CGAL::Default>, false>) bool
- number_of_faces(self: pyg4ometry.pycgal.CGAL.CDT2_EPECK) int
- number_of_vertices(self: pyg4ometry.pycgal.CGAL.CDT2_EPECK) int
- push_back(self: pyg4ometry.pycgal.CGAL.CDT2_EPECK, arg0: CGAL::Point_2<CGAL::Epeck>) None
- triangle(self: pyg4ometry.pycgal.CGAL.CDT2_EPECK, arg0: CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Constrained_triangulation_face_base_2<CGAL::Epeck, CGAL::Triangulation_face_base_2<CGAL::Epeck, CGAL::Triangulation_ds_face_base_2<CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<CGAL::Epeck, CGAL::Triangulation_ds_vertex_base_2<void> >, CGAL::Constrained_triangulation_face_base_2<CGAL::Epeck, CGAL::Triangulation_face_base_2<CGAL::Epeck, CGAL::Triangulation_ds_face_base_2<void> > > > > > >, CGAL::Default, CGAL::Default, CGAL::Default>, false>) CGAL::Triangle_2<CGAL::Epeck>
- class pyg4ometry.pycgal.CGAL.CDT2_EPECK_Face
Bases:
pybind11_object
- class pyg4ometry.pycgal.CGAL.CDT2_EPECK_Face_handle
Bases:
pybind11_object
- class pyg4ometry.pycgal.CGAL.CDT2_EPECK_Vertex
Bases:
pybind11_object
- class pyg4ometry.pycgal.CGAL.CDT2_EPECK_Vertex_handle
Bases:
pybind11_object
- class pyg4ometry.pycgal.CGAL.CDT2_EPICK
Bases:
pybind11_object
- class pyg4ometry.pycgal.CGAL.EPECK_NT
Bases:
pybind11_object
- class pyg4ometry.pycgal.CGAL.EPICK_NT
Bases:
pybind11_object
- class pyg4ometry.pycgal.CGAL.Identity_transformation
Bases:
pybind11_object
- class pyg4ometry.pycgal.CGAL.Mesh_complex_3_in_triangulation_3_EPICK
Bases:
pybind11_object
- output_facets_in_complex_to_off(self: pyg4ometry.pycgal.CGAL.Mesh_complex_3_in_triangulation_3_EPICK, arg0: str) None
- class pyg4ometry.pycgal.CGAL.Mesh_criteria_3_EPICK
Bases:
pybind11_object
- class pyg4ometry.pycgal.CGAL.Polyhedral_mesh_domain_3_EPICK
Bases:
pybind11_object
- class pyg4ometry.pycgal.CGAL.Rotation
Bases:
pybind11_object
- class pyg4ometry.pycgal.CGAL.Scaling
Bases:
pybind11_object
- class pyg4ometry.pycgal.CGAL.Translation
Bases:
pybind11_object
- pyg4ometry.pycgal.CGAL.clear(*args, **kwargs)
Overloaded function.
clear(arg0: CGAL::Polyhedron_3<CGAL::Epeck, CGAL::Polyhedron_items_3, CGAL::HalfedgeDS_default, std::__1::allocator<int> >) -> None
clear(arg0: CGAL::Polyhedron_3<CGAL::Epick, CGAL::Polyhedron_items_3, CGAL::HalfedgeDS_default, std::__1::allocator<int> >) -> None
clear(arg0: CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epeck> >) -> None
clear(arg0: CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick> >) -> None
- pyg4ometry.pycgal.CGAL.convex_decomposition_3(*args, **kwargs)
Overloaded function.
convex_decomposition_3(arg0: CGAL::Nef_polyhedron_3<CGAL::Epick, CGAL::SNC_indexed_items, bool>) -> None
convex_decomposition_3(arg0: CGAL::Nef_polyhedron_3<CGAL::Epeck, CGAL::SNC_indexed_items, bool>) -> None
- pyg4ometry.pycgal.CGAL.copy_face_graph(*args, **kwargs)
Overloaded function.
copy_face_graph(arg0: CGAL::Polyhedron_3<CGAL::Epeck, CGAL::Polyhedron_items_3, CGAL::HalfedgeDS_default, std::__1::allocator<int> >, arg1: CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epeck> >) -> None
copy_face_graph(arg0: CGAL::Polyhedron_3<CGAL::Epick, CGAL::Polyhedron_items_3, CGAL::HalfedgeDS_default, std::__1::allocator<int> >, arg1: CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick> >) -> None
copy_face_graph(arg0: CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epeck> >, arg1: CGAL::Polyhedron_3<CGAL::Epeck, CGAL::Polyhedron_items_3, CGAL::HalfedgeDS_default, std::__1::allocator<int> >) -> None
copy_face_graph(arg0: CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick> >, arg1: CGAL::Polyhedron_3<CGAL::Epick, CGAL::Polyhedron_items_3, CGAL::HalfedgeDS_default, std::__1::allocator<int> >) -> None
copy_face_graph(arg0: CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick> >, arg1: CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epeck> >) -> None
copy_face_graph(arg0: CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epeck> >, arg1: CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick> >) -> None
copy_face_graph(arg0: CGAL::Polyhedron_3<CGAL::Epick, CGAL::Polyhedron_items_3, CGAL::HalfedgeDS_default, std::__1::allocator<int> >, arg1: CGAL::Polyhedron_3<CGAL::Epeck, CGAL::Polyhedron_items_3, CGAL::HalfedgeDS_default, std::__1::allocator<int> >) -> None
copy_face_graph(arg0: CGAL::Polyhedron_3<CGAL::Epeck, CGAL::Polyhedron_items_3, CGAL::HalfedgeDS_default, std::__1::allocator<int> >, arg1: CGAL::Polyhedron_3<CGAL::Epick, CGAL::Polyhedron_items_3, CGAL::HalfedgeDS_default, std::__1::allocator<int> >) -> None
- pyg4ometry.pycgal.CGAL.difference(*args, **kwargs)
Overloaded function.
difference(arg0: CGAL::Polygon_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg1: CGAL::Polygon_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > > > >) -> None
difference(arg0: CGAL::Polygon_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg1: CGAL::Polygon_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > > > >) -> None
difference(arg0: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg1: CGAL::Polygon_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > > > >) -> None
difference(arg0: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg1: CGAL::Polygon_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > > > >) -> None
difference(arg0: CGAL::Polygon_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg1: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > > > >) -> None
difference(arg0: CGAL::Polygon_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg1: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > > > >) -> None
difference(arg0: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg1: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > > > >) -> None
difference(arg0: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg1: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > > > >) -> None
- pyg4ometry.pycgal.CGAL.do_intersect(*args, **kwargs)
Overloaded function.
do_intersect(arg0: CGAL::Polygon_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg1: CGAL::Polygon_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >) -> bool
do_intersect(arg0: CGAL::Polygon_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg1: CGAL::Polygon_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >) -> bool
- pyg4ometry.pycgal.CGAL.halfedges_around_face(arg0: CGAL::SM_Halfedge_index, arg1: CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epeck> >) Iterator
- pyg4ometry.pycgal.CGAL.intersection(*args, **kwargs)
Overloaded function.
intersection(arg0: CGAL::Polygon_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg1: CGAL::Polygon_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > > > >) -> None
intersection(arg0: CGAL::Polygon_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg1: CGAL::Polygon_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > > > >) -> None
intersection(arg0: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg1: CGAL::Polygon_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > > > >) -> None
intersection(arg0: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg1: CGAL::Polygon_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > > > >) -> None
intersection(arg0: CGAL::Polygon_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg1: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > > > >) -> None
intersection(arg0: CGAL::Polygon_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg1: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > > > >) -> None
intersection(arg0: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg1: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > > > >) -> None
intersection(arg0: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg1: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg2: std::__1::vector<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, std::__1::allocator<CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > > > >) -> None
- pyg4ometry.pycgal.CGAL.is_closed(*args, **kwargs)
Overloaded function.
is_closed(Surface_mesh_EPICK: CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick> >) -> bool
Is the surface closed
is_closed(Surface_mesh_EPECK: CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epeck> >) -> bool
Is the surface closed
- pyg4ometry.pycgal.CGAL.join(*args, **kwargs)
Overloaded function.
join(arg0: CGAL::Polygon_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg1: CGAL::Polygon_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg2: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >) -> None
join(arg0: CGAL::Polygon_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg1: CGAL::Polygon_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg2: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >) -> None
join(arg0: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg1: CGAL::Polygon_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg2: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >) -> None
join(arg0: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg1: CGAL::Polygon_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg2: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >) -> None
join(arg0: CGAL::Polygon_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg1: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg2: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >) -> None
join(arg0: CGAL::Polygon_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg1: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg2: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >) -> None
join(arg0: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg1: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >, arg2: CGAL::Polygon_with_holes_2<CGAL::Epick, std::__1::vector<CGAL::Point_2<CGAL::Epick>, std::__1::allocator<CGAL::Point_2<CGAL::Epick> > > >) -> None
join(arg0: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg1: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >, arg2: CGAL::Polygon_with_holes_2<CGAL::Epeck, std::__1::vector<CGAL::Point_2<CGAL::Epeck>, std::__1::allocator<CGAL::Point_2<CGAL::Epeck> > > >) -> None
- pyg4ometry.pycgal.CGAL.make_mesh_3(arg0: pyg4ometry.pycgal.CGAL.Polyhedral_mesh_domain_3_EPICK, arg1: pyg4ometry.pycgal.CGAL.Mesh_criteria_3_EPICK) pyg4ometry.pycgal.CGAL.Mesh_complex_3_in_triangulation_3_EPICK
- pyg4ometry.pycgal.CGAL.to_double(*args, **kwargs)
Overloaded function.
to_double(arg0: float) -> float
to_double(arg0: float) -> float
to_double(arg0: pyg4ometry.pycgal.CGAL.EPECK_NT) -> float
to_double(arg0: pyg4ometry.pycgal.CGAL.EPECK_NT) -> float
- class pyg4ometry.pycgal.core.CSG
Bases:
object
- area()
- clone()
- coplanarIntersection(csg)
Compute the coplanar surfaces between self and csg
- classmethod cube(center=[0, 0, 0], radius=[1, 1, 1])
Construct an axis-aligned solid cuboid. Optional parameters are center and radius, which default to [0, 0, 0] and [1, 1, 1]. The radius can be specified using a single number or a list of three numbers, one for each axis.
Example code:
cube = CSG.cube( center=[0, 0, 0], radius=1 )
- classmethod fromPolygons(polygons, **kwargs)
- getNumberPolys()
- info()
- intersect(csg2)
- isNull()
- polygonCount()
- rotate(axisIn, angleDeg)
- scale(*args)
- subtract(csg2)
- toVerticesAndPolygons()
- translate(disp)
- union(csg2)
- vertexCount()
- volume()
- class pyg4ometry.pycgal.core.PolygonProcessing
Bases:
object
- classmethod decomposePolygon2d(pgon)
- classmethod reversePolygon(pgon)
return reversed polygon
- classmethod triangulatePolygon2d(pgon)
- classmethod windingNumber(pgon)
return the winding number of pgon
- class pyg4ometry.pycgal.core.PolyhedronProcessing
Bases:
object
- classmethod nefPolyhedron_to_convexPolyhedra(np)
- classmethod polyhedron_to_numpyArrayPlanes(p)
- classmethod surfaceMesh_to_Polyhedron(sm)
- pyg4ometry.pycgal.core.do_intersect(csg1, csg2)
- pyg4ometry.pycgal.core.intersecting_meshes(csgList)
- class pyg4ometry.pycgal.geom.Vector
Bases:
pybind11_object
- cross(self: pyg4ometry.pycgal.geom.Vector, arg0: pyg4ometry.pycgal.geom.Vector) pyg4ometry.pycgal.geom.Vector
- dot(self: pyg4ometry.pycgal.geom.Vector, arg0: pyg4ometry.pycgal.geom.Vector) float
- length(self: pyg4ometry.pycgal.geom.Vector) float
- lerp(self: pyg4ometry.pycgal.geom.Vector, arg0: pyg4ometry.pycgal.geom.Vector, arg1: float) pyg4ometry.pycgal.geom.Vector
- scale(self: pyg4ometry.pycgal.geom.Vector, arg0: pyg4ometry.pycgal.geom.Vector) pyg4ometry.pycgal.geom.Vector
- property x
- property y
- property z
- class pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK
Bases:
pybind11_object
- convert_inner_shell_to_polyhedron(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK, arg0: CGAL::SNC_structure<CGAL::Epeck, CGAL::SNC_indexed_items, bool>::Shell_entry_const_iterator, arg1: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) None
- convert_to_polyhedron(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK, arg0: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) None
- is_simple(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK) bool
- is_valid(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK, arg0: bool, arg1: int) bool
- number_of_edges(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK) int
- number_of_facets(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK) int
- number_of_halfedges(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK) int
- number_of_halffacets(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK) int
- number_of_vertices(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK) int
- number_of_volumes(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK) int
- volume_begin(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK) CGAL::internal::In_place_list_const_iterator<CGAL::SNC_in_place_list_volume<CGAL::SNC_indexed_items::Volume<CGAL::SNC_structure<CGAL::Epeck, CGAL::SNC_indexed_items, bool> > >, std::__1::allocator<CGAL::SNC_in_place_list_volume<CGAL::SNC_indexed_items::Volume<CGAL::SNC_structure<CGAL::Epeck, CGAL::SNC_indexed_items, bool> > > > >
- volume_end(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK) CGAL::internal::In_place_list_const_iterator<CGAL::SNC_in_place_list_volume<CGAL::SNC_indexed_items::Volume<CGAL::SNC_structure<CGAL::Epeck, CGAL::SNC_indexed_items, bool> > >, std::__1::allocator<CGAL::SNC_in_place_list_volume<CGAL::SNC_indexed_items::Volume<CGAL::SNC_structure<CGAL::Epeck, CGAL::SNC_indexed_items, bool> > > > >
- class pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK_Shell_entry_iterator
Bases:
pybind11_object
- class pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK_Volume_iterator
Bases:
pybind11_object
- shells_begin(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK_Volume_iterator) CGAL::SNC_structure<CGAL::Epeck, CGAL::SNC_indexed_items, bool>::Shell_entry_const_iterator
- shells_end(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPECK_Volume_iterator) CGAL::SNC_structure<CGAL::Epeck, CGAL::SNC_indexed_items, bool>::Shell_entry_const_iterator
- class pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK
Bases:
pybind11_object
- convert_to_polyhedron(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK, arg0: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK) None
- is_simple(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK) bool
- is_valid(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK, arg0: bool, arg1: int) bool
- number_of_edges(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK) int
- number_of_facets(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK) int
- number_of_halfedges(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK) int
- number_of_halffacets(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK) int
- number_of_vertices(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK) int
- number_of_volumes(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK) int
- volume_begin(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK) CGAL::internal::In_place_list_const_iterator<CGAL::SNC_in_place_list_volume<CGAL::SNC_indexed_items::Volume<CGAL::SNC_structure<CGAL::Epick, CGAL::SNC_indexed_items, bool> > >, std::__1::allocator<CGAL::SNC_in_place_list_volume<CGAL::SNC_indexed_items::Volume<CGAL::SNC_structure<CGAL::Epick, CGAL::SNC_indexed_items, bool> > > > >
- volume_end(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK) CGAL::internal::In_place_list_const_iterator<CGAL::SNC_in_place_list_volume<CGAL::SNC_indexed_items::Volume<CGAL::SNC_structure<CGAL::Epick, CGAL::SNC_indexed_items, bool> > >, std::__1::allocator<CGAL::SNC_in_place_list_volume<CGAL::SNC_indexed_items::Volume<CGAL::SNC_structure<CGAL::Epick, CGAL::SNC_indexed_items, bool> > > > >
- class pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK_Shell_entry_iterator
Bases:
pybind11_object
- class pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK_Volume_iterator
Bases:
pybind11_object
- shells_begin(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK_Volume_iterator) CGAL::SNC_structure<CGAL::Epick, CGAL::SNC_indexed_items, bool>::Shell_entry_const_iterator
- shells_end(self: pyg4ometry.pycgal.Nef_polyhedron_3.Nef_polyhedron_3_EPICK_Volume_iterator) CGAL::SNC_structure<CGAL::Epick, CGAL::SNC_indexed_items, bool>::Shell_entry_const_iterator
- class pyg4ometry.pycgal.Point_2.Point_2_EPECK
Bases:
pybind11_object
- x(self: pyg4ometry.pycgal.Point_2.Point_2_EPECK) float
- y(self: pyg4ometry.pycgal.Point_2.Point_2_EPECK) float
- class pyg4ometry.pycgal.Point_2.Point_2_EPICK
Bases:
pybind11_object
- x(self: pyg4ometry.pycgal.Point_2.Point_2_EPICK) float
- y(self: pyg4ometry.pycgal.Point_2.Point_2_EPICK) float
- class pyg4ometry.pycgal.Point_3.Point_3_EPECK
Bases:
pybind11_object
- bbox(self: pyg4ometry.pycgal.Point_3.Point_3_EPECK) CGAL::Bbox_3
- cartesian(self: pyg4ometry.pycgal.Point_3.Point_3_EPECK, arg0: int) pyg4ometry.pycgal.CGAL.EPECK_NT
- cartesian_begin(self: pyg4ometry.pycgal.Point_3.Point_3_EPECK) None
- cartesian_end(self: pyg4ometry.pycgal.Point_3.Point_3_EPECK) None
- cartesian_iter(self: pyg4ometry.pycgal.Point_3.Point_3_EPECK) Iterator
- dimension(self: pyg4ometry.pycgal.Point_3.Point_3_EPECK) int
- homogeneous(self: pyg4ometry.pycgal.Point_3.Point_3_EPECK, arg0: int) pyg4ometry.pycgal.CGAL.EPECK_NT
- transform(self: pyg4ometry.pycgal.Point_3.Point_3_EPECK, arg0: CGAL::Aff_transformation_3<CGAL::Epeck>) pyg4ometry.pycgal.Point_3.Point_3_EPECK
- class pyg4ometry.pycgal.Point_3.Point_3_EPICK
Bases:
pybind11_object
- bbox(self: pyg4ometry.pycgal.Point_3.Point_3_EPICK) CGAL::Bbox_3
- cartesian(self: pyg4ometry.pycgal.Point_3.Point_3_EPICK, arg0: int) float
- cartesian_begin(self: pyg4ometry.pycgal.Point_3.Point_3_EPICK) None
- cartesian_end(self: pyg4ometry.pycgal.Point_3.Point_3_EPICK) None
- cartesian_iter(self: pyg4ometry.pycgal.Point_3.Point_3_EPICK) Iterator
- dimension(self: pyg4ometry.pycgal.Point_3.Point_3_EPICK) int
- homogeneous(self: pyg4ometry.pycgal.Point_3.Point_3_EPICK, arg0: int) float
- hw(self: pyg4ometry.pycgal.Point_3.Point_3_EPICK) float
- hx(self: pyg4ometry.pycgal.Point_3.Point_3_EPICK) float
- hy(self: pyg4ometry.pycgal.Point_3.Point_3_EPICK) float
- hz(self: pyg4ometry.pycgal.Point_3.Point_3_EPICK) float
- transform(self: pyg4ometry.pycgal.Point_3.Point_3_EPICK, arg0: CGAL::Aff_transformation_3<CGAL::Epick>) pyg4ometry.pycgal.Point_3.Point_3_EPICK
- x(self: pyg4ometry.pycgal.Point_3.Point_3_EPICK) float
- y(self: pyg4ometry.pycgal.Point_3.Point_3_EPICK) float
- z(self: pyg4ometry.pycgal.Point_3.Point_3_EPICK) float
- class pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPECK
Bases:
pybind11_object
- append(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPECK, x: pyg4ometry.pycgal.Polygon_2.Polygon_2_EPECK) None
Add an item to the end of the list
- clear(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPECK) None
Clear the contents
- count(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPECK, x: pyg4ometry.pycgal.Polygon_2.Polygon_2_EPECK) int
Return the number of times
x
appears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPECK, L: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPECK) -> None
Extend the list by appending all the items in the given list
extend(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPECK, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPECK, i: int, x: pyg4ometry.pycgal.Polygon_2.Polygon_2_EPECK) None
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPECK) -> pyg4ometry.pycgal.Polygon_2.Polygon_2_EPECK
Remove and return the last item
pop(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPECK, i: int) -> pyg4ometry.pycgal.Polygon_2.Polygon_2_EPECK
Remove and return the item at index
i
- remove(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPECK, x: pyg4ometry.pycgal.Polygon_2.Polygon_2_EPECK) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPICK
Bases:
pybind11_object
- append(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPICK, x: pyg4ometry.pycgal.Polygon_2.Polygon_2_EPICK) None
Add an item to the end of the list
- clear(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPICK) None
Clear the contents
- count(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPICK, x: pyg4ometry.pycgal.Polygon_2.Polygon_2_EPICK) int
Return the number of times
x
appears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPICK, L: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPICK) -> None
Extend the list by appending all the items in the given list
extend(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPICK, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPICK, i: int, x: pyg4ometry.pycgal.Polygon_2.Polygon_2_EPICK) None
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPICK) -> pyg4ometry.pycgal.Polygon_2.Polygon_2_EPICK
Remove and return the last item
pop(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPICK, i: int) -> pyg4ometry.pycgal.Polygon_2.Polygon_2_EPICK
Remove and return the item at index
i
- remove(self: pyg4ometry.pycgal.Polygon_2.List_Polygon_2_EPICK, x: pyg4ometry.pycgal.Polygon_2.Polygon_2_EPICK) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class pyg4ometry.pycgal.Polygon_2.Polygon_2_EPECK
Bases:
pybind11_object
- push_back(self: pyg4ometry.pycgal.Polygon_2.Polygon_2_EPECK, arg0: pyg4ometry.pycgal.Point_2.Point_2_EPECK) None
- size(self: pyg4ometry.pycgal.Polygon_2.Polygon_2_EPECK) int
- vertex(self: pyg4ometry.pycgal.Polygon_2.Polygon_2_EPECK, arg0: int) pyg4ometry.pycgal.Point_2.Point_2_EPECK
- class pyg4ometry.pycgal.Polygon_2.Polygon_2_EPICK
Bases:
pybind11_object
- push_back(self: pyg4ometry.pycgal.Polygon_2.Polygon_2_EPICK, arg0: pyg4ometry.pycgal.Point_2.Point_2_EPICK) None
- size(self: pyg4ometry.pycgal.Polygon_2.Polygon_2_EPICK) int
- vertex(self: pyg4ometry.pycgal.Polygon_2.Polygon_2_EPICK, arg0: int) pyg4ometry.pycgal.Point_2.Point_2_EPICK
CGAL Polygon mesh processing
- pyg4ometry.pycgal.Polygon_mesh_processing.area(*args, **kwargs)
Overloaded function.
area(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) -> float
area(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) -> float
- pyg4ometry.pycgal.Polygon_mesh_processing.corefine_and_compute_difference(*args, **kwargs)
Overloaded function.
corefine_and_compute_difference(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK, arg1: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK, arg2: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) -> None
corefine_and_compute_difference(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg1: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg2: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) -> None
- pyg4ometry.pycgal.Polygon_mesh_processing.corefine_and_compute_intersection(*args, **kwargs)
Overloaded function.
corefine_and_compute_intersection(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK, arg1: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK, arg2: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) -> None
corefine_and_compute_intersection(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg1: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg2: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) -> None
- pyg4ometry.pycgal.Polygon_mesh_processing.corefine_and_compute_union(*args, **kwargs)
Overloaded function.
corefine_and_compute_union(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK, arg1: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK, arg2: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) -> None
corefine_and_compute_union(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg1: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg2: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) -> None
- pyg4ometry.pycgal.Polygon_mesh_processing.do_intersect(*args, **kwargs)
Overloaded function.
do_intersect(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK, arg1: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) -> bool
do_intersect(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg1: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) -> bool
- pyg4ometry.pycgal.Polygon_mesh_processing.isotropic_remeshing(*args, **kwargs)
Overloaded function.
isotropic_remeshing(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK, arg1: float, arg2: int) -> None
isotropic_remeshing(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg1: float, arg2: int) -> None
- pyg4ometry.pycgal.Polygon_mesh_processing.reverse_face_orientations(*args, **kwargs)
Overloaded function.
reverse_face_orientations(Surface_mesh: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) -> None
Reverse all face orientations
reverse_face_orientations(Surface_mesh: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) -> None
Reverse all face orientations
- pyg4ometry.pycgal.Polygon_mesh_processing.transform(*args, **kwargs)
Overloaded function.
transform(arg0: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPICK, arg1: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) -> None
transform(arg0: pyg4ometry.pycgal.Aff_transformation_3.Aff_transformation_3_EPECK, arg1: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) -> None
- pyg4ometry.pycgal.Polygon_mesh_processing.triangulate_faces(*args, **kwargs)
Overloaded function.
triangulate_faces(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) -> None
triangulate_faces(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) -> None
- pyg4ometry.pycgal.Polygon_mesh_processing.volume(*args, **kwargs)
Overloaded function.
volume(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) -> float
volume(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) -> float
- class pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK
Bases:
pybind11_object
- Supports_facet_plane(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) CGAL::Boolean_tag<true>
- buildFromVertsAndFaces(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK, arg0: List[List[float]], arg1: List[List[int]]) None
- convertToPlanes(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) List[List[float]]
- empty(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) bool
- facets_begin(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) CGAL::internal::In_place_list_iterator<CGAL::HalfedgeDS_in_place_list_face<CGAL::I_Polyhedron_facet<CGAL::HalfedgeDS_face_base<CGAL::HalfedgeDS_list_types<CGAL::Epeck, CGAL::I_Polyhedron_derived_items_3<CGAL::Polyhedron_items_3>, std::__1::allocator<int> >, CGAL::Boolean_tag<true>, CGAL::Plane_3<CGAL::Epeck> > > >, std::__1::allocator<CGAL::HalfedgeDS_in_place_list_face<CGAL::I_Polyhedron_facet<CGAL::HalfedgeDS_face_base<CGAL::HalfedgeDS_list_types<CGAL::Epeck, CGAL::I_Polyhedron_derived_items_3<CGAL::Polyhedron_items_3>, std::__1::allocator<int> >, CGAL::Boolean_tag<true>, CGAL::Plane_3<CGAL::Epeck> > > > > >
- facets_end(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) CGAL::internal::In_place_list_iterator<CGAL::HalfedgeDS_in_place_list_face<CGAL::I_Polyhedron_facet<CGAL::HalfedgeDS_face_base<CGAL::HalfedgeDS_list_types<CGAL::Epeck, CGAL::I_Polyhedron_derived_items_3<CGAL::Polyhedron_items_3>, std::__1::allocator<int> >, CGAL::Boolean_tag<true>, CGAL::Plane_3<CGAL::Epeck> > > >, std::__1::allocator<CGAL::HalfedgeDS_in_place_list_face<CGAL::I_Polyhedron_facet<CGAL::HalfedgeDS_face_base<CGAL::HalfedgeDS_list_types<CGAL::Epeck, CGAL::I_Polyhedron_derived_items_3<CGAL::Polyhedron_items_3>, std::__1::allocator<int> >, CGAL::Boolean_tag<true>, CGAL::Plane_3<CGAL::Epeck> > > > > >
- halfedges_begin(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) CGAL::internal::In_place_list_iterator<CGAL::HalfedgeDS_in_place_list_halfedge<CGAL::I_Polyhedron_halfedge<CGAL::HalfedgeDS_halfedge_base<CGAL::HalfedgeDS_list_types<CGAL::Epeck, CGAL::I_Polyhedron_derived_items_3<CGAL::Polyhedron_items_3>, std::__1::allocator<int> >, CGAL::Boolean_tag<true>, CGAL::Boolean_tag<true>, CGAL::Boolean_tag<true> > > >, std::__1::allocator<CGAL::HalfedgeDS_in_place_list_halfedge<CGAL::I_Polyhedron_halfedge<CGAL::HalfedgeDS_halfedge_base<CGAL::HalfedgeDS_list_types<CGAL::Epeck, CGAL::I_Polyhedron_derived_items_3<CGAL::Polyhedron_items_3>, std::__1::allocator<int> >, CGAL::Boolean_tag<true>, CGAL::Boolean_tag<true>, CGAL::Boolean_tag<true> > > > > >
- halfedges_end(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) CGAL::internal::In_place_list_iterator<CGAL::HalfedgeDS_in_place_list_halfedge<CGAL::I_Polyhedron_halfedge<CGAL::HalfedgeDS_halfedge_base<CGAL::HalfedgeDS_list_types<CGAL::Epeck, CGAL::I_Polyhedron_derived_items_3<CGAL::Polyhedron_items_3>, std::__1::allocator<int> >, CGAL::Boolean_tag<true>, CGAL::Boolean_tag<true>, CGAL::Boolean_tag<true> > > >, std::__1::allocator<CGAL::HalfedgeDS_in_place_list_halfedge<CGAL::I_Polyhedron_halfedge<CGAL::HalfedgeDS_halfedge_base<CGAL::HalfedgeDS_list_types<CGAL::Epeck, CGAL::I_Polyhedron_derived_items_3<CGAL::Polyhedron_items_3>, std::__1::allocator<int> >, CGAL::Boolean_tag<true>, CGAL::Boolean_tag<true>, CGAL::Boolean_tag<true> > > > > >
- inside_out(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) None
- is_closed(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) bool
- is_valid(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK, arg0: bool, arg1: int) bool
- normalized_border_is_valid(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK, arg0: bool) bool
- size_of_facets(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) int
- size_of_halfedges(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) int
- size_of_vertices(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) int
- write_OFF(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK, arg0: str) None
- class pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK_Facet_Iterator
Bases:
pybind11_object
- deref(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK_Facet_Iterator) CGAL::HalfedgeDS_in_place_list_face<CGAL::I_Polyhedron_facet<CGAL::HalfedgeDS_face_base<CGAL::HalfedgeDS_list_types<CGAL::Epeck, CGAL::I_Polyhedron_derived_items_3<CGAL::Polyhedron_items_3>, std::__1::allocator<int> >, CGAL::Boolean_tag<true>, CGAL::Plane_3<CGAL::Epeck> > > >
- next(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK_Facet_Iterator) None
- plane(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK_Facet_Iterator) pyg4ometry.pycgal.Plane_3.Plane_3_EPECK
- class pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK_Halfedge_Iterator
Bases:
pybind11_object
- class pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK
Bases:
pybind11_object
- buildFromVertsAndFaces(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK, arg0: List[List[float]], arg1: List[List[int]]) None
- empty(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK) bool
- inside_out(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK) None
- is_closed(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK) bool
- is_valid(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK, arg0: bool, arg1: int) bool
- normalized_border_is_valid(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK, arg0: bool) bool
- size_of_facets(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK) int
- size_of_halfedges(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK) int
- size_of_vertices(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK) int
- write_OFF(self: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK, arg0: str) None
- class pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPECK
Bases:
pybind11_object
- append(self: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPECK, x: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) None
Add an item to the end of the list
- clear(self: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPECK) None
Clear the contents
- extend(*args, **kwargs)
Overloaded function.
extend(self: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPECK, L: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPECK) -> None
Extend the list by appending all the items in the given list
extend(self: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPECK, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPECK, i: int, x: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK) None
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPECK) -> pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK
Remove and return the last item
pop(self: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPECK, i: int) -> pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPECK
Remove and return the item at index
i
- class pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPICK
Bases:
pybind11_object
- append(self: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPICK, x: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK) None
Add an item to the end of the list
- clear(self: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPICK) None
Clear the contents
- extend(*args, **kwargs)
Overloaded function.
extend(self: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPICK, L: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPICK) -> None
Extend the list by appending all the items in the given list
extend(self: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPICK, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPICK, i: int, x: pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK) None
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPICK) -> pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK
Remove and return the last item
pop(self: pyg4ometry.pycgal.Polyhedron_3.Vector_Polyhedron_3_EPICK, i: int) -> pyg4ometry.pycgal.Polyhedron_3.Polyhedron_3_EPICK
Remove and return the item at index
i
- class pyg4ometry.pycgal.Surface_mesh.Edge_index
Bases:
pybind11_object
- size_t(self: pyg4ometry.pycgal.Surface_mesh.Edge_index) int
- class pyg4ometry.pycgal.Surface_mesh.Face_index
Bases:
pybind11_object
- size_t(self: pyg4ometry.pycgal.Surface_mesh.Face_index) int
- class pyg4ometry.pycgal.Surface_mesh.Halfedge_index
Bases:
pybind11_object
- size_t(self: pyg4ometry.pycgal.Surface_mesh.Halfedge_index) int
- class pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK
Bases:
pybind11_object
- add_edge(*args, **kwargs)
Overloaded function.
add_edge(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) -> pyg4ometry.pycgal.Surface_mesh.Halfedge_index
add_edge(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Vertex_index, arg1: pyg4ometry.pycgal.Surface_mesh.Vertex_index) -> pyg4ometry.pycgal.Surface_mesh.Halfedge_index
- add_face(*args, **kwargs)
Overloaded function.
add_face(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) -> None
add_face(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Vertex_index, arg1: pyg4ometry.pycgal.Surface_mesh.Vertex_index, arg2: pyg4ometry.pycgal.Surface_mesh.Vertex_index) -> pyg4ometry.pycgal.Surface_mesh.Face_index
add_face(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Vertex_index, arg1: pyg4ometry.pycgal.Surface_mesh.Vertex_index, arg2: pyg4ometry.pycgal.Surface_mesh.Vertex_index, arg3: pyg4ometry.pycgal.Surface_mesh.Vertex_index) -> pyg4ometry.pycgal.Surface_mesh.Face_index
- add_vertex(*args, **kwargs)
Overloaded function.
add_vertex(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) -> pyg4ometry.pycgal.Surface_mesh.Vertex_index
add_vertex(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Point_3.Point_3_EPECK) -> pyg4ometry.pycgal.Surface_mesh.Vertex_index
- clear(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) None
- clear_without_removing_property_maps(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) None
- clone(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK
- edges(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) Iterator
- face(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Halfedge_index) pyg4ometry.pycgal.Surface_mesh.Face_index
- faces(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) Iterator
- halfedge(*args, **kwargs)
Overloaded function.
halfedge(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Vertex_index) -> pyg4ometry.pycgal.Surface_mesh.Halfedge_index
halfedge(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Face_index) -> pyg4ometry.pycgal.Surface_mesh.Halfedge_index
halfedge(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Vertex_index, arg1: pyg4ometry.pycgal.Surface_mesh.Vertex_index) -> pyg4ometry.pycgal.Surface_mesh.Halfedge_index
- halfedges(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) Iterator
- is_empty(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) bool
- next(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Halfedge_index) pyg4ometry.pycgal.Surface_mesh.Halfedge_index
- next_around_source(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Halfedge_index) pyg4ometry.pycgal.Surface_mesh.Halfedge_index
- next_around_target(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Halfedge_index) pyg4ometry.pycgal.Surface_mesh.Halfedge_index
- number_of_edges(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) int
- number_of_faces(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) int
- number_of_halfedges(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) int
- number_of_vertices(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) int
- opposite(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Halfedge_index) pyg4ometry.pycgal.Surface_mesh.Halfedge_index
- point(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Vertex_index) pyg4ometry.pycgal.Point_3.Point_3_EPECK
- prev(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Halfedge_index) pyg4ometry.pycgal.Surface_mesh.Halfedge_index
- prev_around_source(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Halfedge_index) pyg4ometry.pycgal.Surface_mesh.Halfedge_index
- prev_around_target(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Halfedge_index) pyg4ometry.pycgal.Surface_mesh.Halfedge_index
- source(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Halfedge_index) pyg4ometry.pycgal.Surface_mesh.Vertex_index
- target(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Halfedge_index) pyg4ometry.pycgal.Surface_mesh.Vertex_index
- vertex(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg0: pyg4ometry.pycgal.Surface_mesh.Edge_index, arg1: int) pyg4ometry.pycgal.Surface_mesh.Vertex_index
- vertices(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) Iterator
- class pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK
Bases:
pybind11_object
- add_edge(*args, **kwargs)
Overloaded function.
add_edge(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) -> pyg4ometry.pycgal.Surface_mesh.Halfedge_index
add_edge(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK, arg0: pyg4ometry.pycgal.Surface_mesh.Vertex_index, arg1: pyg4ometry.pycgal.Surface_mesh.Vertex_index) -> pyg4ometry.pycgal.Surface_mesh.Halfedge_index
- add_face(*args, **kwargs)
Overloaded function.
add_face(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) -> None
add_face(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK, arg0: pyg4ometry.pycgal.Surface_mesh.Vertex_index, arg1: pyg4ometry.pycgal.Surface_mesh.Vertex_index, arg2: pyg4ometry.pycgal.Surface_mesh.Vertex_index) -> pyg4ometry.pycgal.Surface_mesh.Face_index
add_face(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK, arg0: pyg4ometry.pycgal.Surface_mesh.Vertex_index, arg1: pyg4ometry.pycgal.Surface_mesh.Vertex_index, arg2: pyg4ometry.pycgal.Surface_mesh.Vertex_index, arg3: pyg4ometry.pycgal.Surface_mesh.Vertex_index) -> pyg4ometry.pycgal.Surface_mesh.Face_index
- add_vertex(*args, **kwargs)
Overloaded function.
add_vertex(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) -> pyg4ometry.pycgal.Surface_mesh.Vertex_index
add_vertex(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK, arg0: pyg4ometry.pycgal.Point_3.Point_3_EPICK) -> pyg4ometry.pycgal.Surface_mesh.Vertex_index
- clear(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) None
- clear_without_removing_property_maps(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) None
- clone(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK
- hash(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) int
- is_empty(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) bool
- number_of_edges(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) int
- number_of_faces(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) int
- number_of_halfedges(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) int
- number_of_vertices(self: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) int
- class pyg4ometry.pycgal.Surface_mesh.Vertex_index
Bases:
pybind11_object
- size_t(self: pyg4ometry.pycgal.Surface_mesh.Vertex_index) int
- pyg4ometry.pycgal.Surface_mesh.toCGALSurfaceMesh(*args, **kwargs)
Overloaded function.
toCGALSurfaceMesh(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK, arg1: list) -> None
toCGALSurfaceMesh(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK, arg1: list) -> None
- pyg4ometry.pycgal.Surface_mesh.toVerticesAndPolygons(*args, **kwargs)
Overloaded function.
toVerticesAndPolygons(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPICK) -> list
toVerticesAndPolygons(arg0: pyg4ometry.pycgal.Surface_mesh.Surface_mesh_EPECK) -> list
- class pyg4ometry.pycgal.Vector_3.Vector_3_EPECK
Bases:
pybind11_object
- cartesian(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK, arg0: int) pyg4ometry.pycgal.CGAL.EPECK_NT
- cartesian_begin(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK) None
- cartesian_end(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK) None
- cartesian_iter(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK) Iterator
- dimension(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK) int
- direction(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK) CGAL::Direction_3<CGAL::Epeck>
- homogeneous(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK, arg0: int) pyg4ometry.pycgal.CGAL.EPECK_NT
- hw(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK) float
- hx(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK) float
- hy(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK) float
- hz(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK) float
- squared_length(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK) pyg4ometry.pycgal.CGAL.EPECK_NT
- transform(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK, arg0: CGAL::Aff_transformation_3<CGAL::Epeck>) pyg4ometry.pycgal.Vector_3.Vector_3_EPECK
- x(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK) float
- y(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK) float
- z(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPECK) float
- class pyg4ometry.pycgal.Vector_3.Vector_3_EPICK
Bases:
pybind11_object
- cartesian(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK, arg0: int) float
- cartesian_begin(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK) None
- cartesian_end(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK) None
- cartesian_iter(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK) Iterator
- dimension(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK) int
- direction(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK) CGAL::Direction_3<CGAL::Epick>
- homogeneous(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK, arg0: int) float
- hw(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK) float
- hx(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK) float
- hy(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK) float
- hz(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK) float
- squared_length(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK) float
- transform(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK, arg0: CGAL::Aff_transformation_3<CGAL::Epick>) pyg4ometry.pycgal.Vector_3.Vector_3_EPICK
- x(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK) float
- y(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK) float
- z(self: pyg4ometry.pycgal.Vector_3.Vector_3_EPICK) float
OpenCascade module
- pyg4ometry.pyoce.pythonHelpers.findOCCShapeByName(shapeTool, shapeName)
Find a shape by its name
- Parameters:
shapeTool (ShapeTool) – OpenCascade ShapeTool
shapeName (str) – Name of the shape
- pyg4ometry.pyoce.pythonHelpers.findOCCShapeByTreeNode(label, shapeTreeNode)
- pyg4ometry.pyoce.pythonHelpers.get_TDataStd_Name_From_Label(label)
- pyg4ometry.pyoce.pythonHelpers.get_TDataStd_TreeNode_From_Label(label)
- pyg4ometry.pyoce.pythonHelpers.get_XCAFDoc_Location_From_Label(label)
- pyg4ometry.pyoce.pythonHelpers.get_shapeTypeString(st, label)
- pyg4ometry.pyoce.pythonHelpers.gp_XYZ_numpy(xyz)
- pyg4ometry.pyoce.pythonHelpers.test(fileName)
- class pyg4ometry.pyoce.BRep.BRep_Tool
Bases:
pybind11_object
- static Curve(arg0: pyg4ometry.pyoce.TopoDS.TopoDS_Edge, arg1: pyg4ometry.pyoce.TopLoc.TopLoc_Location, arg2: float, arg3: float) tuple
- static Triangulation(arg0: pyg4ometry.pyoce.TopoDS.TopoDS_Face, arg1: pyg4ometry.pyoce.TopLoc.TopLoc_Location, arg2: int) pyg4ometry.pyoce.Poly.Poly_Triangulation
- class pyg4ometry.pyoce.BRepMesh.BRepMesh_IncrementalMesh
Bases:
pybind11_object
- class pyg4ometry.pyoce.Geom.Geom_Curve
Bases:
Geom_Geometry
- Value(self: pyg4ometry.pyoce.Geom.Geom_Curve, arg0: float) pyg4ometry.pyoce.gp.gp_Pnt
- class pyg4ometry.pyoce.Geom.Geom_Geometry
Bases:
pybind11_object
- class pyg4ometry.pyoce.gp.gp_Dir
Bases:
pybind11_object
- X(self: pyg4ometry.pyoce.gp.gp_Dir) float
- Y(self: pyg4ometry.pyoce.gp.gp_Dir) float
- Z(self: pyg4ometry.pyoce.gp.gp_Dir) float
- class pyg4ometry.pyoce.gp.gp_Pnt
Bases:
pybind11_object
- Transform(self: pyg4ometry.pyoce.gp.gp_Pnt, arg0: gp_Trsf) None
- X(self: pyg4ometry.pyoce.gp.gp_Pnt) float
- Y(self: pyg4ometry.pyoce.gp.gp_Pnt) float
- Z(self: pyg4ometry.pyoce.gp.gp_Pnt) float
- class pyg4ometry.pyoce.gp.gp_Trsf
Bases:
pybind11_object
- DumpJson(self: pyg4ometry.pyoce.gp.gp_Trsf) None
- GetRotation(self: pyg4ometry.pyoce.gp.gp_Trsf, arg0: pyg4ometry.pyoce.gp.gp_XYZ, arg1: float) tuple
- ScaleFactor(self: pyg4ometry.pyoce.gp.gp_Trsf) float
- TranslationPart(self: pyg4ometry.pyoce.gp.gp_Trsf) pyg4ometry.pyoce.gp.gp_XYZ
- class pyg4ometry.pyoce.gp.gp_XYZ
Bases:
pybind11_object
- DumpJson(self: pyg4ometry.pyoce.gp.gp_XYZ) None
- X(self: pyg4ometry.pyoce.gp.gp_XYZ) float
- Y(self: pyg4ometry.pyoce.gp.gp_XYZ) float
- Z(self: pyg4ometry.pyoce.gp.gp_XYZ) float
- class pyg4ometry.pyoce.Message.Message_ProgressRange
Bases:
pybind11_object
- class pyg4ometry.pyoce.Poly.Poly_MeshPurpose
Bases:
pybind11_object
Members:
Poly_MeshPurpose_NONE
Poly_MeshPurpose_Calculation
Poly_MeshPurpose_Presentation
Poly_MeshPurpose_Active
Poly_MeshPurpose_Loaded
Poly_MeshPurpose_AnyFallback
Poly_MeshPurpose_USER
- Poly_MeshPurpose_Active = <Poly_MeshPurpose.Poly_MeshPurpose_Active: 4>
- Poly_MeshPurpose_AnyFallback = <Poly_MeshPurpose.Poly_MeshPurpose_AnyFallback: 16>
- Poly_MeshPurpose_Calculation = <Poly_MeshPurpose.Poly_MeshPurpose_Calculation: 1>
- Poly_MeshPurpose_Loaded = <Poly_MeshPurpose.Poly_MeshPurpose_Loaded: 8>
- Poly_MeshPurpose_NONE = <Poly_MeshPurpose.Poly_MeshPurpose_NONE: 0>
- Poly_MeshPurpose_Presentation = <Poly_MeshPurpose.Poly_MeshPurpose_Presentation: 2>
- Poly_MeshPurpose_USER = <Poly_MeshPurpose.Poly_MeshPurpose_USER: 32>
- property name
- property value
- class pyg4ometry.pyoce.Poly.Poly_Triangle
Bases:
pybind11_object
- Get(self: pyg4ometry.pyoce.Poly.Poly_Triangle) tuple
- Set(*args, **kwargs)
Overloaded function.
Set(self: pyg4ometry.pyoce.Poly.Poly_Triangle, arg0: int, arg1: int, arg2: int) -> None
Set(self: pyg4ometry.pyoce.Poly.Poly_Triangle, arg0: int, arg1: int) -> None
- Value(self: pyg4ometry.pyoce.Poly.Poly_Triangle, arg0: int) int
- class pyg4ometry.pyoce.Poly.Poly_Triangulation
Bases:
Standard_Transient
- Deflection(self: pyg4ometry.pyoce.Poly.Poly_Triangulation) float
- HasGeometry(self: pyg4ometry.pyoce.Poly.Poly_Triangulation) bool
- HasNormals(self: pyg4ometry.pyoce.Poly.Poly_Triangulation) bool
- HasUVNodes(self: pyg4ometry.pyoce.Poly.Poly_Triangulation) bool
- NbNodes(self: pyg4ometry.pyoce.Poly.Poly_Triangulation) int
- NbTriangles(self: pyg4ometry.pyoce.Poly.Poly_Triangulation) int
- Node(self: pyg4ometry.pyoce.Poly.Poly_Triangulation, arg0: int) pyg4ometry.pyoce.gp.gp_Pnt
- Normal(self: pyg4ometry.pyoce.Poly.Poly_Triangulation, arg0: int) pyg4ometry.pyoce.gp.gp_Dir
- SetNode(self: pyg4ometry.pyoce.Poly.Poly_Triangulation, arg0: int, arg1: pyg4ometry.pyoce.gp.gp_Pnt) None
- SetTriangle(self: pyg4ometry.pyoce.Poly.Poly_Triangulation, arg0: int, arg1: pyg4ometry.pyoce.Poly.Poly_Triangle) None
- Triangle(self: pyg4ometry.pyoce.Poly.Poly_Triangulation, arg0: int) pyg4ometry.pyoce.Poly.Poly_Triangle
- UVNode(self: pyg4ometry.pyoce.Poly.Poly_Triangulation, arg0: int) pyg4ometry.pyoce.gp.gp_Pnt
- class pyg4ometry.pyoce.Reader.Reader(fileName)
Bases:
object
- freeShapes()
- readStepFile(fileName)
- traverse(label=None)
- class pyg4ometry.pyoce.STEPCAFControl.STEPCAFControl_Reader
Bases:
pybind11_object
- ReadFile(self: pyg4ometry.pyoce.STEPCAFControl.STEPCAFControl_Reader, arg0: str) None
- SetColorMode(self: pyg4ometry.pyoce.STEPCAFControl.STEPCAFControl_Reader, arg0: bool) None
- SetLayerMode(self: pyg4ometry.pyoce.STEPCAFControl.STEPCAFControl_Reader, arg0: bool) None
- SetNameMode(self: pyg4ometry.pyoce.STEPCAFControl.STEPCAFControl_Reader, arg0: bool) None
- Transfer(self: pyg4ometry.pyoce.STEPCAFControl.STEPCAFControl_Reader, arg0: pyg4ometry.pyoce.TDocStd.TDocStd_Document, arg1: pyg4ometry.pyoce.Message.Message_ProgressRange) None
- class pyg4ometry.pyoce.StlAPI.StlAPI_Writer
Bases:
pybind11_object
- Write(self: pyg4ometry.pyoce.StlAPI.StlAPI_Writer, arg0: pyg4ometry.pyoce.TopoDS.TopoDS_Shape, arg1: str, arg2: pyg4ometry.pyoce.Message.Message_ProgressRange) None
- class pyg4ometry.pyoce.TCollection.TCollection_AsciiString
Bases:
pybind11_object
- ToCString(self: pyg4ometry.pyoce.TCollection.TCollection_AsciiString) str
- class pyg4ometry.pyoce.TCollection.TCollection_ExtendedString
Bases:
pybind11_object
- Length(self: pyg4ometry.pyoce.TCollection.TCollection_ExtendedString) int
- Print(self: pyg4ometry.pyoce.TCollection.TCollection_ExtendedString) None
- ToExtString(self: pyg4ometry.pyoce.TCollection.TCollection_ExtendedString) str
- class pyg4ometry.pyoce.TDataStd.TDataStd_GenericExtString
Bases:
TDF_Attribute
- Get(self: pyg4ometry.pyoce.TDataStd.TDataStd_GenericExtString) pyg4ometry.pyoce.TCollection.TCollection_ExtendedString
- class pyg4ometry.pyoce.TDataStd.TDataStd_Name
Bases:
TDataStd_GenericExtString
- Dump(self: pyg4ometry.pyoce.TDataStd.TDataStd_Name) None
- static GetID() pyg4ometry.pyoce.TKernel.Standard_GUID
- class pyg4ometry.pyoce.TDataStd.TDataStd_TreeNode
Bases:
TDF_Attribute
- Dump(self: pyg4ometry.pyoce.TDataStd.TDataStd_TreeNode) None
- DumpJson(self: pyg4ometry.pyoce.TDataStd.TDataStd_TreeNode) None
- static GetDefaultTreeID() pyg4ometry.pyoce.TKernel.Standard_GUID
- class pyg4ometry.pyoce.TDataStd.TDataStd_UAttribute
Bases:
TDF_Attribute
- Dump(self: pyg4ometry.pyoce.TDataStd.TDataStd_UAttribute) None
- DumpJson(self: pyg4ometry.pyoce.TDataStd.TDataStd_UAttribute) None
- class pyg4ometry.pyoce.TDF.TDFClass
Bases:
pybind11_object
- static AddLinkGUIDToProgID(arg0: pyg4ometry.pyoce.TKernel.Standard_GUID, arg1: pyg4ometry.pyoce.TCollection.TCollection_ExtendedString) None
- static GUIDFromProgID(arg0: pyg4ometry.pyoce.TCollection.TCollection_ExtendedString, arg1: pyg4ometry.pyoce.TKernel.Standard_GUID) bool
- static LowestID() pyg4ometry.pyoce.TKernel.Standard_GUID
- static ProgIDFromGUID(arg0: pyg4ometry.pyoce.TKernel.Standard_GUID, arg1: pyg4ometry.pyoce.TCollection.TCollection_ExtendedString) bool
- static UppestID() pyg4ometry.pyoce.TKernel.Standard_GUID
- class pyg4ometry.pyoce.TDF.TDF_Attribute
Bases:
Standard_Transient
- Label(self: pyg4ometry.pyoce.TDF.TDF_Attribute) TDF_Label
- class pyg4ometry.pyoce.TDF.TDF_AttributeIterator
Bases:
pybind11_object
- Initialize(self: pyg4ometry.pyoce.TDF.TDF_AttributeIterator, arg0: TDF_Label, arg1: bool) None
- More(self: pyg4ometry.pyoce.TDF.TDF_AttributeIterator) bool
- Next(self: pyg4ometry.pyoce.TDF.TDF_AttributeIterator) None
- class pyg4ometry.pyoce.TDF.TDF_Data
Bases:
Standard_Transient
- class pyg4ometry.pyoce.TDF.TDF_Label
Bases:
pybind11_object
- Depth(self: pyg4ometry.pyoce.TDF.TDF_Label) int
- Dump(self: pyg4ometry.pyoce.TDF.TDF_Label) None
- EntryDump(self: pyg4ometry.pyoce.TDF.TDF_Label) None
- Father(self: pyg4ometry.pyoce.TDF.TDF_Label) pyg4ometry.pyoce.TDF.TDF_Label
- FindAttribute(*args, **kwargs)
Overloaded function.
FindAttribute(self: pyg4ometry.pyoce.TDF.TDF_Label, arg0: pyg4ometry.pyoce.TKernel.Standard_GUID, arg1: pyg4ometry.pyoce.TDF.TDF_Attribute) -> tuple
FindAttribute(self: pyg4ometry.pyoce.TDF.TDF_Label, arg0: pyg4ometry.pyoce.TKernel.Standard_GUID, arg1: int, arg2: TDataStd_Name) -> tuple
- FindChild(self: pyg4ometry.pyoce.TDF.TDF_Label, arg0: int, arg1: bool) tuple
- HasAttribute(self: pyg4ometry.pyoce.TDF.TDF_Label) bool
- HasChild(self: pyg4ometry.pyoce.TDF.TDF_Label) bool
- IsAttribute(self: pyg4ometry.pyoce.TDF.TDF_Label, arg0: pyg4ometry.pyoce.TKernel.Standard_GUID) bool
- IsDifferent(self: pyg4ometry.pyoce.TDF.TDF_Label, arg0: pyg4ometry.pyoce.TDF.TDF_Label) bool
- IsEqual(self: pyg4ometry.pyoce.TDF.TDF_Label, arg0: pyg4ometry.pyoce.TDF.TDF_Label) bool
- IsNull(self: pyg4ometry.pyoce.TDF.TDF_Label) bool
- IsRoot(self: pyg4ometry.pyoce.TDF.TDF_Label) bool
- NbAttributes(self: pyg4ometry.pyoce.TDF.TDF_Label) int
- NbChildren(self: pyg4ometry.pyoce.TDF.TDF_Label) int
- NewChild(self: pyg4ometry.pyoce.TDF.TDF_Label) pyg4ometry.pyoce.TDF.TDF_Label
- Nullify(self: pyg4ometry.pyoce.TDF.TDF_Label) None
- Tag(self: pyg4ometry.pyoce.TDF.TDF_Label) int
- Transaction(self: pyg4ometry.pyoce.TDF.TDF_Label) int
- class pyg4ometry.pyoce.TDF.TDF_LabelSequence
Bases:
pybind11_object
- Dump(self: pyg4ometry.pyoce.TDF.TDF_LabelSequence) None
- Size(self: pyg4ometry.pyoce.TDF.TDF_LabelSequence) int
- Value(self: pyg4ometry.pyoce.TDF.TDF_LabelSequence, arg0: int) pyg4ometry.pyoce.TDF.TDF_Label
- begin(self: pyg4ometry.pyoce.TDF.TDF_LabelSequence) NCollection_StlIterator<std::__1::bidirectional_iterator_tag, NCollection_Sequence<TDF_Label>::Iterator, TDF_Label, false>
- end(self: pyg4ometry.pyoce.TDF.TDF_LabelSequence) NCollection_StlIterator<std::__1::bidirectional_iterator_tag, NCollection_Sequence<TDF_Label>::Iterator, TDF_Label, false>
- class pyg4ometry.pyoce.TDF.TDF_TagSource
Bases:
TDF_Attribute
- Get(self: pyg4ometry.pyoce.TDF.TDF_TagSource) int
- static GetID() pyg4ometry.pyoce.TKernel.Standard_GUID
- class pyg4ometry.pyoce.TDF.TDF_Tool
Bases:
pybind11_object
- static Entry(arg0: pyg4ometry.pyoce.TDF.TDF_Label, arg1: pyg4ometry.pyoce.TCollection.TCollection_AsciiString) None
- static Label(arg0: pyg4ometry.pyoce.TDF.TDF_Data, arg1: pyg4ometry.pyoce.TCollection.TCollection_AsciiString, arg2: pyg4ometry.pyoce.TDF.TDF_Label, arg3: bool) pyg4ometry.pyoce.TDF.TDF_Label
- static NbAttributes(*args, **kwargs)
Overloaded function.
NbAttributes(arg0: pyg4ometry.pyoce.TDF.TDF_Tool, arg1: pyg4ometry.pyoce.TDF.TDF_Label) -> int
NbAttributes(arg0: pyg4ometry.pyoce.TDF.TDF_Tool, arg1: pyg4ometry.pyoce.TDF.TDF_Label, arg2: TDF_IDFilter) -> int
- static NbLabels(arg0: pyg4ometry.pyoce.TDF.TDF_Label) int
- class pyg4ometry.pyoce.TDocStd.TDocStd_Document
Bases:
pybind11_object
- class pyg4ometry.pyoce.TKernel.Standard_GUID
Bases:
pybind11_object
- class pyg4ometry.pyoce.TKernel.Standard_Transient
Bases:
pybind11_object
- DynamicType(self: pyg4ometry.pyoce.TKernel.Standard_Transient) Standard_Type
- static get_type_name() str
- class pyg4ometry.pyoce.TKernel.Standard_Type
Bases:
Standard_Transient
- Name(self: pyg4ometry.pyoce.TKernel.Standard_Type) str
- SystemName(self: pyg4ometry.pyoce.TKernel.Standard_Type) str
- class pyg4ometry.pyoce.TNaming.TNaming_NamedShape
Bases:
TDF_Attribute
- Dump(self: pyg4ometry.pyoce.TNaming.TNaming_NamedShape) None
- static GetID() pyg4ometry.pyoce.TKernel.Standard_GUID
- class pyg4ometry.pyoce.TopAbs.TopAbs_Orientation
Bases:
pybind11_object
Members:
TopAbs_FORWARD
TopAbs_REVERSED
TopAbs_INTERNAL
TopAbs_EXTERNAL
- TopAbs_EXTERNAL = <TopAbs_Orientation.TopAbs_EXTERNAL: 3>
- TopAbs_FORWARD = <TopAbs_Orientation.TopAbs_FORWARD: 0>
- TopAbs_INTERNAL = <TopAbs_Orientation.TopAbs_INTERNAL: 2>
- TopAbs_REVERSED = <TopAbs_Orientation.TopAbs_REVERSED: 1>
- property name
- property value
- class pyg4ometry.pyoce.TopAbs.TopAbs_ShapeEnum
Bases:
pybind11_object
Members:
TopAbs_COMPOUND
TopAbs_COMPSOLID
TopAbs_SOLID
TopAbs_SHELL
TopAbs_FACE
TopAbs_WIRE
TopAbs_EDGE
TopAbs_VERTEX
TopAbs_SHAPE
- TopAbs_COMPOUND = <TopAbs_ShapeEnum.TopAbs_COMPOUND: 0>
- TopAbs_COMPSOLID = <TopAbs_ShapeEnum.TopAbs_COMPSOLID: 1>
- TopAbs_EDGE = <TopAbs_ShapeEnum.TopAbs_EDGE: 6>
- TopAbs_FACE = <TopAbs_ShapeEnum.TopAbs_FACE: 4>
- TopAbs_SHAPE = <TopAbs_ShapeEnum.TopAbs_SHAPE: 8>
- TopAbs_SHELL = <TopAbs_ShapeEnum.TopAbs_SHELL: 3>
- TopAbs_SOLID = <TopAbs_ShapeEnum.TopAbs_SOLID: 2>
- TopAbs_VERTEX = <TopAbs_ShapeEnum.TopAbs_VERTEX: 7>
- TopAbs_WIRE = <TopAbs_ShapeEnum.TopAbs_WIRE: 5>
- property name
- property value
- class pyg4ometry.pyoce.TopExp.TopExp_Explorer
Bases:
pybind11_object
- Clear(self: pyg4ometry.pyoce.TopExp.TopExp_Explorer) None
- Depth(self: pyg4ometry.pyoce.TopExp.TopExp_Explorer) int
- Init(self: pyg4ometry.pyoce.TopExp.TopExp_Explorer, arg0: pyg4ometry.pyoce.TopoDS.TopoDS_Shape, arg1: pyg4ometry.pyoce.TopAbs.TopAbs_ShapeEnum, arg2: pyg4ometry.pyoce.TopAbs.TopAbs_ShapeEnum) None
- More(self: pyg4ometry.pyoce.TopExp.TopExp_Explorer) bool
- Next(self: pyg4ometry.pyoce.TopExp.TopExp_Explorer) None
- ReInit(self: pyg4ometry.pyoce.TopExp.TopExp_Explorer) None
- class pyg4ometry.pyoce.TopLoc.TopLoc_Datum3D
Bases:
Standard_Transient
- ShallowDump(self: pyg4ometry.pyoce.TopLoc.TopLoc_Location) None
- class pyg4ometry.pyoce.TopLoc.TopLoc_Location
Bases:
pybind11_object
- FirstDatum(self: pyg4ometry.pyoce.TopLoc.TopLoc_Location) TopLoc_Datum3D
- ShallowDump(self: pyg4ometry.pyoce.TopLoc.TopLoc_Location) None
- Transformation(self: pyg4ometry.pyoce.TopLoc.TopLoc_Location) pyg4ometry.pyoce.gp.gp_Trsf
- class pyg4ometry.pyoce.TopoDS.TopoDSClass
Bases:
pybind11_object
- static Edge(arg0: TopoDS_Shape) TopoDS_Edge
- static Face(arg0: TopoDS_Shape) TopoDS_Face
- static Wire(arg0: TopoDS_Shape) TopoDS_Wire
- class pyg4ometry.pyoce.TopoDS.TopoDS_Edge
Bases:
TopoDS_Shape
- class pyg4ometry.pyoce.TopoDS.TopoDS_Face
Bases:
TopoDS_Shape
- class pyg4ometry.pyoce.TopoDS.TopoDS_Shape
Bases:
pybind11_object
- DumpJson(self: pyg4ometry.pyoce.TopoDS.TopoDS_Shape) None
- IsNull(self: pyg4ometry.pyoce.TopoDS.TopoDS_Shape) bool
- Location(*args, **kwargs)
Overloaded function.
Location(self: pyg4ometry.pyoce.TopoDS.TopoDS_Shape) -> TopLoc_Location
Location(self: pyg4ometry.pyoce.TopoDS.TopoDS_Shape, arg0: TopLoc_Location) -> None
- NbChildren(self: pyg4ometry.pyoce.TopoDS.TopoDS_Shape) int
- Nullify(self: pyg4ometry.pyoce.TopoDS.TopoDS_Shape) None
- Orientation(self: pyg4ometry.pyoce.TopoDS.TopoDS_Shape) TopAbs_Orientation
- ShapeType(self: pyg4ometry.pyoce.TopoDS.TopoDS_Shape) TopAbs_ShapeEnum
- class pyg4ometry.pyoce.TopoDS.TopoDS_TFace
Bases:
TopoDS_TShape
- class pyg4ometry.pyoce.TopoDS.TopoDS_TShape
Bases:
pybind11_object
- class pyg4ometry.pyoce.TopoDS.TopoDS_TWire
Bases:
TopoDS_TShape
- class pyg4ometry.pyoce.TopoDS.TopoDS_Wire
Bases:
TopoDS_Shape
- class pyg4ometry.pyoce.XCAFApp.XCAFApp_Application
Bases:
pybind11_object
- static GetApplication() pyg4ometry.pyoce.XCAFApp.XCAFApp_Application
- class pyg4ometry.pyoce.XCAFDoc.XCAFDocClass
Bases:
pybind11_object
- static AssemblyGUID() pyg4ometry.pyoce.TKernel.Standard_GUID
- static ColorRefGUID(arg0: XCAFDoc_ColorType) pyg4ometry.pyoce.TKernel.Standard_GUID
- static DimTolRefGUID() pyg4ometry.pyoce.TKernel.Standard_GUID
- static DimensionRefFirstGUID() pyg4ometry.pyoce.TKernel.Standard_GUID
- static DimensionRefSecondGUID() pyg4ometry.pyoce.TKernel.Standard_GUID
- static GeomToleranceRefGUID() pyg4ometry.pyoce.TKernel.Standard_GUID
- static ShapeRefGUID() pyg4ometry.pyoce.TKernel.Standard_GUID
- class pyg4ometry.pyoce.XCAFDoc.XCAFDoc_DocumentTool
Bases:
TDF_Attribute
- static ColorTool(arg0: pyg4ometry.pyoce.TDF.TDF_Label) XCAFDoc_ColorTool
- static ShapeTool(arg0: pyg4ometry.pyoce.TDF.TDF_Label) XCAFDoc_ShapeTool
- class pyg4ometry.pyoce.XCAFDoc.XCAFDoc_Location
Bases:
TDF_Attribute
- static GetID() pyg4ometry.pyoce.TKernel.Standard_GUID
- class pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeMapTool
Bases:
TDF_Attribute
- static GetID() pyg4ometry.pyoce.TKernel.Standard_GUID
- class pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool
Bases:
pybind11_object
- BaseLabel(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool) pyg4ometry.pyoce.TDF.TDF_Label
- Dump(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool) None
- FindComponent(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TopoDS.TopoDS_Shape, arg1: pyg4ometry.pyoce.TDF.TDF_LabelSequence) bool
- FindShape(*args, **kwargs)
Overloaded function.
FindShape(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TopoDS.TopoDS_Shape, arg1: pyg4ometry.pyoce.TDF.TDF_Label, arg2: bool) -> bool
FindShape(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TopoDS.TopoDS_Shape, arg1: bool) -> pyg4ometry.pyoce.TDF.TDF_Label
- GetComponents(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_Label, arg1: pyg4ometry.pyoce.TDF.TDF_LabelSequence, arg2: bool) None
- GetFreeShapes(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_LabelSequence) None
- GetReferredShape(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_Label, arg1: pyg4ometry.pyoce.TDF.TDF_Label) None
- GetShape(*args, **kwargs)
Overloaded function.
GetShape(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_Label, arg1: pyg4ometry.pyoce.TopoDS.TopoDS_Shape) -> bool
GetShape(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_Label) -> pyg4ometry.pyoce.TopoDS.TopoDS_Shape
- GetShapes(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_LabelSequence) None
- GetSubShapes(self: pyg4ometry.pyoce.TDF.TDF_Label, arg0: pyg4ometry.pyoce.TDF.TDF_LabelSequence) bool
- GetUsers(self: pyg4ometry.pyoce.TDF.TDF_Label, arg0: pyg4ometry.pyoce.TDF.TDF_LabelSequence, arg1: bool) int
- IsAssembly(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_Label) bool
- IsComponent(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_Label) bool
- IsCompound(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_Label) bool
- IsFree(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_Label) bool
- IsReference(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_Label) bool
- IsShape(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_Label) bool
- IsSimpleShape(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_Label) bool
- IsSubShape(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_Label) bool
- IsTopLevel(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_Label) bool
- Search(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TopoDS.TopoDS_Shape, arg1: pyg4ometry.pyoce.TDF.TDF_Label, arg2: bool, arg3: bool, arg4: bool) bool
- SearchUsingMap(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TopoDS.TopoDS_Shape, arg1: pyg4ometry.pyoce.TDF.TDF_Label, arg2: bool, arg3: bool) bool
- SetShape(self: pyg4ometry.pyoce.XCAFDoc.XCAFDoc_ShapeTool, arg0: pyg4ometry.pyoce.TDF.TDF_Label, arg1: pyg4ometry.pyoce.TopoDS.TopoDS_Shape) None
Fluka bodies
Set of classes for FLUKA bodies.
- class pyg4ometry.fluka.body.ARB(name, vertices, facenumbers, transform=None, flukaregistry=None, comment='')
Bases:
BodyMixin
Arbitrary Convex Polyhedron
- Parameters:
name (str) – of body
vertices (list) – Eight vertices which make up the polyhedron as [[x1, y1, z1], [x2, y2, z2], …]. There must be eight even if only six or seven vertices are needed to make up the polydedron.
facenumbers (float) – The faces of the polyhedron expressed as floats where each digit of the float refers to one of the vertices which makes up that face. Six must always be provided as [1234,8765, …], even if only four or five faces are needed. Any unneeded faces must be set to 0 (no less than 4 sides). Note that the references to the vertices are not zero-counting. The order of the vertices denoted in the facenumbers must be either all clockwise or all anticlockwise, which if not obeyed will result in erroneous output without warning.
- _extent()
- _faceNumbersToZeroCountingIndices()
- _getVerticesAndPolygons()
- _toTesselatedSolid(verticesAndPolygons, greg, addRegistry)
- _toVerticesAndPolygons(reverse)
- _withLengthSafety(safety, reg)
- centre(aabb=None)
- flukaFreeString()
- geant4Solid(greg, aabb=None)
- hash()
- rotation()
- class pyg4ometry.fluka.body.BOX(name, vertex, edge1, edge2, edge3, transform=None, flukaregistry=None, comment='')
Bases:
BodyMixin
General Rectangular Parallelepiped
- Parameters:
name (str) – of body
vertex (list) – position [x, y, z] of one of the corners.
edge1 (list) – vector [x, y, z] denoting the first side of the box.
edge2 (list) – vector [x, y, z] denoting the second side of the box.
edge3 (list) – vector [x, y, z] denoting the second side of the box.
- _withLengthSafety(safety, reg)
- centre(aabb=None)
- flukaFreeString()
- geant4Solid(greg, aabb=None)
- hash()
- lengths()
- rotation()
- class pyg4ometry.fluka.body.ELL(name, focus1, focus2, length, transform=None, flukaregistry=None, comment='')
Bases:
BodyMixin
Ellipsoid of Revolution
- Parameters:
name (str) – of body
focus1 (list) – position [x, y, z] denoting of one of the foci.
focus2 (list) – position [x, y, z] denoting the other focus.
length (float) – length of the ellipse axis which the foci lie on.
- _linearEccentricity()
- _semiminor()
- _withLengthSafety(safety, reg)
- centre(aabb=None)
- flukaFreeString()
- geant4Solid(greg, aabb=None)
- hash()
- rotation()
- class pyg4ometry.fluka.body.PLA(name, normal, point, transform=None, flukaregistry=None, comment='')
Bases:
_HalfSpaceMixin
Infinite half-space delimited by the x-y plane (perpendicular to the z-axis) Generic infinite half-space.
- Parameters:
name (str) – of body
normal (list) – position of a point on the plane
normal – vector perpendicular to the face of the plane, pointing away from the contents of the half space.
- _withLengthSafety(safety, reg=None)
- flukaFreeString()
- hash()
- rotation()
- toPlane()
- class pyg4ometry.fluka.body.QUA(name, cxx, cyy, czz, cxy, cxz, cyz, cx, cy, cz, c, transform=None, flukaregistry=None, comment='', **kwargs)
Bases:
BodyMixin
Generic quadric
- Parameters:
name (str) – of body
cxx (float) – x^2 coefficient
cyy (float) – y^2 coefficient
czz (float) – z^2 coefficient
cxy (float) – xy coefficient
cxz (float) – xz coefficient
cyz (float) – yz coefficient
cx (float) – x coefficient
cy (float) – y coefficient
cz (float) – z coefficient
c (constant) – constant
- static _quadricMatrixToCoefficients(matrix)
- _withLengthSafety(safety, reg=None)
- centre(aabb=None)
- coefficientsMatrix()
- flukaFreeString()
- geant4Solid(reg, aabb=None)
- hash()
- mesh(lower, upper, capping=True)
- rotation()
- class pyg4ometry.fluka.body.RAW(name, vertex, edge1, edge2, edge3, transform=None, flukaregistry=None, comment='')
Bases:
_WED_RAW
Right Angle Wedge
- Parameters:
name (str) – of body
vertex (list) – position [x, y, z] of one of the the rectangular corners.
edge1 (list) – vector [x, y, z] denoting height of the wedge.
edge2 (list) – vector [x, y, z] denoting width of the wedge.
edge3 (list) – vector [x, y, z] denoting length of the wedge.
- class pyg4ometry.fluka.body.RCC(name, face, direction, radius, transform=None, flukaregistry=None, comment='')
Bases:
BodyMixin
Right Circular Cylinder
- Parameters:
name (str) – of body
vertex (list) – position [x, y, z] of one of the faces of the cylinder.
edge1 (list) – vector [x, y, z] denoting the direction along the length of the cylinder.
edge2 (float) – radius of the cylinder face.
- _withLengthSafety(safety, reg)
- centre(aabb=None)
- flukaFreeString()
- geant4Solid(reg, aabb=None)
- hash()
- rotation()
- class pyg4ometry.fluka.body.REC(name, face, direction, semiminor, semimajor, transform=None, flukaregistry=None, comment='')
Bases:
BodyMixin
Right Elliptical Cylinder
- Parameters:
name (str) – of body
vertex (list) – position [x, y, z] of one of the faces of the cylinder.
semiminor (list) – vector [x, y, z] denoting the direction along the semiminor axis of the ellipse.
semimajor (list) – vector [x, y, z] denoting the direction along the semimajor axis of the ellipse.
- _withLengthSafety(safety, reg)
- centre(aabb=None)
- flukaFreeString()
- geant4Solid(reg, aabb=None)
- hash()
- rotation()
- class pyg4ometry.fluka.body.RPP(name, xmin, xmax, ymin, ymax, zmin, zmax, transform=None, flukaregistry=None, addRegistry=True, comment='')
Bases:
BodyMixin
Rectangular Parallelepiped
- Parameters:
name (str) – of body
xmin (float) – lower x coordinate of RPP
xmax (float) – upper x coordinate of RPP
ymin (float) – lower y coordinate of RPP
ymax (float) – upper y coordinate of RPP
zmin (float) – lower z coordinate of RPP
zmax (float) – upper z coordinate of RPP)
- _withLengthSafety(safety, reg)
- centre(aabb=None)
- flukaFreeString()
- geant4Solid(reg, aabb=None)
- hash()
- lengths()
- rotation()
- class pyg4ometry.fluka.body.SPH(name, point, radius, transform=None, flukaregistry=None, comment='')
Bases:
BodyMixin
Sphere
- Parameters:
name (str) – of body
point (list) – position [x, y, z] of the centre of the sphere.
radius (float) – radius of the sphere.
- _withLengthSafety(safety, reg)
- centre(aabb=None)
- flukaFreeString()
- geant4Solid(reg, aabb=None)
- hash()
- rotation()
- class pyg4ometry.fluka.body.TRC(name, major_centre, direction, major_radius, minor_radius, transform=None, flukaregistry=None, comment='')
Bases:
BodyMixin
Truncated Right-angled Cone
- Parameters:
name (str) – of body
major_centre (list) – vector [x, y, z] position of the centre of the larger face.
direction (list) – vector [x, y, z] pointing from the larger face to the smaller face.
major_radius (float) – radius of the larger face.
minor_radius (float) – radius of the smaller face.
- _withLengthSafety(safety, reg)
- centre(aabb=None)
- flukaFreeString()
- geant4Solid(registry, aabb=None)
- hash()
- rotation()
- class pyg4ometry.fluka.body.WED(name, vertex, edge1, edge2, edge3, transform=None, flukaregistry=None, comment='')
Bases:
_WED_RAW
Right Angle Wedge
- Parameters:
name (str) – of body
vertex (list) – position [x, y, z] of one of the the rectangular corners.
edge1 (list) – vector [x, y, z] denoting height of the wedge.
edge2 (list) – vector [x, y, z] denoting width of the wedge.
edge3 (list) – vector [x, y, z] denoting length of the wedge.
- class pyg4ometry.fluka.body.XCC(name, y, z, radius, transform=None, flukaregistry=None, comment='')
Bases:
_InfiniteCylinderMixin
,_ShiftableCylinderMixin
Infinite Circular Cylinder parallel to the x-axis
- Parameters:
name (str) – of body
y (float) – position of the centre on the
z (float) – position of the centre on the
radius (float) – position of the centre on the
- _withLengthSafety(safety, reg=None)
- centre(aabb=None)
- direction()
- flukaFreeString()
- hash()
- point()
- rotation()
- class pyg4ometry.fluka.body.XEC(name, y, z, ysemi, zsemi, transform=None, flukaregistry=None, comment='')
Bases:
BodyMixin
,_ShiftableCylinderMixin
Infinite Elliptical Cylinder parallel to the x-axis
- Parameters:
name (str) – of body
y (float) – position of the centre on the
z (float) – position of the centre on the
ysemi (float) – position of the centre on the
zsemi (float) – position of the centre on the
- _withLengthSafety(safety, reg=None)
- centre(aabb=None)
- flukaFreeString()
- geant4Solid(reg, aabb=None)
- hash()
- rotation()
- class pyg4ometry.fluka.body.XYP(name, z, transform=None, flukaregistry=None, comment='')
Bases:
_HalfSpaceMixin
Infinite half-space delimited by the x-y plane (perpendicular to the z-axis)
- Parameters:
name (str) – of body
z (float) – position of the x-y plane on the z-axis. All points less than z are considered to be part of this body.
- _withLengthSafety(safety, reg)
- flukaFreeString()
- hash()
- toPlane()
- class pyg4ometry.fluka.body.XZP(name, y, transform=None, flukaregistry=None, comment='')
Bases:
_HalfSpaceMixin
Infinite half-space delimited by the x-y plane (perpendicular to the y-axis)
- Parameters:
name (str) – of body
y (float) – position of the x-y plane on the y-axis. All points less than y are considered to be part of this body.
- _withLengthSafety(safety, reg)
- flukaFreeString()
- hash()
- toPlane()
- class pyg4ometry.fluka.body.YCC(name, z, x, radius, transform=None, flukaregistry=None, comment='')
Bases:
_InfiniteCylinderMixin
,_ShiftableCylinderMixin
Infinite Circular Cylinder parallel to the y-axis
- Parameters:
name (str) – of body
z (float) – position of the centre on the
x (float) – position of the centre on the
radius (float) – position of the centre on the
- _withLengthSafety(safety, reg=None)
- centre(aabb=None)
- direction()
- flukaFreeString()
- hash()
- point()
- rotation()
- class pyg4ometry.fluka.body.YEC(name, z, x, zsemi, xsemi, transform=None, flukaregistry=None, comment='')
Bases:
BodyMixin
,_ShiftableCylinderMixin
Infinite Elliptical Cylinder parallel to the y-axis
- Parameters:
name (str) – of body
z (float) – position of the centre on the
x (float) – position of the centre on the
zsemi (float) – position of the centre on the
xsemi (float) – position of the centre on the
- _withLengthSafety(safety, reg=None)
- centre(aabb=None)
- flukaFreeString()
- geant4Solid(reg, aabb=None)
- hash()
- rotation()
- class pyg4ometry.fluka.body.YZP(name, x, transform=None, flukaregistry=None, comment='')
Bases:
_HalfSpaceMixin
Infinite half-space delimited by the x-y plane (perpendicular to the x-axis)
- Parameters:
name (str) – of body
x (float) – position of the x-y plane on the x-axis. All points less than x are considered to be part of this body.
- _withLengthSafety(safety, reg)
- flukaFreeString()
- hash()
- toPlane()
- class pyg4ometry.fluka.body.ZCC(name, x, y, radius, transform=None, flukaregistry=None, comment='')
Bases:
_InfiniteCylinderMixin
,_ShiftableCylinderMixin
Infinite Circular Cylinder parallel to the z-axis
- Parameters:
name (str) – of body
x (float) – position of the centre on the
y (float) – position of the centre on the
radius (float) – position of the centre on the
- _withLengthSafety(safety, reg=None)
- centre(aabb=None)
- direction()
- flukaFreeString()
- hash()
- point()
- rotation()
- class pyg4ometry.fluka.body.ZEC(name, x, y, xsemi, ysemi, transform=None, flukaregistry=None, comment='')
Bases:
BodyMixin
,_ShiftableCylinderMixin
Infinite Elliptical Cylinder parallel to the z-axis
- Parameters:
name (str) – of body
x (float) – position of the centre on the
y (float) – position of the centre on the
xsemi (float) – position of the centre on the
ysemi (float) – position of the centre on the
- _withLengthSafety(safety, reg=None)
- centre(aabb=None)
- flukaFreeString()
- geant4Solid(reg, aabb=None)
- hash()
- rotation()
Fluka module
- class pyg4ometry.fluka.card.Card(keyword, what1=None, what2=None, what3=None, what4=None, what5=None, what6=None, sdum=None)
Bases:
object
Card class for representing a FLUKA input card. To construct instances from a of FLUKA input, use the fromFree or fromFixed class method for FREE and FIXED format, respectively.
- classmethod fromFixed(line)
- classmethod fromFree(line)
- nonesToZero()
Return a class instance with same contents as this instance, but with all entries of None set to 0.0 instead.
- toFixedString()
- toFreeString(delim=', ')
- toList()
- pyg4ometry.fluka.card.freeFormatStringSplit(string)
Method to split a string in FLUKA FREE format into its components.
- pyg4ometry.fluka.card.main(filein)
- class pyg4ometry.fluka.directive.MatrixConvertibleMixin
Bases:
object
- hash()
- leftMultiplyRotation(matrix)
- leftMultiplyVector(vector)
- netExpansion()
- netTranslation()
- toRotationMatrix()
- toScaleMatrix()
- toTranslationMatrix()
- class pyg4ometry.fluka.directive.RecursiveRotoTranslation(name, rotoTranslations)
Bases:
MutableSequence
,MatrixConvertibleMixin
container for dealing with a recursively defined rototranslation. they must also refer to the same rototrans, i.e., have the same name. for a list of rototranslations supplied:
[a, b, c], the order of evaluation acting on a vector v is c*b*a*v. so teh first rototrans is applied first.. and so on.
- areAllTheSameTransformationIndices()
- flukaFreeString()
- insert(i, obj)
S.insert(index, value) – insert value before index
- to4DMatrix()
- property transformationIndex
- class pyg4ometry.fluka.directive.RotoTranslation(name, axis=None, polar=0.0, azimuth=0.0, translation=None, transformationIndex=None, flukaregistry=None)
Bases:
MatrixConvertibleMixin
translation in mm, angles in degrees
- flukaFreeString()
- classmethod fromCard(card)
- hasRotation()
- hasTranslation()
- isPureTranslation()
- to4DMatrix()
- toCard()
- class pyg4ometry.fluka.directive.Transform(*, expansion=None, translation=None, rotoTranslation=None, invertRotoTranslation=None)
Bases:
MatrixConvertibleMixin
expansion, translation, rotoTranslation can be either a single instance of RotoTranslation or a multiple instances of RotoTranslation and RecursiveRotoTranslation
- to4DMatrix()
- pyg4ometry.fluka.directive.rotoTranslationFromTBxyz(name, tbxyz, flukaregistry=None)
tbxyz = trait bryan angles in radians
- pyg4ometry.fluka.directive.rotoTranslationFromTra2(name, tra2, flukaregistry=None)
- class pyg4ometry.fluka.flair.Flair(flukaInputFileName='fluka.inp', extent=None)
Bases:
object
- addMaterialColour(materialName, color=(0, 0, 0, 0))
- write(fileName)
- class pyg4ometry.fluka.fluka_registry.BaseCacher(df)
Bases:
object
- COLUMNS = ['name', 'body']
- addBody(body)
- append(body)
- appendData(variables)
- getDegenerateBody(body)
- make(clas, *args, **kwargs)
- remove(key)
- setBody(body)
- class pyg4ometry.fluka.fluka_registry.Cacheable(df)
Bases:
BaseCacher
- getDegenerateBody(body)
- getMask(columns, values, predicates)
- class pyg4ometry.fluka.fluka_registry.FlukaBodyStore
Bases:
MutableMapping
- addBody(body)
- getDegenerateBody(body)
- make(clas, *args, **kwargs)
- class pyg4ometry.fluka.fluka_registry.FlukaBodyStoreExact
Bases:
object
- addBody(body)
- getDegenerateBody(body)
- keys()
- make(cls, *args, **kwargs)
- values()
- class pyg4ometry.fluka.fluka_registry.FlukaRegistry
Bases:
object
Object to store geometry for FLUKA input and output. All of the FLUKA classes can be used without storing them in the Registry. The registry is used to write the FLUKA output file.
- addBeam(energy)
- addBeamPos()
- addBody(body)
- addCard(card)
- addDefaults(default='EM-CASCA')
- addGlobal()
- addLattice(lattice)
- addLowMat()
- addMaterial(material)
- addMaterialAssignments(mat, *regions)
- addRandomiz(seedLun=1, seed=54217137)
- addRegion(region, addBodies=False)
- addRotoTranslation(rototrans)
- addStart(maxPrimHistories=1, timeTermSec=None, coreDump=None, eachHistoryOutput=None)
- addTitle(title='FLUKA simulation')
- addUserBnn()
- addUserDump(mgdraw=100, lun=70, mgdrawOpt=-1, what4=0, sdum=None)
- addUsrBdx(binning, scoringDir, scoringType, type, lunOutput, reg1, reg2, area, name, maxKE=None, minKE=None, nKEbin=None, maxSA=None, minSA=None, nSEbin=None)
- addUsricall()
- addUsrocall()
- assignma(material, *regions)
- getBody(name)
- getBodyToRegionsMap()
- getDegenerateBody(body)
- getMaterial(name)
- latticeAABBs()
- makeBody(clas, *args, **kwargs)
- printDefinitions()
- regionAABBs(write=None)
- class pyg4ometry.fluka.fluka_registry.HalfSpaceCacher(df)
Bases:
Cacheable
- COLUMNS = ['name', 'body', 'planeNormal', 'pointOnPlane']
- append(body)
- mask(body)
- class pyg4ometry.fluka.fluka_registry.InfiniteCylinderCacher(df)
Bases:
Cacheable
- COLUMNS = ['name', 'body', 'direction', 'pointOnLine', 'radius']
- append(body)
- mask(body)
- class pyg4ometry.fluka.fluka_registry.RotoTranslationStore
Bases:
MutableMapping
only get by names.
- addRotoTranslation(rtrans)
- allTransformationIndices()
- flukaFreeString()
The Lattice class is defined in this module for handling LATTICEs in FLUKA geometries.
- class pyg4ometry.fluka.lattice.Lattice(cellRegion, rotoTranslation, invertRotoTranslation=False, flukaregistry=None)
Bases:
object
- flukaFreeString(delim=', ')
- getTransform()
- class pyg4ometry.fluka.material.BuiltIn(name, *, atomicNumber=None, atomicMass=None, density=None, flukaregistry=None)
Bases:
object
- flukaFreeString(delim='')
- class pyg4ometry.fluka.material.Compound(name, density, fractions, fractionType, pressure=None, flukaregistry=None)
Bases:
_MatProp
A FLUKA compound material. This corresponds to the case in FLUKA of a single MATERIAL card with one or more associated COMPOUND cards.
- Parameters:
name (str) – The name of the compound.
density (float) – The density of the compound in g/cm3
fractions (list) – List of (Element, fraction) and (Compound, fraction) tuples corresponding to the fractional proportion of that material.
fractionType (str) – The type of the fractions listed in the fractions parameter, either atomic, mass, or volume.
flukaregistry (FlukaRegistry) – Optional FlukaRegistry instance the Compound is to be added to.
- flukaFreeString(delim=', ')
- classmethod fromCards(cards, flukareg)
- toCards()
- totalWeighting(densityWeighted=False)
- class pyg4ometry.fluka.material.Material(name, atomicNumber, density, massNumber=None, atomicMass=None, pressure=None, flukaregistry=None)
Bases:
_MatProp
A FLUKA material consisting of a single element. This corresponds to the case in FLUKA of a single MATERIAL card with no associated COMPOUND cards, as well as a possible MAT-PROP card (only if a pressure is provided, other options of MAT-PROP are unsupported).
- Parameters:
name (str) – The name of the material
atomicNumber (int) – the atomic number, Z, of the element.
density (float) – the density in g/cm3 of the material.
massNumber (int, None) – Optional mass number, will be inferred in FLUKA based on atomicNumber. Allows one to specify a specific isotope.
atomicMass (float) – The mass of the atom in g/mole. Will be inferred in FLUKA based on atomicNumber.
pressure (float) – Optional pressure if the material is a gas.
flukaregistry (FlukaRegistry) – Optional FlukaRegistry instance the material is to be added to.
- flukaFreeString(delim=', ')
- classmethod fromCard(card, flukaregistry)
- toCards()
- pyg4ometry.fluka.material.defineBuiltInFlukaMaterials(flukaregistry=None)
- pyg4ometry.fluka.material.predefinedMaterialNames()
- pyg4ometry.fluka.preprocessor.preprocess(filein)
- class pyg4ometry.fluka.reader.Reader(filename)
Bases:
object
Class to read a FLUKA file.
- getRegistry()
Get the fluka registry
- class pyg4ometry.fluka.reader.RegionVisitor(flukaregistry)
Bases:
RegionParserVisitor
A visitor class for accumulating the region definitions. The body instances are provided at instatiation, and then these are used when traversing the tree to build up a dictionary of region name and pyfluka.geometry.Region instances.
- visitComplexRegion(ctx)
- visitMultipleUnion(ctx)
- visitMultipleUnion2(ctx)
- visitSimpleRegion(ctx)
- visitSingleUnion(ctx)
- visitSubZone(ctx)
- visitUnaryAndBoolean(ctx)
- visitUnaryAndSubZone(ctx)
- visitUnaryExpression(ctx)
- visitZoneBody(ctx)
- visitZoneExpr(ctx)
- visitZoneSubZone(ctx)
- class pyg4ometry.fluka.reader.SensitiveErrorListener
Bases:
ErrorListener
ANTLR4 by default is very passive regarding parsing errors, it will just carry on parsing and potentially build a nonsense-tree. This is not ideal as pyfluka has a very convoluted syntax; we want to be very strict about what our parser can and can’t do. For that reason this is a very sensitive error listener, throwing exceptions readily.
- syntaxError(recognizer, offendingSymbol, line, column, msg, e)
- pyg4ometry.fluka.reader.main(filein)
- class pyg4ometry.fluka.region.Intersection(body)
Bases:
_Boolean
- class pyg4ometry.fluka.region.Region(name, comment='')
Bases:
ViewableMixin
Represents a region which consists of a region name, one or more zones, and a single material. Metadata may be provided with the comment kwarg, which is used when writing to FLUKA to provide contextual information to the physicist.
- Parameters:
name (str) – The name of this region.
material (str) – The name of a material.
comment – Optional descriptive comment.
- aabb(aabb=None)
- addZone(zone)
Add a Zone instance to this region.
- Parameters:
zone (Zone) – The Zone instance to be added.
- allBodiesToRegistry(registry)
Add all the bodies that constitute this Region to the provided FlukaRegistry instance.
- Parameters:
flukaregistry (FlukaRegistry) – FlukaRegistry instance to which constituent bodies will be added.
- bodies()
Return the set of unique bodies that constitute this Zone.
- centre(aabb=None)
- connectedZones(zoneAABBs=None, aabb=None)
- dumps()
- filterNullZones(aabb=None)
- flukaFreeString()
- geant4Solid(reg, aabb=None)
Get the geant4Solid instance corresponding to this Region.
- isDNF()
- isNull(aabb=None)
- leafCount()
- makeUnique(nameSuffix, flukaregistry)
Get this Region instance with every constituent body with a unique name by appending nameSuffix to each Body instance.
- Parameters:
nameSuffix – string to append to each Body instance.
flukaregistry – FlukaRegisty instance to add each newly-defined body to.
- mesh(aabb=None)
- removeBody(name)
Remove a body from this region by name.
- Parameters:
name (string) – The name of the body to be removed.
- removeZones(indices)
Remove zones by index
- rotation()
- simplify()
- tbxyz()
- toDNF(name)
- withLengthSafety(bigger_flukareg, smaller_flukareg)
- zoneAABBs(aabb=None)
- zoneGraph(zoneAABBs=None, aabb=None)
- class pyg4ometry.fluka.region.Subtraction(body)
Bases:
_Boolean
- class pyg4ometry.fluka.region.Union(body)
Bases:
_Boolean
- class pyg4ometry.fluka.region.Zone(name=None)
Bases:
ViewableMixin
Represents a zone which consists of one or more body intersections and zero or more body subtractions. May also be used to represent subzones, which are zones nested within zones, for example the form +A -B -(+C -D). Once instantiated, intersections and subtractions can be added to this instance with the addIntersection and addSubtraction method.
- Parameters:
name (string) – Optional name for the zone.
- addIntersection(body)
Add a body or subzone as an intersection to this Zone instance.
- Parameters:
body – Body or Zone instance.
- Type:
body: Body or Zone
- addSubtraction(body)
Add a body or subzone as a subtraction to this Zone instance.
- Parameters:
body (Body or Zone) – Body or Zone instance.
- allBodiesToRegistry(flukaregistry)
Add all the bodies that contitute this Zone to the provided FlukaRegistry instance.
- Parameters:
flukaregistry (FlukaRegistry) – FlukaRegistry instance to which constituent bodies will be added.
- bodies()
Return the set of unique bodies that constitute this Zone.
- centre(aabb=None)
- dumps()
Returns a string of this Zone instance in the equivalent FLUKA syntax.
- geant4Solid(reg, aabb=None)
Translate this zone to a geant4solid, adding the constituent primitive solids and any Booleans to the Geant4 registry. Returns the geant4 solid equivalent in geometry to this Zone.
- Parameters:
reg (AABB or dict) – The Registry (geant4) instance to which the resulting Geant4 definitions should be added.
aabb – Optional reference AABB or dictionary of body name to AABB instances with which the geant4 solid should be evaluated with respect to. This is the entry point to which solid minimisation can be performed.
- isDNF()
- isNull(aabb=None)
- leafCount()
- makeUnique(nameSuffix, flukaregistry)
Get this zone with every constituent body recreated with a unique name by appending nameSuffix.
- Parameters:
nameSuffix – The string to append to the names of the bodies.
flukaregistry – the FlukaRegisytr instance to add the uniquely defined bodies to.
- mesh(aabb=None)
- removeBody(name)
Remove a body from this zone by name.
- Parameters:
name (string) – The name of the body to be removed.
- rotation()
- tbxyz()
- toDNF(name)
- withLengthSafety(bigger_flukareg, smaller_flukareg, shrink_intersections)
- class pyg4ometry.fluka.vector.AABB(lower, upper)
Bases:
object
- coplanarIntersects(other)
- cornerDistance()
- envelops(other)
- classmethod fromMesh(csgmesh)
- intersect(other)
- intersects(other)
- isNull()
- union(other)
- class pyg4ometry.fluka.vector.Three(*coordinates)
Bases:
ndarray
- cross(other)
- dot(other)
- length()
vector length (l2 norm)
- parallel_to(other, tolerance=1e-10)
Check if instance is parallel to some other vector, v
- unit()
Get this as a unit vector.
- property x
- property y
- property z
- pyg4ometry.fluka.vector.areAABBsOverlapping(first, second)
Check if two AABB instances are overlapping.
- pyg4ometry.fluka.vector.areParallelOrAntiParallel(v1, v2)
- pyg4ometry.fluka.vector.pointOnLineClosestToPoint(point, point_on_line, direction)
Line is defined in terms of two vectors: a point on the line and the direction of the line.
point is the point with which the distance to the line is to be minimised.
- pyg4ometry.fluka.vector.pointOnPlaneClosestToPoint(planeNormal, planePoint, point)
Get point on plane which is closest to point not on the plane.
GLOBAL 20000. -1. 1. 0. 0. 0.
DEFAULTS 0.0 0.0 0.0 0.0 0.0 0.0 EM-CASCA
BEAM 17.5 0.0 10000.0 0.0 0.0 1.0 ELECTRON
GEOBEGIN 3. COMBNAME
0 0
USRBIN , 10., ELECTRON, -21., 250., 0.1, 2000., ElecTop
USRBIN , -250., -0.1, -2000., 400., 1., 400., &
USRBIN , 10., POSITRON, -22., 250., 0.1, 2000., PosTop
USRBIN , -250., -0.1, -2000., 400., 1., 400., &
USRBIN , 10., PHOTON, -23., 250., 0.1, 2000., PhotTop
USRBIN , -250., -0.1, -2000., 400., 1., 400., &
RANDOMIZ , 1.
START , 1000.
STOP
END
- class pyg4ometry.fluka.Writer.Writer
Bases:
object
Class to write FLUKA input files from a fluka registry object.
>>> f = Writer() >>> f.addDetectro(flukaRegObject) >>> f.write("model.inp")
- addDetector(flukaRegistry)
Set the fluka registry and therefore the model for this writer instance.
- write(fileName)
Write the output to a given filename. e.g. “model.inp”.
IO Module
- class pyg4ometry.io.ROOTTGeo.Reader(fileName, upgradeVacuumToG4Galactic=True, solidsToTessellate=None, suffixSeparator='__', warnAboutBadShapes=True, maximumDepth=1000000.0, dontLoadOverlapNodes=True)
Bases:
object
- getRegistry()
- load(upgradeVacuumToG4Galactic=True, warnAboutBadShapes=True, dontLoadOverlapNodes=True)
- loadMaterials(upgradeVacuumToG4Galactic)
- recurseVolumeTree(volume, thisDepth, maximumDepth, warnAboutBadShapes=True, dontLoadOverlapNodes=True)
- pyg4ometry.io.ROOTTGeo.rootMatrix2pyg4ometry(matrix, reader)
- pyg4ometry.io.ROOTTGeo.rootShape2pyg4ometry(shape, reader, warnAboutBadShapes=True)
Transformation
- pyg4ometry.transformation.are_anti_parallel(vector_1, vector_2, tolerance=1e-10)
Check if vector vector_1 is parallel to vector vector_2 down to some tolerance.
- Parameters:
vector_1 (array) – First input vector
vector_2 (array) – Second input vector
tolerance (float) – Tolerance for calculation
- Returns:
if vectors are antiparallel
- Return type:
bool
- pyg4ometry.transformation.are_parallel(vector_1, vector_2, tolerance=1e-10)
Check if vector vector_1 is parallel to vector vector_2 down to some tolerance.
- Parameters:
vector_1 (array) – First input vector
vector_2 (array) – Second input vector
tolerance (float) – Tolerance for calculation
- Returns:
if vectors are parallel
- Return type:
bool
- pyg4ometry.transformation.axisangle2matrix(axis, angle)
Convert axis angle to transformation matrix
- Parameters:
axis (list/array(3)) – axis for rotation
angle (float) – rotation angle
- Returns:
transformation matrix
- Return type:
array(3,3)
- pyg4ometry.transformation.axisangle2tbxyz(axis, angle)
Convert axis and angle to tait bryan angles
- Parameters:
axis (list/array(3)) – axis for rotation
angle (float) – rotation angle
- Returns:
tait bryan angles (x-y-z)
- Return type:
array(3)
- pyg4ometry.transformation.deg2rad(deg)
Convert deg in degrees into radians
- Parameters:
deg (float) – Input in degrees
- Returns:
deg in radians
- Return type:
float
- pyg4ometry.transformation.grad2rad(gradians)
Convert rad in gradians into radians
- Parameters:
gradians (float) – Input in gradians
- Returns:
gradians in radians
- Return type:
float
- pyg4ometry.transformation.matrix2axisangle(matrix)
Convert 3x3 transformation matrix to axis angle representation
- Parameters:
matrix (array(3,3)) – 3x3 rotation matrix array
- Returns:
[axis,angle]
- Return type:
list(list(3),float)
- pyg4ometry.transformation.matrix2tbxyz(matrix)
Convert rotation matrix to Tait-Bryan angles. Order of rotation is x -> y -> z.
- Parameters:
matrix – active (positive angle = anti-clockwise rotation about that axis when looking at the axis) matrix.
- Returns:
[x, y, z] Tait-Bryan angles in a list.
- Return type:
list(3)
- pyg4ometry.transformation.matrix_from(v_from, v_to)
Returns the rotation matrix that rotates v_from to parallel to v_to.
Useful for ensuring a given face points in a certain direction.
v_from and v_to should be array-like three-vectors.
- pyg4ometry.transformation.rad2deg(rad)
Convert rad in radians into degrees
- Parameters:
rad (float) – Input in radians
- Returns:
rad in degrees
- Return type:
float
- pyg4ometry.transformation.reverse(angles)
Invert the rotation represented by these angles.
- pyg4ometry.transformation.tbxyz2axisangle(rv)
Tait-Bryan x-y-z rotation to axis-angle representation Algorithm from http://www.sedris.org/wg8home/Documents/WG80485.pdf
For converting rotation angles to an active axis/angle pair for use in pycsg. Order of rotation: x->y->z.
- Parameters:
rv (float(3)) – rotation angles
- Returns:
[axis,angle]
- Return type:
list(list(3),float)
- pyg4ometry.transformation.tbxyz2matrix(angles)
Convert tait bryan angles to a single passive rotation matrix. rotation order = x -> y -> z.
- Parameters:
angles – list of angles: x, y, z
- Returns:
rotation matrix
- Return type:
array(3,3)
- pyg4ometry.transformation.tbzyx2matrix(angles)
Convert Tait-Bryan angles to a single passive rotation matrix. rotation order = x -> y -> z.
- Parameters:
angles – list of angles: x, y, z
- Returns:
rotation matrix
- Return type:
array(3,3)
- pyg4ometry.transformation.two_fold_orientation(v1, v2, e1, e2)
matrix_from will align one vector with another, but there are an infinite number of such matrices that align two vectors. This further contrains the rotation by introducing a second pair of vectors.
v1 start v v2 end v e1 start e e2 end v
Misc
- pyg4ometry.misc.NestedSolids.NestedBoxes(nameBase, bx, by, bz, registry, lunit='mm', dx=0, dy=0, dz=0, N=0)
Creates a list of geant4.Box starting the bx, by, bz in size and each element is dx, dy, dz smaller for each iteration
- Parameters:
nameBase (str) – name stub for solid
bx (float) – box max x size
by (float) – box max y size
bz (float) – box max z size
registry (Registry) – Registry object
lunit (str) – length unit (mm/m etc)
dx (float) – decrement in x for each iteration
dy (float) – decrement in y for each iteration
dz (float) – decrement in z for each iteration
N (int) – number of iterations
Convert
- pyg4ometry.convert.fluka2g4materials.makeFlukaToG4MaterialsMap(freg, greg)
Convert the materials defined in a FlukaRegistry, and populate the provided geant4 registry with said materials.
- exception pyg4ometry.convert.fluka2Geant4.NullModel
- pyg4ometry.convert.fluka2Geant4.fluka2Geant4(flukareg, regions=None, omitRegions=None, worldMaterial='G4_Galactic', worldDimensions=None, omitBlackholeRegions=True, quadricRegionAABBs=None, **kwargs)
Convert a FLUKA registry to a Geant4 Registry.
- Parameters:
flukareg (FlukaRegistry) – FlukaRegistry instance to be converted.
regions (list) – Names of regions to be converted, by default all are converted. Mutually exclusive with omitRegions.
omitRegions (list) – Names of regions to be omitted from the conversion. This option is mutually exclusive with the kwarg regions.
worldMaterial (string) – name of world material to be used.
worldDimensions (list) – dimensions of world logical volume in converted Geant4. By default this is equal to WORLD_DIMENSIONS.
omitBlackholeRegions (bool) – whether or not to omit regions with the FLUKA material BLCKHOLE from the conversion. By default, true.
quadricRegionAABBs (dict) – The axis-aligned aabbs of any regions featuring QUA bodies, mapping region names to fluka.AABB instances.
Developer options (to kwargs) withLengthSafety: Whether or not to apply automatic length safety.
minimiseSolids: Whether or not to minimise the boxes and tubes of Geant4 used to represent infinite solids in FLUKA.
- pyg4ometry.convert.freecad2Fluka.freecadDoc2Fluka(fcd)
- pyg4ometry.convert.freecad2Fluka.part2Region(obj, trfm, fgreg, meshDeviation=0.05)
- pyg4ometry.convert.geant42Fluka.geant4Logical2Fluka(logicalVolume, flukaRegistry=None)
Convert a single logical volume - not the main entry point for the conversion.
- pyg4ometry.convert.geant42Fluka.geant4Material2Fluka(material, freg, suggestedDensity=None, elementSuffix=False, materialNameShort=None)
- pyg4ometry.convert.geant42Fluka.geant4MaterialDict2Fluka(matr, freg)
- pyg4ometry.convert.geant42Fluka.geant4PhysicalVolume2Fluka(physicalVolume, mtra=matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]]), tra=array([0, 0, 0]), flukaRegistry=None, flukaNameCount=0)
- pyg4ometry.convert.geant42Fluka.geant4Reg2FlukaReg(greg, logicalVolumeName='')
Convert a Geant4 model to a FLUKA one. This is done by handing over a complete pyg4ometry.geant4.Registry instance.
- Parameters:
greg (pyg4ometry.geant4.Registry) – geant4 registry
returns: pyg4ometry.fluka.FlukaRegistry
- pyg4ometry.convert.geant42Fluka.geant4Solid2FlukaRegion(flukaNameCount, solid, mtra=matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]]), tra=array([0, 0, 0]), flukaRegistry=None, addRegistry=True, commentName='')
- pyg4ometry.convert.geant42Fluka.makeShortName(mn)
- pyg4ometry.convert.geant42Fluka.makeStripName(mn)
- pyg4ometry.convert.geant42Fluka.pycsgmesh2FlukaRegion(mesh, name, transform, flukaRegistry, commentName)
- pyg4ometry.convert.geant42Geant4.geant4Solid2Geant4Tessellated(solid)
- pyg4ometry.convert.stl2gdml.stl2gdml(stlFileName, gdmlFileName='output.gdml', worldMaterial='G4_Galactic', solidMaterial='G4_Au')
- pyg4ometry.convert.oce2Geant4.oce2Geant4(shapeTool, shapeName, materialMap={}, labelToSkipList=[], meshQualityMap={})
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]
- pyg4ometry.convert.oce2Geant4.oceShape_Geant4_Assembly(name, greg)
Make a assembly volume from input or get from registry
- Parameters:
name (str) – Name of logical volume
greg (geant4.Registry) – Geant4 registry
- pyg4ometry.convert.oce2Geant4.oceShape_Geant4_LogicalVolume(name, solid, material, greg)
Make a logical volume from input or get from registry
- Parameters:
name (str) – Name of logical volume
solid (SolidBase) – Geant4 solid
material (str or pyg4ometry.geant4.Material) – Material for logical volume
greg (geant4.Registry) – Geant4 registry
- 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
Compare
- class pyg4ometry.compare.ComparisonResult
Bases:
object
Holder for a test result. Roughly a dict[testname] = list(TestResultNamed)
Use + and += to append to this object. Uses a default dictionary so no need to initialise any key names. Should always append a list even if only 1 item.
>>> cr = ComparisonResult() >>> cr['nDaughtersTest'] += [TestResultNamed('volume_1', TestResult.Failed, 'different number')] >>> cr.print()
print() can take a list of test result outcomes to print. e.g. TestResult.All()
- print(testName=None, testResultsToPrint=[<TestResult.Failed: 0>, <TestResult.NotTested: 2>], allTests=False)
- Parameters:
testName (str) – (optional) name of specific single test to print - see testNames()
testResultsToPrint (list(TestResult)) – (optional) list of result outcomes to print
allTests (bool) – (optional) print all tests irrespective of the result
Print failed tests and ones relevant but not implemented yet by default. Control level of print out with optional argument of list of test outcomes to print, or allTests=True.
>>> cr.print() >>> cr.print('solidName') >>> cr.print(testResultsToPrint=TestResult.All()) >>> cr.print(allTests=True)
- testNames()
- class pyg4ometry.compare.Tests(*testsByNameToTurnOn)
Bases:
object
Set of options of which tests to perform and potentially with what tolerance.
- Parameters:
testsByNameToTurnOn (str, list of) – optional strings of tests to turn on. If any, all will be turned off first.
>>> t = Tests() >>> t = Tests("nDaughters") # only nDaughters will be tested >>> t = Tests("nDaughters", "shapeArea") # only nDaughters and shapeArea will be tested
- classmethod printAllTestNames()
Print all tests names - the exact strings that can be used to turn them off or on.
- setAllFalse()
Utility to turn off all tests at once. Then can just turn on the one we want.
- setFalse(testName)
Safely set a test by name to False.
- class pyg4ometry.compare.TestResult(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
A test result can be either pass, fail or not conducted.
Use 0,1 so we can also implicitly construct this with a Boolean.
Use the bitwise or operator | and not the keyword or. This bitwise or operator returns Failed if either have failed. Only returns NotTested if both are not tested. Cannot use bitwise |= as we cannot update an Enum internally.
Use TestResult.All() for a list of all possible results - useful as an argument for printing.
- static All()
Utility function to get a list of all test types in one.
- Failed = 0
- NotTested = 2
- Passed = 1
- class pyg4ometry.compare.TestResultNamed(nameIn, testResultIn=TestResult.Failed, detailsIn='')
Bases:
object
- class pyg4ometry.compare._Compare.ComparisonResult
Holder for a test result. Roughly a dict[testname] = list(TestResultNamed)
Use + and += to append to this object. Uses a default dictionary so no need to initialise any key names. Should always append a list even if only 1 item.
>>> cr = ComparisonResult() >>> cr['nDaughtersTest'] += [TestResultNamed('volume_1', TestResult.Failed, 'different number')] >>> cr.print()
print() can take a list of test result outcomes to print. e.g. TestResult.All()
- print(testName=None, testResultsToPrint=[<TestResult.Failed: 0>, <TestResult.NotTested: 2>], allTests=False)
- Parameters:
testName (str) – (optional) name of specific single test to print - see testNames()
testResultsToPrint (list(TestResult)) – (optional) list of result outcomes to print
allTests (bool) – (optional) print all tests irrespective of the result
Print failed tests and ones relevant but not implemented yet by default. Control level of print out with optional argument of list of test outcomes to print, or allTests=True.
>>> cr.print() >>> cr.print('solidName') >>> cr.print(testResultsToPrint=TestResult.All()) >>> cr.print(allTests=True)
- testNames()
- class pyg4ometry.compare._Compare.TestResult(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
A test result can be either pass, fail or not conducted.
Use 0,1 so we can also implicitly construct this with a Boolean.
Use the bitwise or operator | and not the keyword or. This bitwise or operator returns Failed if either have failed. Only returns NotTested if both are not tested. Cannot use bitwise |= as we cannot update an Enum internally.
Use TestResult.All() for a list of all possible results - useful as an argument for printing.
- static All()
Utility function to get a list of all test types in one.
- Failed = 0
- NotTested = 2
- Passed = 1
- class pyg4ometry.compare._Compare.TestResultNamed(nameIn, testResultIn=TestResult.Failed, detailsIn='')
- class pyg4ometry.compare._Compare.Tests(*testsByNameToTurnOn)
Set of options of which tests to perform and potentially with what tolerance.
- Parameters:
testsByNameToTurnOn (str, list of) – optional strings of tests to turn on. If any, all will be turned off first.
>>> t = Tests() >>> t = Tests("nDaughters") # only nDaughters will be tested >>> t = Tests("nDaughters", "shapeArea") # only nDaughters and shapeArea will be tested
- classmethod printAllTestNames()
Print all tests names - the exact strings that can be used to turn them off or on.
- setAllFalse()
Utility to turn off all tests at once. Then can just turn on the one we want.
- setFalse(testName)
Safely set a test by name to False.
- pyg4ometry.compare._Compare.assemblyVolumes(referenceAV, otherAV, tests, recursive=False, includeAllTestResults=False, testsAlreadyDone=[])
- pyg4ometry.compare._Compare.divisionVolumes(referenceRV, otherRV, tests, includeAllTestResults=False, testsAlreadyDone=[])
Compare two DivisionVolume instances with a set of tests.
- pyg4ometry.compare._Compare.gdmlFiles(referenceFile, otherFile, tests=names: True namesIgnorePointer: True nDaughters: True solidExact: True shapeExtent: True shapeVolume: True shapeArea: True placement: True scale: True copyNumber: True materials: True materialClassType: True materialCompositionType: True testDaughtersByName: True, includeAllTestResults=False)
- Parameters:
referenceFile (str.) – GDML file to use as a reference.
otherFile (str.) – GDML file to compare.
tests (pyg4ometry.compare._Compare.Tests.) – Tests instance to use.
includeAllTestResults (bool.) – document all tests attempted in result.
- pyg4ometry.compare._Compare.geometry(referenceLV, otherLV, tests=names: True namesIgnorePointer: True nDaughters: True solidExact: True shapeExtent: True shapeVolume: True shapeArea: True placement: True scale: True copyNumber: True materials: True materialClassType: True materialCompositionType: True testDaughtersByName: True, includeAllTestResults=False)
- Parameters:
referenceLV (LogicalVolume) – LogicalVolume instance to compare against.
otherLV (LogicalVolume) – LogicalVolume instance to compare with referenceLV.
tests (pyg4ometry.compare._Compare.Tests.) – Tests instance to use.
includeAllTestResults (bool.) – document all tests attempted in result.
- pyg4ometry.compare._Compare.logicalVolumes(referenceLV, otherLV, tests, recursive=False, includeAllTestResults=False, testsAlreadyDone=[])
Compare two LogicalVolume instances with a set of tests.
testsAlreadyDone should be purposively given as an empty list if using more than once. This is an artefact of the only way we can nicely pass by reference a set of tests while we use these functions recursively. However, this is defined on import and must be updated if reused.
- pyg4ometry.compare._Compare.materials(referenceMaterial, otherMaterial, tests, lvName='', includeAllTestResults=False, testsAlreadyDone=[])
Compare two materials with a set of tests.
This tests assumes both referenceMaterial and otherMaterial are derived from the type pyg4ometry.geant4._Material.Material.
Compares, name, classname, density, n components
- pyg4ometry.compare._Compare.parameterisedVolumes(referenceRV, otherRV, tests, includeAllTestResults=False, testsAlreadyDone=[])
Compare two ParameterisedVolume instances with a set of tests.
- pyg4ometry.compare._Compare.physicalVolumes(referencePV, otherPV, tests, recursive=False, lvName='', includeAllTestResults=False, testsAlreadyDone=[])
lvName is an optional parent object name to help in print out details decode where the placement is.
- pyg4ometry.compare._Compare.replicaVolumes(referenceRV, otherRV, tests, recursive=True, includeAllTestResults=False, testsAlreadyDone=[])
- pyg4ometry.compare._Compare.solids(referenceSolid, otherSolid, tests, lvName='', includeAllTestResults=False)
Compare any two solids with a set of tests.
Features
- class pyg4ometry.features.algos.CoordinateSystem(origin=[0, 0, 0], e1=[1, 0, 0], e2=[0, 1, 0])
- coordinateSystem(rotX=0.0, rotY=0.0, rotZ=0.0)
- makeFromPlanes(p1, p2, p3)
- plane(rotX=0.0, rotY=0.0, rotZ=0.0)
- transform(points)
- class pyg4ometry.features.algos.FeatureData
- plotCutter(iCutter)
- plotFeature(iFeature)
- readFile(fileName)
- class pyg4ometry.features.algos.Line(point, dir)
Line class taking a point and dir(ection)
- Parameters:
dir (list or array - 3 values) – direction
- eval(par)
- flatten()
- class pyg4ometry.features.algos.Plane(point, normal, e2=None, e3=None)
Plane class taking a point on plane and normal
- Parameters:
point (list, array) – point on plane
normal (list, array) – vector of normal
- angleBetween(plane)
Compute angle between two planes (self and plane)
- Parameters:
plane (Plane) – Plane to intersect with self
- Returns:
angle between two planes
- Return type:
float
- flatten()
- intersect(object)
Intersection between Line or Plane
- intersectLine(line)
Intersection between plane (self) and line
- intersectPlane(plane)
Compute intersection between two planes self and plane
- pyg4ometry.features.algos.extract(inputFileName, angle=89, planeQuality=0.1, circumference=300, outputFileName=None, planes=[], bViewer=False, bViewerInteractive=False)
- pyg4ometry.features.algos.pyg4ArrayToVtkPolydataLine(pyg4Array)
Convert data array to vtkPolydata
- pyg4ometry.features.algos.pyg4PlaneToVtkPlane(pyg4Plane)
Convert Plane to vtkPlane
- pyg4ometry.features.algos.test(fileName, featureIndexList=[], planeQuality=0.1, circumference=300, bPlotRadii=False)
- pyg4ometry.features.algos.vtkCutterPlane(plane, polydata)
Calculate path information for 2D vtkPolydata lines
- Parameters:
polydata (vtkPlydata or list of vtkPolydata) – Geometry to extract information
- Returns:
Information on each boundary
- Return type:
list of information dict
- pyg4ometry.features.algos.vtkLoadStl(fname)
Load the given STL file, and return a vtkPolyData object for it.
- pyg4ometry.features.algos.vtkPolydataEdgeInformation(polydata, bPlot=False)
Calculate path information for 2D vtkPolydata lines
- Parameters:
polydata (vtkPlydata or list of vtkPolydata) – Geometry to extract information
- Returns:
Information on each boundary
- Return type:
list of information dict
- pyg4ometry.features.algos.vtkPolydataToActor(polydata)
Wrap the provided vtkPolyData object in a mapper and an actor, returning the actor.
- pyg4ometry.features.algos.vtkPolydataToConnectedEdges(polydata, angle=89)
- class pyg4ometry.features.algos.vtkViewer
Simple visualiser for feature extraction only
- addAxis(origin, length=[1, 1, 1], rotation=[[1, 0, 0], [0, 1, 0], [0, 0, 1]], label=False, disableCone=False)
- addLine(line)
- addPlane(point, p1, p2, length=1)
- addPolydata(key, polydata, colour=[0, 0, 0, 1], lineWidth=5, label=None, labelPos=[0, 0, 0])
- view(interactive=True)