grail.data.geometry module

Version: 16.2

Table of Contents

Introduction

This module helps users to read and write geometry and labels to a geometry resource file.

Geometry elements can be added or deleted. Data for each element can be read, changed or displayed (via Python's stdout).

The geometry object is defined by specifying the path to its resource. For example:

phase1 = Geometry("c:\\bigore\\_msresources\\phase1.msr")
material = Geometry("goldmaterial.msr")

The elements in the object can be added, deleted, and modified, but the actual resource is not updated till the storeresource() method is invoked.

The values for the material resources are not stored in the geometry data view and are loaded and stored dynamically. The methods that access the material resource have names with Load and Store (as opposed to Get and Set) to emphasize their dynamic nature.

Geometry Elements

The geometry elements can be:

  • labels (2D or 3D)
  • polylines (2D or 3D)
  • polygons (2D or 3D)
  • markers (2D or 3D)
  • shells (3D only)

Note that when methods refer to "markers", we are referring to the groups of uniquely named markers, not each individual marker.

Each element has the following items:

Name

The element name which can be blank. Elements with the same name and plane are grouped together in the resource file and share the same material, options, and hoops attributes.

Plane

The abcd coefficients of plane equation as a 4-tuple (for example, (.1, .2, .3, .4). A 3D plane will have a zero 4-tuple (0, 0, 0, 0) as its plane. Note that an element is 2D if it has a well-defined (ie, non-zero) plane. No attempt is made to ensure that points for a 2D element remain co-planar or that they actually lie on the element's plane. The positions in the tuple correspond to the co-efficients for a plane equation, A, B, C, and D, where the equation is,

Ax+By+Cz+D=0

and the tuple is,

(A, B, C, D)

All values are with respect to the origin of the geometry msr itself. See Standard Method Arguments for more information.

Material

The material for the element. The material name cannot be blank and must represent a valid file name when ".msr" is appended to it. For example, "Index Contour" is a valid material, but "texaslonghorn" or "3calves" is not. See Material Resources for more information.

Options

For internal use only.

Hoops Attributes

Mainly for internal use only. This is a string containing the element's hoops attributes. It cannot be modified. New elements are given the attributes of the other elements with which it is grouped by name and plane, or no attributes if a there are no other elements grouped with the new element.
Points

Each element must have a valid list of coordinates stored as a list of 3-lists (eg, [[1, 2, 3], [4, 5, 6], [7, 8, 9]]). The points are represented in absolute coordinates, but stored relative to the geometry object's origin in the resource file.

Each element type has a required minimum number of points:

Element Minimum Points
Polyline 2
Polygon 3
Markers 1
Shell 3

Labels can have 1 or 3 points depending on the label type. Labels are covered more in depth further down.

Faces
A shell element also has a list of faces stored as a list of integers.

It is important to note that order of geometry is not preserved from one load to the next. This can be illustrated with a simple little example,

g1 = geometry.Geometry("mymsr.msr")
g1.setpolylinenameat(0, name="orebody")
g1.storeresource()

g2 = geometry.Geometry("mymsr.msr")
print `g2.getpolylinenameat(0)`

Here the output of the print statement does not necessarily need to be "orebody", and if there are other polylines within the geometry file, this will most likely be the case.

See also Standard Method Arguments where method arguments and returned values are described.

Labels

Warning

DEPRECATED (as of MineSight® 3-D v8.00)

MineSight 7.50 introduced a major change to labels. The information found in this section is still applicable and used but it is no longer the current or preferred method to store 'new' labels. If you are working with old files, you may still come across this style of label. There is another label section further down to explain the new label changes.

Labels within a MineSight® 3-D Geometry file can be divided into three categories,

  1. Forward Labels (semi-transformed labels).
  2. Upright Labels (non-transformed labels).
  3. Fixed Labels (transformed labels).

New Names for Label Types

As of MineSight® version 4.0, the types of label's in the MineSight® 3-D interface were renamed for clarity. In order to remain consistent across the MineSight® suite, the label functions in this code have been renamed as well.

The older names will continue to work; however, it is strongly recommended that you begin migrating to use the newer names for clarity between your script and the MineSight® 3-D interface.

The table below describes how the new names migrated,

Earlier Versions Version 4.0
non-transformed upright
semi-transformed forward
transform fixed

Note

The older function names will continue to work indefinetly.

Forward and Upright Labels

Data for each Forward or Upright label consists of:

Text

List of strings (eg, ["longhorn", "guernsey", "Holstein"]) the list cannot be empty, but individual strings can be blank (eg, "").

The text for a label can not exceed 255 (defined in the constant MAX_LABEL_LEN). The geometry module will truncate any strings that exceed this length.

Position

A list of three-lists (eg, [[10.0, 22.2, 334.0], [0., 0., 1.], [1., 0., 0.]] defining the position and orientation of the text in absolute coordinates. The three points define,

  1. Origin: Start of the label.
  2. Up: Which way is up for the label.
  3. Right: Which is right for the label.

Name

Same as with geometry elements, see the description in Geometry Elements .

Prior to version 4.0 of MineSight® these labels were described as,

Earlier Versions Version 4.0
non-transformed upright
semi-transformed forward

Older nontransform* and semitransform* family of functions have been deprecated, and replaced with "upright" and "forward".

Fixed Labels

Data for fixed labels are a bit more complex, and consists of the data defined for upright and forward labels as well as,

Matrix

A modeling matrix, which indicates the transformation applied to a label starting at point P. The transformation matrix typically has rotation and translation data stored in it. Consult a Graphics Programming book for more information on transformation matrices.

All matrices are right-multiplied. The standard is shown in the book Computer Graphics by Foley [1].

Text

Same as the forward and upright label outlined above (Forward and Upright Labels).

Position

Three point position of the label prior to applying the transformation matrix. This is point P. Notice that you can encode the translation into the matrix, and leave position as 0, 0, 0.

Plane

A 4-tuple (floats) indicating the plane for the transformation matrix.

Name

Same as with geometry elements, see the description in Geometry Elements_ .

As you can see the fixed labels are much more complex. It is recommended that if you find yourself working with these labels, that you be familiar with basic graphics programming ideas, such as translation and rotation encoded in a matrix.

Prior to version 4.0 of MineSight® these labels were described as,

Earlier Versions Version 4.0
transform fixed

Older transform* family of functions have been deprecated, and replaced with "fixed".

Labels 7.50 and Newer

Note

Grail changes introduced in MineSight® 3-D v8.00

Labels within a MineSight® 3-D Geometry file can be divided into three categories,

  1. Forward Labels.
  2. Upright Labels.
  3. Fixed Labels.

Data for Labels

Data for each label consists of:

Type

Indicates if the label is a Fixed, Forward, or Upright label. Unlike the earlier method of handling labels, all three types now use the exact same interface and data to define them.

Text

A label can hold multiple lines of text. Empty lines are just "". The length of a line is not limited.

Origin

A list of three numbers to indicate the location of the label in space. It is the absolute coordinate of the label.

OUR

OUR short of Origin, Up and Right. This defines the orientation of the label in space. These values are normalized to [0, 0, 0], Origin value will always be [0, 0, 0]. Up and Right are 1 unit in the up and right directions for the label.

A list of three-lists (eg, [[0., 0., 0.], [0., 0., 1.], [1., 0., 0.]]. The three points define,

  1. Origin: Start of the label. Always [0,0,0]
  2. Up: Which way is up for the label.
  3. Right: Which is right for the label.

Name

Same as with geometry elements, see the description in Geometry Elements .

Material

Same as with geometry elements, see the description in Geometry Elements.

GridString

Call geometry.getPlaneString(plane) to create the filter string.

Why is this not called Plane or PlaneString? The reason is that MineSight can handle fences. This api has not been updated to allow for fences yet but under the hood both fences and planes are defined with this string.

Using Data for Labels

Unlike all the other routines you find with Geometry you will need to work with a couple of new classes.

Reading

After loading in a geometry msr file you need to get the element dictionary (ElemDict class). Currently this elemDict only holds the new labels.

  elemDict = mygeometry.getElemDict()

From there you can iterate over the entire element dictionary to fetch all
the label elements (Elem class) from the geometry msr.

Note

New labels only, old labels need to go through the old API.

for index in range(elemDict.getCount()):

   
elem = elemDict.getAt(index)

Now that you have the label elem, you will need to use the Elem class functions to get at the information.

Writing

If you are writing a completely new geometry object you first need to create a new element dictionary (ElemDict class) with...

elemDict = ElemDict()

If you are simply adding to an existing, previously read in, geometry file then you can use the existing element dictionary with...

elemDict = mygeometry.getElemDict()

If you are modifying en existing, previously read in, geometry file then you need to create a new element dictionary and move the elements from your old dictionary to the new dictionary and whatever else you wish to do.

elemDict    = ElemDict()
oldElemDict = mygeometry.getElemDict()

# Copy elements from oldElemDict over to elemDict.

From there you need to create label elements (Elem class) for each label you want to add to the element dictionary.

elem = Elem(Elem.typeENH_LABEL)

# NOTE: Order is important.  Insert the lines first before setting
# any other label property.
for lineIndex in range(myTotalLineCount):
   
elem.appendLabelLine(myLabelText[lineIndex])

elem.set*()

For planar labels you will need to set...

gridString = myGeometry.getPlaneString(plane)

elem.setGridPlane(planeNormal)
# planeNormal is a 3-tuple.  like plane but without the D component.

elem.setMsrGridString(gridString)

And then add them to the element dictionary.

elemDict.add(gridString, name, material, elem)

Finally setting the new element dictionary onto the geometry object.

myGeometry.setElemDict(elemDict)

System Message: ERROR/3 (D:\bbwork\p\mp3d\mp_mp3d.release_16.2.0\gsrc\doc\Library_Reference\grail.data\lib-grail-data-geometry.rst, line 474)

Content block expected for the "Note" directive; none found.

.. Note::

The elemDict that you provide will replace the elemDict currently defined on myGeometry (if any.)

And storing.

myGeometry.storeresource()

Material Resources

Certain values from a material resource file can be retrieved and modified. Modifiable values include,

  • Model code
  • VBM code
  • Survey code
  • Survey type
  • Attributed flag

Each of these values are described in further detail below,

Model code and VBM code
Must be non-negative integers.
Survey code
Is a string of at most 5 characters. If blank then the string "none" (as opposed to the python value None) is inserted for compatibility with MineSight®.
Survey Type
Can be set to Point, Breakline, or Boundary. Certain material resources, for example "breakcode" have a "File BreakCode" survey type. Materials with this survey type should not have their type modified.

The material resource methods operate on the material name (ie, like the material name stored in the geometry resource), not the material resource path or filename. The material name would be something like "Blasthole". The filename would be Blasthole.msr.

The location of material resource is determined by the following algorithm:

First assume the geometry resource is in a typical MineSight® working directory.

For example, if the material name is "Blasthole" and the geometry resource's absolute path is:

c:\bigore\_msresources\polygons\geom.msr

Then look for a materials directory under _msresources containing the material msr:

c:\bigore\_msresources\materials\blasthole.msr

If not found, see if the material msr is in the same directory as the geom msr:

c:\bigore\_msresources\polygons\blasthole.msr

If not there, check in a materials directory under the directory with the geom msr:

c:\bigore\_msresources\polygons\materials\blasthole.msr

The getmaterialpath() method returns the path of the material resource.

Standard Method Arguments

The Geometry methods attempt to have consistently defined arguments and values returned from the methods have the same form as the argument. So, for example, in setpolygonnameat(0, name), name is a string and getpolygonnameat(0) returns a string.

Below is a list of argument names, types, and restrictions.

name : string
Element name. Can be blank or None.
plane : 4-tuple (floats)

The abcd coefficients for a plane. Use None or (0, 0, 0, 0) for a 3D element plane. The co-efficients correspond to A, B, C, and D in,

Ax+By+Cz+D=0

If you wish to insert a polygon on bench 2254.0, with a normal facing up, you would use the co-efficients,

A=0, B=0, C=1, D=-2254.0

This assumes that geometry's origin is located at x=0.0, y=0.0, and z=0.0. Consider the following case,

A=0, B=0, C=1, D=-3685.

If the origin was located at,

x=0., y=0., z=3730

Then you are specifying the plane 7415, which is equal to 3685 + 3730.

material : string

The element's material name. In general the material name is a valid filename when a .msr is appended to it.

Using None or a blank string ('') indicates you wish to set the element's material to be equal to the geometry's default material.

Values returned by the element getmaterial methods (eg, get2dpolygonmaterialat(3)) can be used as arguments in the material methods.

For example:

ore = Geometry("goldbody.msr")
code = ore.loadmaterialmodelcode(ore.getdefaultmaterial())

Returns the model code for the default material.

options : string
The element options. Can be None or blank.
hattr : string
For internal use only. The element HOOPS attribute string.
pts : list of 3-list

The list of points defining the element. For example,

[[x0, y0, z0], ..., [xN, yN, zN]]
faces : list of ints
A shell's face list.
index : int

An element's index in the data view's dictionary.

Note

That the index is, in general, different when working with 2D and 3D methods. For example, a 2D polygon might be the 4th polygon but the first 2D polygon, and it won't have any 3D index.

isOn : int
True (1) or False (0)
ltext : list of strings
A list of the text strings comprising a single forward or upright label. The list cannot be empty, but individual strings can be blank.
lpos : list of 3-point
The points defining a semi or non-transformed
lists
Label's position and orientation is absolute coordinates.

Filtering

Starting with 4.0 of MineSight® GRAIL the concept of filtering was added to the Geometry class in order improve performance when you want to read and work with a subset of all the available geometries within the MineSight® Resource File (MSR).

Using filtering vastly improves the load times for a Geometry object.

There are two very important concepts to consider when using the filtering,

  1. You will only get the elements within the MSR that you requested.
  2. Your MSR will become READ ONLY.

An example of filtering is the following which only loads shells within the MSR,

msr = geometry.Geometry(
   
"geometry.msr",
   
filter=geometry.Filter.Shells
   
)
for shlIdx in range(msr.getshellcount()):
   
pts = msr.getshellpointsat(shlIdx)
   
faces = msr.getshellfacesat(shlIdx)

The filters can be combined so for instance if you are only interested in reading all labels and markers you could do the following,

msr = geometry.Geometry(
   
"geometry.msr",
   
filter=geometry.Filter.Labels | geometry.Filter.Markers
   
)
for shlIdx in range(msr.getshellcount()):
   
pts = msr.getshellpointsat(shlIdx)
   
faces = msr.getshellfacesat(shlIdx)

where the Filter.Labels is a convenience for all the available filters.

For a complete listing of available filters see Filtering Flags.

Dimensional Filtering

If you wish to filter by dimension you can do so by using the Filter.Dim2D or Filter.Dim3D. By default you will not get any dimensional filtering unless you explicitly ask for it. The following example illustrates filtering for all 2D markers.

msr = geometry.Geometry(
   
"geometry.msr",
   
filter=geometry.Filter.Markers | geometry.Filter.Dim2D
   
)

The following table indicates the dimensions that typical geometry elements can be filtered by:

Element 2D 3D
Shells No Yes
Polygons Yes Yes
Polylines Yes Yes
Markers Yes Yes
Fixed Labels (a) No Yes
Upright Labels (a) No Yes
Forward Labels (a) No Yes
Labels (b) Yes Yes
  1. Old labels
  2. New labels, "Labels 7.50 and Newer" section

Filtering by dimension alone can not be done. This means you can not filter for all 2D elements with Dim2D by itself (the same applies to 3D elements with Dim3D). You need to add an additional flag.

As an example, consider filtering all 2D geometry you can do the following,

msr = geometry.Geometry(
   
"geometry.msr",
   
filter=geometry.Filter.Geometry | geometry.Filter.Dim2D
   
)

which will return all geometry elements that are 2D. As another example consider that you only want all 2D polylines and polygons, you can use the Filter.Poly flag with the Filter.Dim2D as in,

msr = geometry.Geometry(
   
"geometry.msr",
   
filter=geometry.Filter.Poly | geometry.Filter.Dim2D
   
)

For a complete listing of available filters see Filtering Flags.

Filtering Flags

The following filtering flags can be combined to speed up the load times for a Geometry object. However, once filtering is in place the Geometry becomes a read-only object with only the filtered elements available.

Filter.Shells
Indicates that you only wish to read Shell Geometry elements (i.e. surfaces and volumes).
Filter.Polylines
Indicates that you only wish to read Polyline Geometry elements.
Filter.Polygons
Indicates that you only wish to read Polygon Geometry elements.
Filter.Markers
Indicates that you only wish to read Marker Geometry elements.
Filter.FixedLabels

Deprecated alias is Filter.TransLabels.

Indicates that you only wish to read Fixed Label elements.

Filter.ForwardLabels

Deprecated alias is Filter.SemiTLabels.

Indicates that you only wish to read Forward Label elements.

Filter.UprightLabels

Deprecated alias is Filter.NonTLabels.

Indicates that you only wish to read Upright Label elements.

Filter.Polys
A combination of Filter.Polygon and Filter.Polylines that indicates that you wish to read both Polygon and Polyline elements.
Filter.Geometry
A combination of all Geometry elements.
Filter.Labels
A combination of all Label elements.
Filter.Any
A combination of all filters that effectively implies that you do not want any filtering.
Filter.Dim2D
Only filters data that is 2D. See also Dimensional Filtering.
Filter.Dim3D
Only filters data that is 3D. See also Dimensional Filtering.
Filter.DimAny
Allows any dimensional data to pass the filter. See also Dimensional Filtering.

Shifting Planes

Using the geometry class, it is possible to automatically shift planes returned from a geometry object based on a vector.

from grail.data import geometry

g = geometry.create_or_open('C:\somefile.msr')
g.alwaysShiftPlanes = True             #set shift boolean to True
g.shiftPlanesVector = (1.0, 2.0, 3.0)  #vector to shift all planes by

plane = g.get2dpolygonplaneat(0)       #all returned planes will be shifted.

If you only need to shift a few planes, it may be simpler to use the shiftPlane function in geometry. This is a helper function which simplifies the call to shift a plane using the ag module.

from grail.data import geometry

g = geometry.create_or_open('C:\somefile.msr')
plane = g.get2dpolygonplaneat(0)
vector = (1.0, 2.0, 3.0)
plane = geometry.shiftPlane(plane,vector)

Please note that if you pass in a plane which is not 2d, the plane will be returned without being shifted rather than throwing an error. Thus, checking for dimension should be consistent with and without shifting the plane.

Geometry Class

class Geometry(path[,filter])

Load values for a geometry resource file at the given path. This object represents the contents of a MineSight® Geometry and Material Resource file.

If the given path does not exist, this will generate an IOError.

The optional filter can be used to load a subset of elements within the Geometry file. When applying a filter to the Geometry object you automatically make the object a read-only object. By default there is no filtering applied.

For more details on filtering see Filtering and Filtering Flags.

The Boolean alwaysShiftPlanes allows you to always shift a plane based on the shiftPlanesVector. If this Boolean is set to 'True', all returned planes will be shifted by the set vector for a given geometry object, i.e. there is no global setting for all geometry objects.

add2dmarkers(name, plane, material, options, pts)

Append a new 2D markers element. The pts is a list of points that you wish to store on this plane under this name that would appear as,

[[x0, y0, z0], ..., [xN, yN, zN]]

Your plane and pts must be a valid combination. In otherwords, you pts must exist on the supplied plane. A ValueError exception will be thrown if this is not true. This behaviour is new and was introduced in v3.60-03. In order to relax this requirement, and make the Geometry class behave like it used to, call the setstrict2dmarker method with a value of 0 prior to adding markers.

add2dpolygon(name, plane, material, options, pts)
Append a new 2D polygon.
add2dpolyline(name, plane, material, options, pts)
Append a new 2D polyline.
addmarkers(name, material, options, pts)
Append a new markers element.
add_upright_label(ltext, lpos[, material, name])

Deprecated alias is addntranlabel.

Add a new upright label.

addpolygon(name, material, options, pts)
Append a new (3D) polygon.
addpolyline(name, material, options, pts)
Append a new (3D) polyline.
add_forward_label(ltext, lpos[, material, name])
Deprecated alias is addsemitlabel. Add a new forward label.
addshell(name, material, options, pts, faces)
Append a shell.
add_fixed_label(text, position, matrix, plane[, material, name])

Deprecated alias is addtransformlabel.

Adds a fixed label.

delete2dmarkersat(index)
Delete a 2D markers element at the given index.
delete2dpolygonat(index)
Delete the 2D polygon at the given index.
delete2dpolylineat(index)
Delete the 2D polyline at the given index.
delete3dmarkersat(index)
Delete a 3D markers element at the given index.
delete3dpolygonat(index)
Delete the 3D polygon at the given index.
delete3dpolylineat(index)
Delete the 3D polyline at the given index.
deletemarkersat(index)
Delete a markers element at the given index.
delete_upright_label_at(index)

Deprecated alias is deletentranlabelat.

Delete the upright label at the given index.

deletepolygonat(index)
Delete the polygon at the given index.
deletepolylineat(index)
Delete the polyline at the given index.
delete_forward_label_at(index)

Deprecated alias is deletesemitlabelat

Delete the forward label at the given index.

deleteshellat(index)
Delete the shell at the given index.
delete_fixed_label_at(index)

Deprecated alias is deletetransformlabelat

Delete a fixed label at the given index.

display2dmarkers()
Print info for all 2D markers elements.
display2dmarkersat(index)
Print info for a 2D markers element at the given index.
display2dpolygonat(index)
Print info for the 2D polygon at the given index.
display2dpolygons()
Print info for the 2D polygons.
display2dpolylineat(index)
Print info for one 2D polyline at the given index.
display2dpolylines()
Print info for all the 2D polylines.
display3dmarkers()
Print info for all 3D markers elements.
display3dmarkersat(index)
Print info for a 3D markers element at the given index.
display3dpolygonat(index)
Print info for the 3D polygon at the given index.
display3dpolygons()
Print info for the 3D polygons.
display3dpolylineat(index)
Print info for one 3D polyline at the given index.
display3dpolylines()
Print info for all the 3D polylines.
displaymarkers()
Print info for all markers elements.
displaymarkersat(index)
Print info for a markers element at the given index.
displaypolygonat(index)
Print info for the polygon at the given index.
displaypolygons()
Print info for all the polygons.
displaypolylineat(index)
Print info for one polyline at the given index.
displaypolylines()
Print info for all the polylines.
displayshellat(index)
Print info for the shell at the given index.
displayshells()
Print info for all the shells.
free()

Free the Geometry object. The geometry object's contents will automatically be cleaned up when there are no more variables pointing to the initial instance. However, if memory footprint is of concern it is recommended that you call this method.

Warning

All other methods become invalid after calling this method.

get2dmarkerscount()
Return the number of 2D Markers.
get2dmarkershattrat(index)
Return a 2D markers element HOOPS attributes at the given index.
get2dmarkersmaterialat(index)
Return a 2D markers element material at the given index.
get2dmarkersnameat(index)
Return a 2D markers element name at the given index.
get2dmarkersoptionsat(index)
Return a 2D markers element options at the given index.
get2dmarkersplaneat(index)
Return a 2D markers element plane at the given index.
get2dmarkerspointsat(index)
Return a 2D markers element points at the given index.
get2dpolygoncount()
Return the number of 2D polygons.
get2dpolygonhattrat(index)
Return the 2D polygon HOOPS attributes at the given index.
get2dpolygonmaterialat(index)
Return the 2D polygon material at the given index.
get2dpolygonnameat(index)
Return the 2D polygon name at the given index.
get2dpolygonoptionsat(index)
Return the 2D polygon options at the given index.
get2dpolygonplaneat(index)
Return the polygon plane at the given index.
get2dpolygonpointsat(index)
Return the 2D polygon points at the given index.
get2dpolylinecount()
Return the number of 2D polylines.
get2dpolylinehattrat(index)
Return the 2D polyline HOOPS attributes at the given index.
get2dpolylinematerialat(index)
Return the 2D polyline material at the given index.
get2dpolylinenameat(index)
Return the 2D polyline name at the given index.
get2dpolylineoptionsat(index)
Return the 2D polyline options at the given index.
get2dpolylineplaneat(index)
Return the 2D polyline plane at the given index.
get2dpolylinepointsat(index)
Return the 2D polyline points at the given index.
get3dmarkerscount()
Return the number of 3D Markers.
get3dmarkershattrat(index)
Return a 3D markers element HOOPS attributes at the given index.
get3dmarkersmaterialat(index)
Return a 3D markers element material at the given index.
get3dmarkersnameat(index)
Return a 3D markers element name at the given index.
get3dmarkersoptionsat(index)
Return a 3D markers element options at the given index.
get3dmarkerspointsat(index)
Return a 3D markers element points at the given index.
get3dpolygoncount()
Return the number of 3D polygons.
get3dpolygonhattrat(index)
Return the 3D polygon HOOPS attributes at the given index.
get3dpolygonmaterialat(index)
Return the 3D polygon material at the given index.
get3dpolygonnameat(index)
Return the 3D polygon name at the given index.
get3dpolygonoptionsat(index)
Return the 3D polygon options at the given index.
get3dpolygonpointsat(index)
Return the 3D polygon points at the given index.
get3dpolylinecount()
Return the number of 3D polylines.
get3dpolylinehattrat(index)
Return the 3D polyline HOOPS attributes at the given index.
get3dpolylinematerialat(index)
Return the 3D polyline material at the given index.
get3dpolylinenameat(index)
Return the 3D polyline name at the given index.
get3dpolylineoptionsat(index)
Return the 3D polyline options at the given index.
get3dpolylinepointsat(index)
Return the 3D polyline points at the given index.
getdefaulthattr()
Return the geometry Default HOOPS attributes.
getdefaultmaterial()
Return geometry default material name.
getdefaultoptions()
Return geometry default options.
getElemDict()
Return the element dictionary. Currently only holds new labels.
getmarkerscount()

Return the total number of Markers (2D and 3D). This returns the number of groups (named markers), each group will have 1 to N points within it (the unnamed group may contain 0 points within it).

So if you geometry contains 3 named groups called "Group1", "Group2" and "Group3" this method will return 4 (one additional one for the unnamed group).

Each one of the groups at the particular index will have N points within it. So if you want to count all the points within a Geometry object you would need to something like,

g = geometry.Geometry("phase1.msr")
numpoints = 0
for index in range(g.getmarkescount()):
   
numpoints += len(g.getmarkerpointsat(index))

At this point numpoints will be equal to all the markers within the Geometry object.

getmarkershattrat(index)
Return a markers element HOOPS attributes at the given index.
getmarkersmaterialat(index)
Return a markers element material at the given index.
getmarkersnameat(index)
Return a markers element name at the given index.
getmarkersoptionsat(index)
Return a markers element options at the given index.
getmarkersplaneat(index)
Return a markers element plane at the given index.
getmarkerspointsat(index)
Return a markers element points at the given index..
getmaterialpath(material)
Find the path to a specified material (no msr extension) based on the location of the geometry msr.
getPlaneString(plane)
Converts the plane to a gridString for use with ElemDict and Elem classes.
get_upright_label_count()

Deprecated alias is getntranlabelcount.

Return the number of upright labels.

get_upright_label_material_at(index)

Deprecated alias is getntranlabelmaterialat.

Return the material for the upright label at the given index.

get_upright_label_name_at(index)

Deprecated alias is getntranlabelnameat.

Returns the upright label name.

get_upright_label_pos_at(index)

Deprecated alias is getntranlabelposat.

Return the position points for the upright label at the given index.

get_upright_label_text_at(index)

Deprecated alias is getntranlabeltextat

Return the list of text for the upright label at the given index.

getorigin()
Return a 3-tuple of floats for the geometry origin. (0, 0, 0) if not found.
getpath()
Return the path (string) for the geometry msr.
getpolygoncount()
Return the total number of polygons (2D and 3D).
getpolygonhattrat(index)
Return the polygon HOOPS attributes at the given index.
getpolygonmaterialat(index)
Return the polygon material at the given index.
getpolygonnameat(index)
Return the polygon name at the given index.
getpolygonoptionsat(index)
Return the polygon options at the given index.
getpolygonplaneat(index)
Return the polygon plane (all zeros if 3D) at the given index.
getpolygonpointsat(index)
Return the polygon points at the given index.
getpolylinecount()
Return the total number of polylines (2D and 3D).
getpolylinehattrat(index)
Return the polyline HOOPS attributes at the given index.
getpolylinematerialat(index)
Return the polyline material at the given index.
getpolylinenameat(index)
Return the polyline name at the given index.
getpolylineoptionsat(index)
Return the polyline options at the given index.
getpolylineplaneat(index)
Return the polyline plane (all zeros if 3D) at the given index.
getpolylinepointsat(index)
Return the polyline points at the given index.
get_forward_label_count()

Deprecated alias is getsemitlabelcount.

Return the number of forward labels.

get_forward_label_material_at(index)

Deprecated alias is getsemitlabelmaterialat.

Return the material for the forward label at the given index.

get_forward_label_name_at(index)

Deprecated alias is getsemitlabelnameat.

Returns forward label's name.

get_forward_label_pos_at(index)

Deprecated alias is getsemitlabelposat.

Return the position points for the forward label at the given index.

get_forward_label_text_at(index)

Deprecated alias is getsemitlabeltextat.

Return the list of text for the forward label at the given index.

getshellcount()
Return the total shell count.
getshellfacesat(index)
Return the shell faces at the given index.
getshellhattrat(index)
Return the shell HOOPS attributes at the given index.
getshellmaterialat(index)
Return the shell material at the given index.
getshellnameat(index)
Return the shell name at the given index.
getshelloptionsat(index)
Return the shell options at the given index.
getshellpointsat(index)
Return the shell points at the given index.
get_fixed_label_count()

Deprecated alias is gettransformlabelcount.

Return the number of fixed labels.

get_fixed_label_material_at(index)

Deprecated alias is gettransformlabelmaterialat.

Return the material for the fixed label at the given index.

get_fixed_label_matrix_at(index)

Deprecated alias is gettransformlabelmatrixat.

Returns the fixed label matrix.

get_fixed_label_name_at(index)

Deprecated alias is gettransformlabelnameat.

Returns the fixed label name at.

get_fixed_label_plane_at(index)

Deprecated alias is gettransformlabelplaneat.

Gets a new plane for the fixed label.

get_fixed_label_pos_at(index)

Deprecated alias is gettransformlabelposat.

Get the fixed label position at the given index.

get_fixed_label_text_at(index)

Deprecated alias is gettransformlabeltextat.

Returns a string of text for the label at the given index. Each line is separated by the newline character (\n).

To convert a string to list of lines you can do the following,

g = Geometry("label.msr")
text = g.get_fixed_label_text_at(0)
lines = text.split("\n")
ismaterialattributed(material)
Return a flag (TRUE/FALSE) if the material is attributed.
isstrict2dmarker()

Returns true if the Geometry class is enforcing that 2D labels exist on the supplied plane.

This behaviour was introduced with v3.60-03 and can be controlled via the setstrict2dmarker method.

loadmaterialmodelcode(material)
Return the model code (integer) given a material name.
loadmaterialsurveycode(material)
Return the survey code (1-5 char string) given a material name.
loadmaterialsurveytype(material)
Return the survey type (string) given a material name.
loadmaterialvbmcode(material)
Return the VBM code (integer) given a material name.
set2dmarkersat(index, name, plane, material, options, pts)

Set an entire 2D markers element at the given index.

Your plane and pts must be a valid combination. In otherwords, you pts must exist on the supplied plane. A ValueError exception will be thrown if this is not true. This behaviour is new and was introduced in v3.60-03. In order to relax this requirement, and make the Geometry class behave like it used to, call the setstrict2dmarker method with a value of 0 prior to adding markers.

set2dmarkersmaterialat(index, material)
Set a 2D markers element material at the given index.
set2dmarkersnameat(index, name)
Set a 2D markers element name at the given index.
set2dmarkersoptionsat(index, options)
Set a 2D markers element options at the given index.
set2dmarkersplaneat(index, plane)

Set a 2D markers element plane at the given index.

Your plane and pts must be a valid combination. In otherwords, you pts must exist on the supplied plane. A ValueError exception will be thrown if this is not true. This behaviour is new and was introduced in v3.60-03. In order to relax this requirement, and make the Geometry class behave like it used to, call the setstrict2dmarker method with a value of 0 prior to adding markers.

set2dmarkerspointsat(index, pts)

Set a 2D markers element points at the given index.

Your plane and pts must be a valid combination. In otherwords, you pts must exist on the supplied plane. A ValueError exception will be thrown if this is not true. This behaviour is new and was introduced in v3.60-03. In order to relax this requirement, and make the Geometry class behave like it used to, call the setstrict2dmarker method with a value of 0 prior to adding markers.

set2dpolygonat(index, name, plane, material, options, pts)
Set an entire 2D polygon at the given index.
set2dpolygonmaterialat(index, material)
Set the 2D polygon material at the given index.
set2dpolygonnameat(index, name)
Set the 2D polygon name at the given index.
set2dpolygonoptionsat(index, options)
Set the 3D polygon options at the given index.

set2dpolygonplaneat(index, data)

set2dpolygonpointsat(index, pts)
Set the 2D polygon points at the given index.
set2dpolylineat(index, name, plane, material, options, pts)
Set an entire 2D polyline.
set2dpolylinematerialat(index, material)
Set the 2D polyline material at the given index.
set2dpolylinenameat(index, name)
Set a 2D polyline name at the given index.
set2dpolylineoptionsat(index, options)
Set the 2D polyline options at the given index.
set2dpolylineplaneat(index, plane)
Set the 2D polyline plane at the given index.
set2dpolylinepointsat(index, pts)
Set the 2D polyline points at the given index.
set3dmarkersat(index, name, material, options, pts)
Set an entire 3D markers element at the given index.
set3dmarkersmaterialat(index, material)
Set a 3D markers element material at the given index.
set3dmarkersnameat(index, name)
Set a 3D markers element name at the given index.
set3dmarkersoptionsat(index, options)
Set a 3D markers element options at the given index.
set3dmarkerspointsat(index, pts)
Set a 3D markers element points at the given index.
set3dpolygonat(index, name, material, options, pts)
Set an entire 3D polygon at the given index.
set3dpolygonmaterialat(index, material)
Set the 3D polygon material at the given index.
set3dpolygonnameat(index, name)
Set the 3D polygon name at the given index.
set3dpolygonoptionsat(index, options)
Set the 3D polygon options at the given index.
set3dpolygonpointsat(index, pts)
Set the 3D polygon points at the given index.
set3dpolylineat(index, name, material, options, pts)
Set an entire 3D polyline at the given index.
set3dpolylinematerialat(index, material)
Set the 2D polyline material at the given index.
set3dpolylinenameat(index, name)
Set the 2D polyline name at the given index.
set3dpolylineoptionsat(index, options)
Set the 2D polyline options at the given index.
set3dpolylinepointsat(index, pts)
Set the 2D polyline pts at the given index.
setdefaultmaterial(material)
Set the geometry default material name. This does not check if the material exists in the given project's material folder.
setdefaultoptions(options)
Set the geometry default options.
setElemDict(elemDict)
Set the element dictionary. Currently it should only hold label elements.
setmarkersat(index, name, plane, material, options, pts)
Set an entire (3D) markers element at the given index.
setmarkersmaterialat(index, material)
Set a markers element material at the given index.
setmarkersnameat(index, name)
Set a markers element name at the given index.
setmarkersoptionsat(index, options)
Set a markers element options at the given index.
setmarkersplaneat(index, plane)
Set the markers element plane at the given index.
setmarkerspointsat(index, pts)
Set a markers element points at the given index.
set_upright_material_at(index, material)

Deprecated alias is setntranlabelmaterialat.

Set the material for a upright label at the given index.

set_upright_label_name_at(index, name)

Deprecated alias is setntranlabelnameat.

Sets a new upright label name.

set_upright_label_pos_at(index, lpos)

Deprecated alias is setntranlabelposat.

Set the position points, lpos, for an upright label at the given index.

set_upright_label_text_at(index, text)

Deprecated alias is setntranlabeltextat.

Set the text for an upright label at the given index.

setorigin(t)
Set the geometry origin from a 3-tuple of floats.
setpolygonat(index, name, plane, material, options, pts)
Set an entire polygon at the given index.
setpolygonmaterialat(index, material)
Set the polygon material at the given index.
setpolygonnameat(index, name)
Set the polygon name at the given index.
setpolygonoptionsat(index, options)
Set the polygon options at the given index.
setpolygonplaneat(index, plane)
Set the polygon plane at the given index.
setpolygonpointsat(index, pts)
Set the polygon points at the given index.
setpolylineat(index, name, plane, material, options, pts)
Set an entire polyline at the given index. Use None for the plane to set it to 3D.
setpolylinematerialat(index, material)
Set the polyline material at the given index.
setpolylinenameat(index, name)
Set the polyline name at the given index.
setpolylineoptionsat(index, options)
Set the polyline options at the given index.
setpolylineplaneat(index, plane)
Set the polyline plane at the given index.
setpolylinepointsat(index, pts)
Set the polyline pts at the given index.
setstrict2dmarker(yesNo)

Starting in v3.60-03 the Geometry class requires that the points supplied for a 2D label exist on the supplied plane.

In previous versions this restriction was not enforced. By suppling false (0) to this method for the yesNo argument, you will cause the Geometry class to no longer enforce that the points for a label exist on the supplied plane.

set_forward_label_material_at(index, material)

Deprecated alias is setsemitlabelmaterialat.

Set the material for a forward label at the given index.

set_forward_label_name_at(index, name)

Deprecated alias is setsemitlabelnameat.

Sets forward label's name.

set_forward_label_pos_at(index, lpos)

Deprecated alias is setsemitlabelposat.

Set the position points, lpos, for a forward label at the given index.

set_forward_label_text_at(index, text)

Deprecated alias is setsemitlabeltextat.

Set the text for a forward label at the given index.

setshellat(index, name, material, options, pts, faces)
Set an entire shell at the given index.
setshellfacesat(index, faces)
Set the shell faces at the given index.
setshellmaterialat(index, material)
Set the shell material at the given index.
setshellnameat(index, name)
Set the shell name at the given index.
setshelloptionsat(index, options)
Set the shell options at the given index.
setshellpointsat(index, pts)
Set the shell points at the given index.
set_fixed_label_material_at(index, material)

Deprecated alias is settransformlabelmaterialat.

Set the material for a fixed label at the given index.

set_fixed_label_matrix_at`(index, matrix)

Deprecated alias is settransformlabelmatrixat.

Sets a new matrix for the fixed label.

set_fixed_label_name_at(index, name)
Deprecated alias is settransformlabelnameat.
set_fixed_label_plane_at(index, plane)

Deprecated alias is settransformlabelplaneat.

Sets a new plane for the fixed label.

set_fixed_label_pos_at(index, position)

Deprecated alias is settransformlabelposat.

Set the fixed label position at the given index.

set_fixed_label_text_at(index, text)

Deprecated alias is settransformlabeltextat.

Sets the text for the fixed label.

storematerialattributed(material, isOn)
Set the material attributed flag on (isOn=1) or off (isOn=0).
storematerialmodelcode(material, data)
Set the model code (non-negative integer) for a material.
storematerialsurveycode(material, data)
Set the survey code (1-5 char string) for a material.
storematerialsurveytypetoboundary(material)
Set the material survey type to Boundary.
storematerialsurveytypetobreakline(material)
Set the material survey type to Breakline.
storematerialsurveytypetopoint(material)
Set the material survey type to Point.
storematerialvbmcode(material, data)
Set the VBM code (non-negative integer) for a material.
storeresource()
Writes the contents of the Geometry object out to the file. Think of it as applying your changes.

Functions

create(path)

Alias is creategeometry.

Creates and returns a new Geometry object (MSR) at the given path.

create_or_open(path)

This will create a new Geometry object (MSR) at the given path if there is no file already at the path. Otherwise it will open the existing Geometry object (MSR) at the given path.
shiftPlane(plane, vector)

Shifts the input plane by the vector supplied and returns the shifted plane.

This is a helper function designed to make it easier to shift single planes without having to supply the plane coefficients to the ag.shiftPlane function. This function performs the expansion of the coefficients into individual arguments for you.

validatepointlist(pointlist)

Verifies the point list is properly formed. Raises exception if not.

Properly formated floating point list is of the form,

[[x0, y0, z0], [x1, y1, z1], ..., [xN, yN, zN]]

and for backward compatibility,

[(x0, y0, z0), (x1, y1, z1), ..., (xN, yN, zN)]

where x, y, and z must be floats.

isgeometryfile(path)

Returns 1 if the path points to a valid geometry file.

ElemDict Class

class ElemDict()

ElemDict is a data structure that keeps elements organized by their optional gridString and optional name values.

add(gridString, name, material, elem)

Add a new label element to the element dictionary. The elem is an Elem class object. gridFilter is a string that represents the plane the label is found on. Use geometry.getPlaneString() above to convert a plane to a gridString.

Warning

elem is not 'copied'. Changing the elem after this call will change the elem in the ElemDict. Make your own copy of elem if that is what you want.

getAt(index)
Returns the index'th element in the element dictionary.
getCount()
Returns the number of elements found in the element dictionary.
getElemAt(gridString, name, index)
Returns the index'th element with a given gridString and name value.
getElemCount(gridString, name)
Returns the number of elements with a given gridString and name.
getFilterCount()
See getGridCount().
getFilterDict()
See getGridDict().
getGridCount()
Returns the number of grids in the element dictionary.
getGridDict()
Returns the grid dictionary. Key is the gridString. Value is a dictionary of name -> element arrays.
getNameCount(gridString)
Returns the number of names use in this gridString dictionary.
getNameDict(gridString)
Returns the name dictionary. Key is the name. Value is an array of Elems.

Elem Class

class Elem()

Elem is a data structure that defines an element. Currently only label elements.

appendLabelLine(string)
Add a new string to a label element.
getFilterPlane()
See getGridPlane().
getGridPlane()
Returns the grid plane normal.
getLabelAlignmentBlock()

Returns the block alignment for the label. The block is defined by the total dimensions of the label's lines. Longest line of text defines the width of the block and the number of lines defined the height of the block.

The origin point is located within this label block by this value.

Returns one of the following.

Elem.labelAlignmentBlockINHERIT
Elem.labelAlignmentBlockTL
Elem.labelAlignmentBlockTC
Elem.labelAlignmentBlockTR
Elem.labelAlignmentBlockML
Elem.labelAlignmentBlockMC
Elem.labelAlignmentBlockMR
Elem.labelAlignmentBlockBL
Elem.labelAlignmentBlockBC
Elem.labelAlignmentBlockBR

INHERIT means that the alignment is taken from the object's properties or the object material's properties.

T, M, B stand for Top, Middle, and Bottom

L, C, R stand for Left, Center, and Right

getLabelAlignmentLine()

Returns the line alignment for the label. A label is composed of one or more lines. The longest line defines the width of the block. All the other shorter lines are then aligned with this longer line.

Returns one of the following.

Elem.labelAlignmentLineL
Elem.labelAlignmentLineC
Elem.labelAlignmentLineR

L, C, R stand for Left, Center, and Right

getLabelColor()

Returns the label color as a [r, g, b] list. r, g, b is a value between 0.0 and 1.0

Call isLabelColored() first to see if there is something valid to read.

getLabelFont()
Returns the label font as a unicode string. This can be "" to indicate it was not set.
getLabelFontSize()

Returns the label font size.

0 result means it is not set.

Call isLabelRelativeSized() to see if the value is a % or physical unit size.

getLabelOUR()

Returns the OUR (Origin, Up, and Right) triangle as a [[oe, on, oz], [ue, un, uz], [re, rn, rz]] list.

These values are relative to getOrigin(). In other words, [oe, on, oz] is always [0, 0, 0] and [ue, un, uz], [re, rn, rz] are unit distance away from [0, 0, 0].

getLabelLineCount()
Returns the number of lines in the label.
getLabelLine(indexOfLine)
Returns the line of text as a unicode string.
getLabelSpacing()

Returns the label character spacing.

Returns one of.

Elem.labelSpacingPROPORTIONAL
Elem.labelSpacingMONOSPACE
Elem.labelSpacingMONOSPACE_NUMBER

The difference between MONOSPACE and MONOSPACE_NUMBER is that MONOSPACE will space every letter by the widest character in the font. Which is usually 'W'. MONOSPACE_NUMBER will space every letter by the widest number character in the font. So writing out wider characters like 'W' may over- lap near by letters when used.

getLabelType()

Returns the label type.

Returns one of.

Elem.labelTypeNONE
Elem.labelTypeFIXED
Elem.labelTypeFORWARD
Elem.labelTypeUPRIGHT

NONE should never happen. If it does something has gone wrong somewhere.

getMaterial()
Returns the material name as a unicode string.
getMsrFilter()
See getMsrGridString().
getMsrGridString()
Returns the gridString used for the MSR file. In general this should amount to be the same as getGridString(). Yes, there is duplication here but Elems are based off of an internal structure in MS3D and this structure may be the basis of a new file format in the future.
getMsrMaterial()
Returns the material name as an ASCII string. Should be the same value as getMaterial() but ASCII.
getMsrName()
Returns the name of the element as an ASCII string. Should be the same value as getName() but ASCII.
getName()
Returns the name of the element as a UNICODE string.
getOrigin()
Returns the origin point of the element. This is in actual coordinates returned as an [e, n, z] list.
getType()
Returns the type of the element. Currently it should ever only return Elem.typeENH_LABEL.
isFilterPlane()
See isGridPlane().
isGridPlane()
Returns True if the grid is a plane.
isLabelFixedAndLocked()
Returns True if the label is of Elem.labelTypeFIXED and is locked. Which means that the label will not flip when viewed from behind or upside-down. This is only applicable for Fixed labels.
isLabelFontBold(),
Returns True if the label font is Bold.
isLabelFontItalic()
Returns True if the label font is Italic.
isLabelColored()
Returns True if the label has a color that overrides the object or object material label color.
isLabelRelativeSized()
Returns True if the size value from getLabelSize() is actually a % value instead of a real world unit value.
setFilterPlane(planeNormal)
See setGridPlane().
setGridPlane(planeNormal)
Set the plane normal. Provided as just the normal as [e, n, z] list. This normal in conjunction with the origin point for the element defined the plane the element lives on.
setIsLabelFixedAndLocked(value)

Set a Fixed label to be also locked. A locked fixed label will not flip the label when viewed from behind or upside-down.

Call setLabelType(Elem.labelTypeFIXED) before calling this function.

setIsLabelColored(value)
Pass in True if you want the label to override the object or object material label color.
setLabelAlignmentBlock(value)

The block is defined by the total dimensions of the label's lines. The longest line of text defines the width of the block and the number of lines defined the height of the block.

The origin point is located within this label block by this value.

value is one of the following.

Elem.labelAlignmentBlockINHERIT
Elem.labelAlignmentBlockTL
Elem.labelAlignmentBlockTC
Elem.labelAlignmentBlockTR
Elem.labelAlignmentBlockML
Elem.labelAlignmentBlockMC
Elem.labelAlignmentBlockMR
Elem.labelAlignmentBlockBL
Elem.labelAlignmentBlockBC
Elem.labelAlignmentBlockBR

INHERIT means that the alignment is taken from the object's properties or the object material's properties.

T, M, B stand for Top, Middle, and Bottom

L, C, R stand for Left, Center, and Right

setLabelAlignmentLine()

A label is composed of one or more lines. The longest line defines the width of the block. All the other shorter lines are then aligned with this longer line.

value one of the following.

Elem.labelAlignmentLineL
Elem.labelAlignmentLineC
Elem.labelAlignmentLineR

L, C, R stand for Left, Center, and Right

setLabelColor(value)
Set the label color. value is [r, g, b] list where r, g, b is a value between 0.0 and 1.0
setLabelFont(value, isBold, isItalic)

Set the label font.

value is a name of the font as a unicode string. The name is what you would see in the font selector inside MineSight 3D.

isBold and isItalic sets the flags to render this font in it's bold and/or italic configuration.

setLabelFontSize(value, isRelative)

Set the label font size.

If isRelative is True then the value defines a % between 0.0 and 100.0; otherwise value defines a world unit value.

Setting value to 0.0 will cause the label to be sized by the object or object material label size value.

setLabelOUR(O, U, R)

Set the label Origin, Up, and Right values.

O will always be [0, 0, 0].

U and R are 1 unit away from O.

setLabelSpacing(value)

Set the character spacing for the label.

value is one of.

Elem.labelSpacingPROPORTIONAL
Elem.labelSpacingMONOSPACE
Elem.labelSpacingMONOSPACE_NUMBER

The difference between MONOSPACE and MONOSPACE_NUMBER is that MONOSPACE will space every letter by the widest character in the font. Which is usually 'W'. MONOSPACE_NUMBER will space every letter by the widest number character in the font. So writing out wider characters like 'W' may over- lap near by letters when used.

setLabelType(value)

Set the label type.

value is one of.

Elem.labelTypeFIXED
Elem.labelTypeFORWARD
Elem.labelTypeUPRIGHT
setMaterial(value)

Set the element level material as a unicode string.

Call setName() first.

setMsrFilter(value)
See setMsrGridString().
setMsrGridString(value)

Set the MSR element gridString.

This value is set when you call ElemDict.Add()

setMsrMaterial(value)

Set the MSR element material. Same as the element material via setMaterial() but set as an ASCII string.

Call setMsrName() first.

This value is set when you call ElemDict.Add()

setMsrName(value)

Set the MSR element name. Same as the element name via setName() but set as an ASCII string.

This value is set when you call ElemDict.Add()

setName(value)
Set the element name as a unicode string.
setOrigin(value)
Set the origin point for the element. This is in world coordinats as a [e, n, z] list.

Data

MAX_LABEL_LEN

Maximum length for a label. In actual fact labels will be MAX_LABEL_LEN -1.

Exception

GeometryError
Error for geometry module.

Reference

[1]Foley, James D., et al. Computer Graphics: Principles and Practice in C. 2nd Edition. Boston: Addison Wesley, 1995.