GXMESH class¶
-
class
GXMESH
(handle=0)[source]¶ GXMESH class.
High Performance Surface API.
-
add_face
(mesh_name, patch_id, v0, v1, v2)[source]¶ Adds a face to a patch in a mesh
- Parameters
mesh_name (str) – Mesh Name
patch_id (int) – Patch ID
v0 (int) – Vertex index 0 for the face
v1 (int) – Vertex index 1 for the face
v2 (int) – Vertex index 2 for the face
- Returns
Returns the face index of the added face
- Return type
int
New in version 9.5.
License: Geosoft Open License
-
add_vertex
(mesh_name, patch_id, x, y, z)[source]¶ Adds a vertex to a patch in a mesh
- Parameters
mesh_name (str) – Mesh Name
patch_id (int) – Patch ID
x (float) – x coordinate of the vertex
y (float) – y coordinate of the vertex
z (float) – z coordinate of the vertex
- Returns
Returns the vertex index of the added vertex
- Return type
int
New in version 9.5.
License: Geosoft Open License
-
classmethod
create
(name)[source]¶ Creates a new Mesh
- Parameters
name (str) – Mesh Name
- Returns
GXMESH
handle, terminates if creation fails- Return type
New in version 9.5.
License: Geosoft Open License
-
delete_patch
(mesh_name, patch_id)[source]¶ Deletes a patch specified by Patch ID from a mesh
- Parameters
mesh_name (str) – Mesh Name
patch_id (int) – Patch ID
New in version 9.5.
License: Geosoft Open License
-
get_attribute_values
(mesh_name, attribute_name, data_type, attribute_type, patch_id, vv)[source]¶ Inserts an attribute set to a mesh
- Parameters
mesh_name (str) – Mesh Name
attribute_name (str) – Attribute Name
data_type (int) – ATTRIBUTE_DATA_TYPE constants
attribute_type (int) – ATTRIBUTE_TYPE constants
patch_id (int) – Patch ID
New in version 9.5.
License: Geosoft Open License
-
get_faces
(mesh_name, patch_id, face_v_1, face_v_2, face_v_3)[source]¶ Returns all the faces comprising of vertex indices in a patch
- Parameters
New in version 9.5.
License: Geosoft Open License
-
get_vertex_point
(mesh_name, patch_id, vertex_index, x_coordinate, y_coordinate, z_coordinate)[source]¶ Number of faces in a patch in mesh
- Parameters
- Returns
Returns the number of faces in a patch
- Return type
int
New in version 9.5.
License: Geosoft Open License
-
get_vertices
(mesh_name, patch_id, vert_v_vx, vert_v_vy, vert_v_vz)[source]¶ Returns all the vertices in a patch
- Parameters
New in version 9.5.
License: Geosoft Open License
-
classmethod
import_grid_to_mesh
(grid_file_name, geosurface_filename, surface_name)[source]¶ Imports a Grid to a Surface. Creates a new Geosurface file for the surface
- Parameters
grid_file_name (str) – Grid File Name
geosurface_filename (str) – Surface File Name
surface_name (str) – Surface Item Name within the file
- Returns
GXMESH
handle, terminates if creation fails- Return type
New in version 9.5.
License: Geosoft Open License
-
insert_attributes
(mesh_name, attribute_name, data_type, attribute_type)[source]¶ Inserts an attribute set to a mesh
- Parameters
mesh_name (str) – Mesh Name
attribute_name (str) – Attribute Name
data_type (int) – ATTRIBUTE_DATA_TYPE constants
attribute_type (int) – ATTRIBUTE_TYPE constants
New in version 9.5.
License: Geosoft Open License
-
insert_patch
(mesh_name)[source]¶ Inserts a new surface patch to the mesh specified by a unique ID
- Parameters
mesh_name (str) – Mesh Name
- Returns
Patch ID of the inserted patch
- Return type
int
New in version 9.5.
License: Geosoft Open License
-
is_null
()[source]¶ Check if this is a null (undefined) instance
- Returns
True if this is a null (undefined) instance, False otherwise.
- Return type
bool
-
num_faces
(mesh_name, patch_id)[source]¶ Number of faces in a patch in mesh
- Parameters
mesh_name (str) – Mesh Name
patch_id (int) – Patch ID
- Returns
Returns the number of faces in a patch
- Return type
int
New in version 9.5.
License: Geosoft Open License
-
num_patches
(mesh_name)[source]¶ Returns the number of patches added to the mesh
- Parameters
mesh_name (str) – Mesh Name
- Returns
The number of patches added to the mesh
- Return type
int
New in version 9.5.
License: Geosoft Open License
-
num_vertices
(mesh_name, patch_id)[source]¶ Number of vertices in a patch in mesh
- Parameters
mesh_name (str) – Mesh Name
patch_id (int) – Patch ID
- Returns
Returns the number of vertices in a patch
- Return type
int
New in version 9.5.
License: Geosoft Open License
-
classmethod
open
(fileName, lstMeshNames)[source]¶ Opens an existing Mesh
- Parameters
- Returns
GXMESH
handle, terminates if creation fails- Return type
New in version 9.5.
License: Geosoft Open License
-
patch_exists
(mesh_name, patch_id)[source]¶ Checks if a patch specified by a patch ID exists in a mesh
- Parameters
mesh_name (str) – Mesh Name
patch_id (int) – Patch ID
- Returns
TRUE if patch exists
- Return type
bool
New in version 9.5.
License: Geosoft Open License
-
save
()[source]¶ Saves Mesh to the Project Cache and Geosurface file
New in version 9.5.
License: Geosoft Open License
-
set_attribute_values
(mesh_name, attribute_name, data_type, attribute_type, patch_id, vv)[source]¶ Inserts an attribute set to a mesh
- Parameters
mesh_name (str) – Mesh Name
attribute_name (str) – Attribute Name
data_type (int) – ATTRIBUTE_DATA_TYPE constants
attribute_type (int) – ATTRIBUTE_TYPE constants
patch_id (int) – Patch ID
New in version 9.5.
License: Geosoft Open License
-
ATTRIBUTE_DATA_TYPE constants¶
Data Type of Attribute
ATTRIBUTE_TYPE constants¶
Data Type of Attribute