Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Tip

Constraints may be used to hide parts of the block model based on some criteria, such as material type or grade threshold.


Table of Contents

Creating Custom Block Model Constraint

  1. Select the gear icon next to the Constraints dropdown. This opens the Configure Constraints dialog.

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

  3. Rename the constraint to "HG only".

  4. Paste the sample formula into the code editor.

  5. 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.

  6. 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

Code Block
languagec#
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)

Code Block
languagec#
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)

Code Block
languagec#
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

Code Block
languagec#
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 && context.N("DryTonnes.AL") >= 1.0)
		{
			return true;
    	}
		return false;
		
	}
		
}