GXDMPPLY class

class GXDMPPLY(handle=0)

GXDMPPLY class.

Datamine Multiple polygon object

clear()

Clear/remove all polygons from the GXDMPPLY.

New in version 6.0.

License: Geosoft End-User License

copy(source)

Copy

Parameters:source (GXDMPPLY) – Source

New in version 6.0.

License: Geosoft End-User License

classmethod create()

Creates a GXDMPPLY object.

Returns:DMPLY Object
Return type:GXDMPPLY

New in version 6.0.

License: Geosoft End-User License

get_azimuth(p, az)

Get the azimuth of a given polygon.

Parameters:
  • p (int) – Polygon number (1 to NP)
  • az (float_ref) – Azimuth (degrees) (o)

New in version 6.0.

License: Geosoft End-User License

Note: The azimuth is the equivalent section azimuth, equal to the azimuth of the normal vector plus 90 degrees.

get_extents(p, x, y, z, w, h)

Get the center, width and height of a given polygon.

Parameters:
  • p (int) – Polygon number (1 to NP)
  • x (float_ref) – Center point X (o)
  • y (float_ref) – Center point Y (o)
  • z (float_ref) – Center point Z (o)
  • w (float_ref) – Width of polygon (in its plane) (o)
  • h (float_ref) – Height of polygon (Z extent) (o)

New in version 6.0.

License: Geosoft End-User License

get_joins(p, vv)

Get join lines for each vertex in a specific polygon.

Parameters:
  • p (int) – Polygon number (1 to N)
  • vv (GXVV) – INT GXVV of join indices (1 to NJoins).

New in version 6.0.

License: Geosoft End-User License

Note: If a specific vertex is not joined, the returned value is 0. If the vertex is joined, then the index of the join line (1 to NJoins) is returned.

get_normal_vectors(p, x1, y1, z1, x2, y2, z2, x3, y3, z3)

Get the normal vectors of a given polygon.

Parameters:
  • p (int) – Polygon number (1 to NP)
  • x1 (float_ref) – X component (o) (Horizontal azimuth vector)
  • y1 (float_ref) – Y component (o)
  • z1 (float_ref) – Z component (o)
  • x2 (float_ref) – X component (o) (Down-dip, in the vertical plane)
  • y2 (float_ref) – Y component (o)
  • z2 (float_ref) – Z component (o)
  • x3 (float_ref) – X component (o) (Normal vector)
  • y3 (float_ref) – Y component (o)
  • z3 (float_ref) – Z component (o)

New in version 6.0.

License: Geosoft End-User License

Note: Three normalized vectors are returned. The first is horizontal, in the plane of the polygon. The second is in the vertical plane, corresponding to the “down-dip” direction. The third is the normal vector to the polygon plane.

get_poly(p, vv_x, vv_y, vv_z)

Get a specific polygon from a GXDMPPLY object.

Parameters:
  • p (int) – Polygon number (1 to NP) (i)
  • vv_x (GXVV) – X Locations (o)
  • vv_y (GXVV) – Y Locations (o)
  • vv_z (GXVV) – Z Locations (o)

New in version 6.0.

License: Geosoft End-User License

Note: Get the number of points from the GXVV length.

get_swing(p, az)

Get the swing of a given polygon.

Parameters:
  • p (int) – Polygon number (1 to NP)
  • az (float_ref) – Swing (degrees) (o)

New in version 6.0.

License: Geosoft End-User License

Note: The swing is the equivalent section swing, equal to zero for vertical plates, and increasing as the normal vector goes from horizontal upward.

get_vertex(p, v, x, y, z)

Get a vertex location from a GXDMPPLY object.

Parameters:
  • p (int) – Polygon number (1 to NP)
  • v (int) – Vertex number (1 to NV)
  • x (float_ref) – X Location (o)
  • y (float_ref) – Y Location (o)
  • z (float_ref) – Z Location (o)

New in version 6.0.

License: Geosoft End-User License

is_null()

Check if this is a null (undefined) instance

