Box region¶
-
class
arepy.coord.
regionBox
(*args, srad=None)¶ Box region
- Parameters
center ([float]*3) – Center of the box
size (float or [float]*3) – Size or sizes of the box
limits ([float]*6) – Box limits
- Variables
center ([float]*3) – Center of a box
size (float) – Size of a box
limits ([float]*6) – Box limits
One can either set a center and size of the box, or only box limits. The other from the two settings will be automatically calculated:
>>> import arepy as apy >>> region = apy.coord.regionBox([0.5,0.5,0.5], 0.3) >>> region.show() Box class Center: [0.5,0.5,0.5] Size: [0.3,0.3,0.3] Limits: [0.2,0.8,0.2,0.8,0.2,0.8] >>> region = apy.coord.regionBox([0.2,0.8,0.2,0.8,0.2,0.8]) >>> region.show() Box class: center [0.5,0.5,0.5] size [0.3,0.3,0.3] limits [0.2,0.8,0.2,0.8,0.2,0.8]
-
getOuterSphere
()¶ Get outer sphere
- Returns
Region of the outer sphere
- Return type
-
getInnerSphere
()¶ Get inner sphere
- Returns
Region of the inner sphere
- Return type
-
show
()¶ Print out region settings
-
setRegion
(**args)¶ Set region settings
-
getSelection
()¶ Get a selection region
-
getCopy
()¶ Get copy of self
-
selectCoordinates
(coord)¶ Select coordinates within the region
-
setTranslation
(origin)¶ Applate translation on the region
-
setFlip
(flip)¶ Flip the region