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.

Create a simple custom shading:

  1. Select the gear icon next to the Shading dropdown. This opens the configuration dialog.

  2. Press the blue plus icon to add a new shading set.

  3. Rename the shading to "Grade".

  4. Drop down the Shading Field and select “Reserves: DryTonnes.FE”.

  5. In the Values table, enter cutoff grades (such as 52,54,56,58,60) and assign a colour to each interval.

  6. Press OK to accept.

Simple shading set on Fe grade

 

Blasts shaded by average Fe grade (all materials)

 

Create a complex blast shading:

  1. Select the gear icon next to the Shading dropdown. This opens the configuration dialog.

  2. Press the blue plus icon to add a new shading set.

  3. Rename the shading to "Data Source".

  4. Click the Complex tab to open the code editor.

  5. Paste in the sample code below.

  6. Press OK to accept.

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.N("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