Returns:True if this is a null (undefined) instance, False otherwise.
Return type:bool
load(file)

Loads a Datamine polygon file.

Parameters:file (str) – Name of the file to load

New in version 6.0.

License: Geosoft End-User License

move_vertex(p, v, x, y, z)

Moves a vertex and any associated lines.

Parameters:
  • p (int) – Polygon number (1 to NP)
  • v (int) – Vertex number (1 to NV)
  • x (float) – New location X
  • y (float) – New location Y
  • z (float) – New location Z

New in version 6.0.

License: Geosoft End-User License

classmethod null()

A null (undefined) instance of GXDMPPLY

Returns:A null GXDMPPLY
Return type:GXDMPPLY
num_joins()

Get the number of joining lines in a GXDMPPLY object.

Returns:Number of joining lines
Return type:int

New in version 6.0.

License: Geosoft End-User License

num_polys()

Get the number of polygons in a GXDMPPLY object.

Returns:Number of polygons
Return type:int

New in version 6.0.

License: Geosoft End-User License

Note: The value returned is the “NP” used in function descriptions below.

num_vertices(p)

Get the number of vertices in a polygon.

Parameters:p (int) – Polygon number (1 to NP)
Returns:Number of vertices in a polygon
Return type:int

New in version 6.0.

License: Geosoft End-User License

Note: The value returned is the “NV” used in function descriptions below.

project_poly(p, xp, yp, zp, az, swing, vv_x, vv_y, vv_z)

Project a polygon onto a vertical plane.

Parameters:
  • p (int) – Polygon number (1 to NP)
  • xp (float) – X location of plane origin in 3D
  • yp (float) – Y location of plane origin in 3D
  • zp (float) – Z location of plane origin in 3D
  • az (float) – Azimuth of the plane in degrees
  • swing (float) – Swing of the plane in degrees
  • vv_x (GXVV) – X (horizontal along-section locations on vertical plane (o)
  • vv_y (GXVV) – Y (vertical locations on vertical plane (o)
  • vv_z (GXVV) – Z (horizontal distances perpendicular to the plane (o)

New in version 6.0.

License: Geosoft End-User License

Note: Gives the location in plane coordinates of a selected polygon, after it has been projected perpendicularly onto the plane.

Plane coodinates: X - horizontal in plane
Y - “vertical” in plane (can be a swing) Z - horizontal, “perpendicular” to plane (RH)
re_project_poly(p, xp, yp, zp, az, vv_x, vv_y, vv_x3, vv_y3, vv_z3)

Recover polygon locations from 2D locations on vertical plane.

Parameters:
  • p (int) – Polygon number (1 to lNP) (i)
  • xp (float) – X location of plane origin in 3D (i)
  • yp (float) – Y location of plane origin in 3D (i)
  • zp (float) – Z location of plane origin in 3D (i)
  • az (float) – Azimuth of the plane in degrees (i)
  • vv_x (GXVV) – X locations on vertical plane (i)
  • vv_y (GXVV) – Y (actually Z) locations on vertical plane (i)
  • vv_x3 (GXVV) – X Locations of polygon (o)
  • vv_y3 (GXVV) – Y Locations of polygon (o)
  • vv_z3 (GXVV) – Z Locations of polygon (o)

New in version 6.0.

License: Geosoft End-User License

Note: This is the inverse operation of project_poly.

Input the 2D locations on the projected vertical plane. These locations are projected back onto the original polygon plane.

save(file)

Save to a Datamine polygon file

Parameters:file (str) – Name of the file to save to

New in version 6.0.

License: Geosoft End-User License

set_poly(p, vv_x, vv_y, vv_z)

Set a specific polygon into a GXDMPPLY object.

Parameters:
  • p (int) – Polygon number (1 to NP) (i)
  • vv_x (GXVV) – X Locations (i)
  • vv_y (GXVV) – Y Locations (i)
  • vv_z (GXVV) – Z Locations (i)

New in version 6.0.

License: Geosoft End-User License

Note: Get the number of points from the GXVV length.