2.1.10. geom_addPrimitive
Purpose
Positions a geometric object within the (three-dimensional) canvas of a spectral geometry description. Depending on the sign of the dimension parameters, these objects can be boxes, cylinders, or ellipsoids.
Usage
> geom_addPrimitive options Geom file(s)
Options
-
-c
/ --center
- a,b,c origin of primitive (0.0, 0.0, 0.0)
-
-d
/ --dimension
- a,b,c extension of hexahedral box; negative values are diameters
-
-e
/ --exponent
- i,j,k exponents for axes - 0 gives octahedron (|x|^(2^0) + |y|^(2^0) + |z|^(2^0) < 1), 1 gives a sphere (|x|^(2^1) + |y|^(2^1) + |z|^(2^1) < 1), large values produce boxes, negative turns concave.
-
-f
/ --fill
[ 0 ] - grain index to fill primitive. "0" selects maximum microstructure index + 1
-
-q
/ --quaternion
- rotation of primitive as quaternion
-
-a
/ --angleaxis
- angle,x,y,z clockwise rotation of primitive about axis by angle
-
--degrees
[ False ] - angle is given in degrees
-
--nonperiodic
[ True ] - wrap around edges
-
--realspace
[ origin,origin+size] instead of [0,grid ] - -c and -d span coordinates
Examples
hexahedral box
> geom_addPrimitive --center 16 16 16 --dimension 8 12 16 --fill 0 < blank32x32x32.geom > hexahedral_inclusion.geom
|
| |
| Figure 1: Hexahedral inclusion of 8 by 12 by 16 voxels. | |
This example demonstrates the filling of a hexahedral volume.
-
--center 16 16 16
places the center of the affected volume in the center of the 32x32x32 geometry.
-
--dimension 8 12 16
spans a hexahedral volume of 8 by 12 by 16 voxels.
-
--fill 0
assigns to the affected volume an index one larger than the maximum index found in the original geom file. Here, the maximum microstructure index was 1, hence the new (red) volume is filled with index 2 = 1+1.
cylinder
> geom_addPrimitive --center 16 16 16 --dimension -8 -12 16 --fill 0 < blank32x32x32.geom > cylinder_inclusion.geom
|
| |
| Figure 2: Cylindrical inclusion of 8 by 12 by 16 voxels. | |
This example demonstrates the use of negative dimensions to indicate diameters resulting in ellipsoidal (here cylindrical) volumes.
-
--dimension -8 -12 16
produces an elliptical cross-section with diameters of 8 by 12 and an extruded length of 16 along the z direction.
ellipsoid
> geom_addPrimitive --center 16 16 16 --dimension -8 -12 -16 --fill 2 < blank32x32x32.geom > ellipsoid_inclusion.geom
|
| |
| Figure 3: Ellipsoidal inclusion of 8 by 12 by 16 voxels. | |
This example sets all three dimensions to negative values.
-
--dimension -8 -12 -16
produces an ellipsoidal volume with diameters of 8 by 12 by 16.
-
--fill 2
set the microstructure index of the ellipsoidal volume to a value of 2.
complex assembly
> geom_addPrimitive --center 16 16 16 --dimension 8 12 16 --fill 2 < blank32x32x32.geom | geom_addPrimitive --origin 16 16 8 --dimension 32 32 1 --fill 2 | geom_addPrimitive --origin 16 16 24 --dimension 8 -8 -8 --fill 1 > complex_assembly.geom
|
| |
| Figure 4: A more complex assembly out of three primitives (hexahedral boxes and a cylinder). | |
This example combines multiple primitives to produce a more complex shape.