GXSURFACEITEM class

class GXSURFACEITEM(handle=0)[source]

GXSURFACEITEM class.

The GXSURFACEITEM allows you to create, read and alter Geosurface files (*.geosoft_surface). A Geosurface file can contain one or more surface items (see GXSURFACE class). A surface item can contains one or more triangular polyhedral meshes.

__init__(handle=0)[source]

Initialize self. See help(type(self)) for accurate signature.

add_mesh(vert_v_vx, vert_v_vy, vert_v_vz, tri_vv_pt1, tri_vv_pt2, tri_vv_pt3)[source]

Adds a triangular polyhedral mesh component to the surface item.

Parameters
  • vert_v_vx (GXVV) – Vertices X location

  • vert_v_vy (GXVV) – Vertices Y location

  • vert_v_vz (GXVV) – Vertices Z location

  • tri_vv_pt1 (GXVV) – Triangles 1st Vertex

  • tri_vv_pt2 (GXVV) – Triangles 2nd Vertex

  • tri_vv_pt3 (GXVV) – Triangles 3rd Vertex

Returns

The index of the component added.

Return type

int

New in version 8.4.

License: Geosoft Open License

compute_extended_info(components, vertices, edges, triangles, inconsistent, invalid, intersectiona)[source]

Compute more information (including validation) about of all mesh components in the surface item.

Parameters
  • components (int_ref) – Number of inner components (recomputed)

  • vertices (int_ref) – Total number of valid vertices

  • edges (int_ref) – Total number of valid edges

  • triangles (int_ref) – Total number of valid triangles

  • inconsistent (int_ref) – Number of inconsistent triangles

  • invalid (int_ref) – Number of invalid triangles

  • intersectiona (int_ref) – Number of self intersections

New in version 8.5.

License: Geosoft Open License

compute_poly_line_intersections(vv_x, vv_y, vv_z, vv_x_out, vv_y_out, vv_z_out)[source]

Compute intersections of a 3D PolyLine with a GXSURFACEITEM Object

Parameters
  • vv_x (GXVV) – X coordinates.

  • vv_y (GXVV) – Y coordinates.

  • vv_z (GXVV) – Z coordinates.

  • vv_x_out (GXVV) – X coordinates.

  • vv_y_out (GXVV) – Y coordinates.

  • vv_z_out (GXVV) – Z coordinates.

New in version 9.7.1.

License: Geosoft End-User License

classmethod create(type, name)[source]

Create a GXSURFACEITEM

Parameters
  • type (str) – Type

  • name (str) – Name

Returns

GXSURFACEITEM Object

Return type

GXSURFACEITEM

New in version 8.4.

License: Geosoft Open License

get_default_render_properties(color, transparency, render_mode)[source]

Gets default render properties of the surface item.

Parameters

New in version 8.4.

License: Geosoft Open License

See also

GXMVIEW.color

get_extents(min_x, min_y, min_z, max_x, max_y, max_z)[source]

Get the spatial range of the the surface item.

Parameters
  • min_x (float_ref) – Minimum valid data in X.

  • min_y (float_ref) – Minimum valid data in Y.

  • min_z (float_ref) – Minimum valid data in Z.

  • max_x (float_ref) – Maximum valid data in X.

  • max_y (float_ref) – Maximum valid data in Y.

  • max_z (float_ref) – Maximum valid data in Z.

New in version 8.5.

License: Geosoft Open License

get_geometry_info(vertices, triangles)[source]

Get the total number of vertices and triangles of all mesh components in item.

Parameters
  • vertices (int_ref) – Total number of vertices

  • triangles (int_ref) – Total number of triangles

New in version 8.5.

License: Geosoft Open License

get_guid(guid)[source]

Gets the GUID of the surface item.

Parameters

guid (str_ref) – GUID

New in version 8.4.

License: Geosoft Open License

Note: The value returned by this call will not be valid for newly created items until after a call to GXSURFACE.add_surface_item.

get_info(closed, area, volume, volume_confidence_interval)[source]

Gets information about the surface item.

Parameters
  • closed (bool_ref) – indicating if all meshes in item is closed

  • area (float_ref) – Area

  • volume (float_ref) – Volume

  • volume_confidence_interval (float_ref) – Volume confidence interval

New in version 8.5.

License: Geosoft Open License

get_mesh(index, vert_v_vx, vert_v_vy, vert_v_vz, tri_vv_pt1, tri_vv_pt2, tri_vv_pt3)[source]

Gets a triangular polyhedral mesh of a component in the surface item.

Parameters
  • index (int) – Index of the component

  • vert_v_vx (GXVV) – Vertices X

  • vert_v_vy (GXVV) – Vertices Y

  • vert_v_vz (GXVV) – Vertices Z

  • tri_vv_pt1 (GXVV) – Triangles 1st Vertex

  • tri_vv_pt2 (GXVV) – Triangles 2nd Vertex

  • tri_vv_pt3 (GXVV) – Triangles 3rd Vertex

