RR. Block Model Custom Constraints
Constraints may be used to hide parts of the block model based on some criteria, such as material type or grade threshold.
Creating Custom Block Model Constraint
Select the gear icon next to the Constraints dropdown. This opens the Configure Constraints dialog.
Press the blue plus icon to add a new constraint.
Rename the constraint to "HG only".
Paste the sample formula into the code editor.
Press the Test button to make sure your code is correct. Any errors found will be shown in the Errors panel and won’t let you to proceed.
Fix any errors detected, run the test again, and press OK to accept.
7. In the Block Model panel on the right, toggle eye icon to show blocks and from the Constraints dropdown select the blocks constraint you have created - HG only (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).
Block Model Constraints Examples
Show only HG
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Alastri.RR.Ui;
using Alastri.RR.Service;
public class CustomBlockConstraint : IBlockConstraint
{
public bool IsVisible(BlockContext context)
{
if (context.T("Parcel") == "hg")
{
return true ;
}
return false ;
}
}
Show specific materials (parcels)
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Alastri.RR.Ui;
using Alastri.RR.Service;
public class CustomBlockConstraint : IBlockConstraint
{
public bool IsVisible(BlockContext context)
{
if (context.T("Parcel") == "hg" || context.T("Parcel") == "mg")
{
return true ;
}
return false ;
}
}
Filter by Fe (more than specific grade)
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Alastri.RR.Ui;
using Alastri.RR.Service;
public class CustomBlockConstraint : IBlockConstraint
{
public bool IsVisible(BlockContext context)
{
if (context.N("DryTonnes.FE") >= 57.5)
{
return true;
}
return false;
}
}
Â
Filter by Fe and Al
Â
Â