grail.ms3d.highlights Module

Version: 16.2

Note

New in version 7.00

Table of Contents

Overview

This module contains functions for inserting "Virtual Elements" into the MineSight Viewer window, allowing one to effectively "highlight" existing elements, or create new "highlights" at arbitrary positions.

Note that all virtual elements created by this moudle can also be cleared and/or saved through the Virtual Elements menu in MS3D.

Definitions

See grail.ms3d.element for the definitions of Point, Point List and Face List.

Functions

All add_* functions return a token that can be passed to clear to remove the new virtual element.

add_marker(point)
Add a virtual marker.
add_polyline(pointList)
Add a virtual polyline.
add_polygon(pointList)
Add a virtual polygon.
add_shell(pointList, faceList)
Add a virtual shell.
from_element(element)

"Highlight" an existing element by creating a virtual element at the exact same position. Returns a token just like the add_* functions, which can be used to remove the new virtual element.

Element must be an object of class Element (see grail.ms3d.element). Also note that only Markers, Polylines, Polygons, Shells and Labels are supported. Passing any other sort of element to this function will result in a ValueError.

Labels are treated specially in that a marker is insterted at the centre of the label, rather than a virtual label of the same dimensions being inserted.

clear(token):
Clear a virtual element. Token is the object returned from one of the add_* functions or from_element.
clear_all():
Clear all the virtual elements created by this module.
set_color(r, g, b):
Set the color of the virtual elements created by this module. r, g, and b must be numbers between 0.0 and 1.0 (inclusive).
set_weight(weight):
Set the displayed weight of the virtual elements created by this module. weight must be a positive number. 1.0 is the normal weight, so for example passing a value of 5.0 to this function would make all elements created by this module five times heavier than normal.