resqpy.multi_processing.find_faces_to_represent_surface_regular_wrapper
- resqpy.multi_processing.find_faces_to_represent_surface_regular_wrapper(index: int, parent_tmp_dir: str | Path, use_index_as_realisation: bool, grid_epc: str, grid_uuid: UUID | str, surface_epc: str, surface_uuid: UUID | str, name: str, title: str | None = None, agitate: bool = False, random_agitation: bool = False, feature_type: str = 'fault', trimmed: bool = False, is_curtain=False, extend_fault_representation: bool = False, flange_inner_ring: bool = False, saucer_parameter: float | None = None, retriangulate: bool = False, related_uuid: UUID | str | None = None, progress_fn: Callable | None = None, extra_metadata=None, return_properties: List[str] | None = None, raw_bisector: bool = False, use_pack: bool = False, flange_radius: float | None = None, reorient: bool = True, n_threads: int = 20, patchwork: bool = False, grid_patching_property_uuid: UUID | str | None = None, surface_patching_property_uuid: UUID | str | None = None, direction='IJK') Tuple[int, bool, str, List[UUID | str]]
Multiprocessing wrapper function of find_faces_to_represent_surface_regular_optimised.
- Parameters:
index (
int) – the index of the function call from the multiprocessing functionparent_tmp_dir (
strorPath) – the parent temporary directory path from the multiprocessing functionuse_index_as_realisation (
bool) – if True, uses the index number as the realization number on the property collectiongrid_epc (
str) – epc file path where the grid is savedgrid_uuid (
uuidorstr) – UUID (universally unique identifier) of the grid objectsurface_epc (
str) – epc file path where the surface (or point set) is savedsurface_uuid (
uuidorstr) – UUID (universally unique identifier) of the surface (or point set) object.name (
str) – the feature name to use in the grid connection set.title (
str) – the citation title to use for the grid connection set; defaults to nameagitate (
bool) – if True, the points of the surface are perturbed by a small offset, which can help if the surface has been built from a regular mesh with a periodic resonance with the gridrandom_agitation (
bool, defaultFalse) – if True, the agitation is by a small random distance; if False, a constant positive shift of 5.0e-6 is applied to x, y & z values; ignored if agitate is Falsefeature_type (
str, default'fault') – one of ‘fault’, ‘horizon’, or ‘geobody boundary’trimmed (
bool, defaultTrue) – if True the surface has already been trimmedis_curtain (
bool, defaultFalse) – if True, only the top layer is intersected with the surface and bisector is generated as a column property if requestedextend_fault_representation (
bool, defaultFalse) – if True, the representation is extended with a flangeflange_inner_ring (
bool, defaultFalse) – if True, an inner ring of points, with double flange point counr, is created at a radius just outside that of the furthest flung original point; this improves triangulation of the extended point set when the original has a non-convex hullsaucer_parameter (
float, optional) – if present, and extend_with_flange is True, then a parameter controlling the shift of flange points in a perpendicular direction away from the fault plane; see notes for how this parameter is interpretedretriangulate (
bool, defaultFalse) – if True, a retriangulation is performed even if not needed otherwiserelated_uuid (
uuid, optional) – if present, the uuid of an object to be softly related to the gcs (and to grid bisector and/or shadow property if requested)progress_fn (
Callable) – a callback function to be called at intervals by this function; the argument will progress from 0.0 to 1.0 in unspecified and uneven incrementsextra_metadata (
dict, optional) – extra metadata items to be added to the grid connection setreturn_properties (
listofstr) – if present, a list of property arrays to calculate and return as a dictionary; recognised values in the list are ‘triangle’, ‘depth’, ‘offset’, ‘normal vector’, ‘flange bool’, ‘grid bisector’ and ‘grid shadow’; triangle is an index into the surface triangles of the triangle detected for the gcs face; depth is the z value of the intersection point of the inter-cell centre vector with a triangle in the surface; offset is a measure of the distance between the centre of the cell face and the intersection point; normal vector is a unit vector normal to the surface triangle; each array has an entry for each face in the gcs; grid bisector is a grid cell boolean property holding True for the set of cells on one side of the surface, deemed to be shallower; grid shadow is a grid cell int8 property holding 1 for cells neither above nor below a K face, 1 for above, 2 for beneath, 3 for between; the returned dictionary has the passed strings as keys and numpy arrays as valuesraw_bisector (
bool, defaultFalse) – if True and grid bisector is requested then it is left in a raw form without assessing which side is shallower (True values indicate same side as origin cell)use_pack (
bool, defaultFalse) – if True, boolean properties will be generated and stored in numpy packed format, which will only be readable by resqpy based applicationsflange_radius (
float, optional) – the radial distance to use for outer flange extension points; if None, a large value will be calculated from the grid size; units are xy units of grid crsreorient (
bool, defaultTrue) – if True, the points are reoriented to minimise the z range prior to retriangulation (ie. z axis is approximate normal to plane of points), to enhace the triangulationn_threads (
int, default20) – the number of parallel threads to use in numba points in triangles functionpatchwork (
bool, defaultFalse) – if True and grid bisector is included in return properties, a compostite bisector is generated, based on individual ones for each patch of the surface; the following two arguments must be set if patchwork is Truegrid_patching_property_uuid (
uuid, optional) – required if patchwork is True, the uuid of a discrete or categorical cells property on the grid which will be used to determine which patch of the surface is relevant to a cellsurface_patching_property_uuid (
uuid, optional) – required if patchwork is True, the uuid of a discrete or categorical property on the patches of the surface, identifying the value of the grid patching property that each patch relates todirection (
str, default'IJK') – indicates which face directions to include; one of ‘I’, ‘J’, ‘K’, ‘IJ’, IK’, ‘JK’, ‘IJK”
- Returns:
Tuple containing – - index (int): the index passed to the function - success (bool): whether the function call was successful, whatever that definiton is - epc_file (str): the epc file path where the objects are stored - uuid_list (List[str]): list of UUIDs of relevant objects
Notes
use this function as argument to the multiprocessing function; it will create a new model that is saved in a temporary epc file and returns the required values, which are used in the multiprocessing function to recombine all the objects into a single epc file
the saucer_parameter is between -90.0 and 90.0 and is interpreted as an angle to apply out of the plane of the original points, to give a simple saucer shape; +ve angles result in the shift being in the direction of the -ve z hemisphere; -ve angles result in the shift being in the +ve z hemisphere; in either case the direction of the shift is perpendicular to the average plane of the original points
patchwork is not compatible with re-triangulation
if grid bisector is included in return properties, direction will usually need to be ‘IJK’