Object
The following table describes the tools in the Object section of the Edit tab.
| Tool | Description | ||
| Join and Close | Used to connect across gaps in lines, to merge common boundaries between different surfaces and cap open ends of surfaces. | ||
| Explode |
|
||
| Fill | Used to fill a polygon object with a solid colour. | ||
| Unfill | Used to remove solid fill from a polygon object. | ||
| Simplify Line | Removes excess points while retaining the shape of a line. | ||
| Subdivide Edge | Inserts points along a line at equal intervals. | ||
| Point Z from Attribute | Displays a selected attribute as height (point z). | ||
| Script | Used to write Java scripts for analysis of point data. |
Join and Close
Lines
-
Select points around the gap(s) to be joined. The closest end points of the selected points will be joined together.
-
Go to Edit > Object > Join and Close.
If the end points were not correctly joined, select the end points to connect using the point selection mode and run the option again.
The following example shows contours with removed edges. After the close lines option is run on the point selection, the edges are reconnected.
Surfaces
-
Select points around the region to be merged or capped, otherwise select the entire surface(s) to carry out all steps together, producing a single closed object . Create > Surface > Loop triangulation can be used with this function to complete the merging process.
-
Select Edit > Object > Join and Close.
The following example combines with the function at Create > Surface > Loop triangulation to merge and cap three separate hollow surfaces.
Two open surfaces selected (representing sections of a mine tunnel) with a gap between the opening to be joined .
Create > Surface > Loop triangulation creates a joining piece (coloured orange in this example) between the first two surfaces. There are three separate surfaces now, in contact along two common boundaries.
The function firstly identifies where the three surfaces are in contact and merges them into one surface.
The function continues by capping the ends of the selected surfaces. The result is a single closed solid surface.
The original surfaces were merged along common boundaries and the open ends capped.
Explode
By Geometry
The Explode by Geometry option breaks apart disjoint components of edge networks and triangulations into separate objects.
The object below, on the left consists of two arrows. Once exploded, each arrow is a single object.
To break the object apart into separate objects:
-
Select the object to be exploded.
-
Go to Edit > Object > Explode > By Geometry. The action is carried out immediately on the object.
A container is created with the multiple objects stored inside.
By Attribute
The Explode by Attribute option breaks apart single objects (points) into multiple objects.
To explode by attribute:
-
Select an object.
-
Go to Edit > Object > Explode > By Attribute.
-
A panel will open allowing you to select an attribute. Press OK or Apply to continue. Press Cancel to quit the process.
A container is created with the multiple objects stored inside.
Fill
To fill a polygon with a solid colour:
-
Select the object(s).
-
Go to Edit > Object > Fill or right-click and choose Edit > Fill from the context menu and the polygon will be filled with a solid colour corresponding to the colour currently on the colour palette.
Unfill
Edit > Object > Unfill allows the selected polygon object to be reverted to an unfilled object.
To unfill an object:
-
Select the object(s).
-
Choose Edit > Object > Unfill or right-click and choose Edit > Unfill from the context menu.
Simplify Line
To use the Simplify Line tool:
-
Go to Edit > Object > Simplify line. This will open a new panel.
-
Enter a Filter distance. This specifies a maximum distance deviation from the line for which points are retained. As the distance gets smaller, more points are retained and fewer are removed from the line.
Simplified objects can be recovered using the Undo option.
Subdivide Edge
To use the Subdivide Edge tool:
-
Go to Edit > Object > Subdivide Edge. A new panel will open.
-
Choose one of the following options:
-
Subdivisions per edge— Choose this option if you want to specify the number of equal subdivisions to split the selected edges in to. An edge is a line segment, and the connection between two points. A subdivision of 2 will insert one point midway along each edge in the selection. A single edge within a line can be selected using edge selection mode.
-
Number of result edges — Choose this option if you want to specify new points on the line. For example setting the option to 2 would make a point half way at each segment.
-
-
Click OK or Apply to accept the subdivision
Objects can be recovered using the Undo option.
Point Z from Attribute
The Point Z from Attribute tool is used to display a selected attribute as height. This may be useful for visualising the selected attribute. One example usage would be setting the height of contours imported from Shapefiles which have a height property.
To use the tool:
-
Go to Edit > Object > Point Z from Attribute. This will open a new panel.
-
Select the objects.
-
Select the Attribute to be displayed as height from the Attribute drop-down list.
-
Select OK. The selected attribute is displayed in the View window as height.
Script
Script editor is used to write Java scripts for analysis of point data. This may be useful for analysing .dfn data such as gravity and magnetic data.
Scripts operate on point objects. An object must be selected for the script to work.
-
Go to Edit > Object > Script. This will open a new panel.
-
Write the required script in the top window.
-
Enter the location to save the script in the Script field.
-
The debugging window displays the changes the script will make to the selected data.
-
Press the Test script button to show the changes the script will make in the debugging window.
-
When complete, press Apply script to selection to run the script.
Scripting in Vulcan GeologyCore follows the JavaScript syntax.
Point Script
The Object/Script option allows a simple Java script to be created to add or edit point attributes and adjust colouring.
Note: More advanced data manipulation, using Python code, is available through the Online Python SDK Help.
The following is an example of a script to create a gold topcut field in a set of sample points and then adjust point visibility to display only points with positive grade values:
/*1 define topcut value*/
var topcut = 20;
/*2 add new variables*/
p.au_cut = -999;
/*3 calculate variable*/
if (p.au > topcut)
{
p.au_cut = topcut;
}
else
{
p.au_cut = p.au;
}
/*4 replace blank values with default*/
if (isNaN(p.au_cut))
{
p.au_cut = -999;
}
/*5 make default values invisible*/
if (p.au_cut < 0)
{
p.Visible = false;
}
else
{
p.Visible = true;
}
1. Setting temporary variable
The var keyword will create a locally scoped variable which will last for the processing of a single point. This avoids having to create attributes which will only be needed for a single operation. JavaScript variables are dynamically typed, meaning the data type does not need to be specified.
Example: To define a topcut value of 20
var topcut = 20;
2. Adding and Deleting variables
To add a new variable, set the default value.
Example: To add au_cut field to samples
p.au_cut = -999;
Note: The samples can be created using the Split by length modifier in the Domain Manager and the Point Extract tool.
This must be done outside of any guards, such as if or while statements, since it will need to be applied to every point before processing. It's also recommended to declare any new variables at the top of your script.
To delete, use the Delete macro. Since the delete macro is applied to the entire dataset at once, we needn't use the 'p.' namespace.
Delete(myAttribute);
The scripting tool currently provides functionality to query and change point details on points in objects.
Main functionality offered:
-
Create filters using range/intensity/x/y/z details
-
Create colouring tools using range intensity/x/y/z details
Example 1. Hide points by RL
This will hide points that are higher than TopRL threshold and lower than BottomRL threshold.
var TopRL = 350;
var BottomRL = 50;
if (p.Z < BottomRL) {p.Visible = false;}
else if (p.Z > TopRL) {p.Visible = false;}
else {p.Visible = true;}
Example 2. Filter by colour
This script will filter points that are a certain colour.
if (p.Red==255 && p.Green==0 && p.Blue==0){
p.Visible = true; } /*Filters points that are Red*/
else {p.Visible = false; }
Example 3. Filter by colour range
This script will filter points that fall below/above a range of RGB values.
if (p.Red<150 && p.Green<150 && p.Blue>100){
p.Visible = false; } /*Filters points which are mostly blue (low intensity if spectrum coloured)*/
else {p.Visible = true; }
Example 4. Vertical exaggeration and flattening
This example will move points in the same way vertical exaggeration works. There is a toggle there that will allow flattening of all points to a single level.
var FlattenFactor = 10;
var FlattenToLevel = false;
/*Set FlattenToLevel as true if you want all
points to end up at RL=FlattenFactor.
Set FlattenToLevel as false if you want to
have a vertical exaggeration effect.
Set a number for FlattenFactor then to be the
final RL, or scale of vertical exaggeration.*/
if(FlattenToLevel){
p.Z=FlattenFactor;
}else{
p.Z=p.Z*FlattenFactor;
}
3. Populate variable from a conditional formula
Note that variable names containing spaces can be called with the notation p[“<variable>”].
For example: LENGTH = p[“Bottom Depth”] – p[“Top Depth”]
if (p.au > topcut)
{
p.au_cut = topcut;
}
else
{
p.au_cut = p.au;
}
4. Set missing values to a default
If the referenced point is out of bounds and does not refer to a point in the dataset, any attributes will return a NaN value. This can be checked by using the built-in isNaN function. For example:
if (isNaN(p.au_cut))
{
p.au_cut = -999;
}
5. Visibility
Visible is a built-in attribute which can be used to change the visibility of a point, and is useful for filtering operations. It is used to hide points that have default value for grade. The Visible attribute can be set to 'true' or 'false'. For example:
if (p.au_cut < 0)
{
p.Visible = true;
}
else
{
p.Visible = false;
}
Note: The visibility can later be adjusted with the Query and Filter, Attributes, and Show all options.
p.Red, p.Green, p.Blue
The colour of a point can be changed by adjusting the colour values by setting the Red, Green and Blue attribute values of the required point. The RGB values can be set from 0-255 and will return >255 if they are out of bounds.
p.X, p.Y, p.Z
The 'X', 'Y', 'Z' properties allow the spatial coordinates for the current point to be adjusted.
Square bracket notation (p['attribute name'])
The square bracket notation allows attribute values to be accessed using a string value. Attributes with names which do not comply with JavaScript syntax must be accessed using square bracket notation.