New in version 8.4.

License: Geosoft Open License

get_mesh_info(index, closed, n_inner_comps, area, volume, volume_confidence_interval)[source]

Gets information about a triangular polyhedral mesh component in the surface item.

Parameters
  • index (int) – Index of the component

  • closed (bool_ref) – indicating if mesh is closed

  • n_inner_comps (int_ref) – Number of inner components

  • area (float_ref) – Area

  • volume (float_ref) – Volume

  • volume_confidence_interval (float_ref) – Volume confidence interval

New in version 8.4.

License: Geosoft Open License

get_properties(type, name, source_guid, source_name, source_measure, secondary_source_guid, secondary_source_name, secondary_source_measure)[source]

Gets the properties of the surface item.

Parameters
  • type (str_ref) – Type

  • name (str_ref) – Name

  • source_guid (str_ref) – SourceGuid

  • source_name (str_ref) – SourceName

  • source_measure (float_ref) – SourceMeasure

  • secondary_source_guid (str_ref) – SecondarySourceGuid

  • secondary_source_name (str_ref) – SecondarySourceName

  • secondary_source_measure (float_ref) – SecondarySourceMeasure

New in version 8.4.

License: Geosoft Open License

get_properties_ex(type, name, source_guid, source_name, source_measure, secondary_source_guid, secondary_source_name, secondary_source_option, secondary_source_measure, secondary_source_measure2)[source]

Gets the properties of the surface item (includes new properties introduced in 8.5).

Parameters
  • type (str_ref) – Type

  • name (str_ref) – Name

  • source_guid (str_ref) – SourceGuid

  • source_name (str_ref) – SourceName

  • source_measure (float_ref) – SourceMeasure

  • secondary_source_guid (str_ref) – SecondarySourceGuid

  • secondary_source_name (str_ref) – SecondarySourceName

  • secondary_source_option (int_ref) – SecondarySourceOption

  • secondary_source_measure (float_ref) – SecondarySourceMeasure

  • secondary_source_measure2 (float_ref) – SecondarySourceMeasure2

New in version 8.5.

License: Geosoft Open License

intersects_bounding_box(min_x, min_y, min_z, max_x, max_y, max_z)[source]

Checks intersections of a bounding box with a GXSURFACEITEM Object

Parameters
  • min_x (float) – Min X

  • min_y (float) – Min Y

  • min_z (float) – Min Z

  • max_x (float) – Max X

  • max_y (float) – Max Y

  • max_z (float) – Max Z

Return type

bool

New in version 9.7.1.

License: Geosoft End-User 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

classmethod null()[source]

A null (undefined) instance of GXSURFACEITEM

Returns

A null GXSURFACEITEM

Return type

GXSURFACEITEM

num_components()[source]

Get the number of components in the surface item.

Returns

Number of components in the surface item.

Return type

int

New in version 8.4.

License: Geosoft Open License

set_default_render_properties(color, transparency, render_mode)[source]

Sets default render properties of the surface item.

Parameters

New in version 8.4.

License: Geosoft Open License

See also

GXMVIEW.color

set_properties(type, name, source_guid, source_name, source_measure, secondary_source_guid, secondary_source_name, secondary_source_measure)[source]

Sets the properties of the surface item.

Parameters
  • type (str) – Type

  • name (str) – Name

  • source_guid (str) – SourceGuid

  • source_name (str) – SourceName

  • source_measure (float) – SourceMeasure

  • secondary_source_guid (str) – SecondarySourceGuid

  • secondary_source_name (str) – SecondarySourceName

  • secondary_source_measure (float) – SecondarySourceMeasure

New in version 8.4.

License: Geosoft Open License

set_properties_ex(type, name, source_guid, source_name, source_measure, secondary_source_guid, secondary_source_name, secondary_source_option, secondary_source_measure, secondary_source_measure2)[source]

Sets the properties of the surface item (includes new properties introduced in 8.5).

Parameters
  • type (str) – Type

  • name (str) – Name

  • source_guid (str) – SourceGuid

  • source_name (str) – SourceName

  • source_measure (float) – SourceMeasure

  • secondary_source_guid (str) – SecondarySourceGuid

  • secondary_source_name (str) – SecondarySourceName

  • secondary_source_option (int) – SecondarySourceOption

  • secondary_source_measure (float) – SecondarySourceMeasure

  • secondary_source_measure2 (float) – SecondarySourceMeasure2

New in version 8.5.

License: Geosoft Open License

SURFACERENDER_MODE constants

Open Modes

SURFACERENDER_SMOOTH

Surfacerender smooth

gxapi.SURFACERENDER_SMOOTH = 0
SURFACERENDER_FILL

Surfacerender fill

gxapi.SURFACERENDER_FILL = 1
SURFACERENDER_EDGES

Surfacerender edges

gxapi.SURFACERENDER_EDGES = 2