RR. Blast Custom Shading
In the Designer tab in Display panel locate Blast section and press Shading dropdown: there is a preloaded list of automatic shadings for the level hierarchy and reserves fields. We can add to this list by configuring custom shading sets.
Creating a simple custom shading
Select the gear icon next to the Shading dropdown. This opens the configuration dialog.
Press the blue plus icon to add a new shading set.
Rename the shading to "Grade".
Drop down the Shading Field and select “Reserves: DryTonnes.FE”.
In the Values table, enter cutoff grades (such as 52, 54, 56, 58, 60) and assign a colour to each interval.
Press OK to accept.
7. In the Blasts/Digs panel on the right, from the Shading dropdown select the blasts shading you have created - Grade (Note that custom shadings are shown in bold orange, while standard shadings are shown in normal black).
8. Select Stage(s)/Bench(es) from the tree on the left to display them in the viewport and review the result.
Colors assigned for block shading can be seen in the Legend (bottom right, below the viewport).
Creating a complex blast shading
Select the gear icon next to the Shading dropdown. This opens the configuration dialog.
Press the blue plus icon to add a new shading set.
Rename the shading to "Data Source".
Click the Complex tab to open the code editor.
Paste in the sample code below.
Press OK to accept.
Shadings codes examples
Data Source Shading Sample
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.Linq;
using Alastri.RR.Ui;
using Alastri.RR.Service;
public class CustomBlastShading : IBlastShading
{
public Color GetColor(ShadingContext context)
{
string dataSource = context.ReservesDataSource.ToString();
bool excluded = context.IsExcluded;
if(excluded) return Color.DarkOrchid;
else if(dataSource == "GradeControl") return Color.BurlyWood;
else if(dataSource == "BlockModel") return Color.BlanchedAlmond;
else return Color.Red;
}
}
Tonnes Check
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.Linq;
using Alastri.RR.Ui;
using Alastri.RR.Service;
public class CustomBlastShading : IBlastShading
{
public Color GetColor(ShadingContext context)
{
double tonnes = context.GetReserveValue("DryTonnes");
if(tonnes > 0) return Color.BlanchedAlmond;
else return Color.Red;
}
}
Ore / Waste Shading
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.Linq;
using Alastri.RR.Ui;
using Alastri.RR.Service;
public class CustomBlastShading : IBlastShading
{
static List<string> oreParcels = new List<string> { "hg", "mg", "lg" };
public Color GetColor(ShadingContext context)
{
bool containsOre = false;
bool containsWaste = false;
foreach(string parcel in context.GetParcels())
{
if(oreParcels.Contains(parcel))
{
containsOre = true;
}
else
{
containsWaste = true;
}
}
if(containsOre && containsWaste) return Color.Yellow;
else if(containsOre) return Color.Red;
else return Color.Gray;
}
}
Contour Colour Gradient