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.

...

To add a new constraint:

...

In Designer tab go to Display panel, Block Models section. Press gear icon located on the right from Constraints dropdown.

...


Table of Contents
Image Added

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

  3. Rename the

...

  1. constraint to "HG

...

  1. only".

  2. Paste the sample formula into the code editor.

...

Double click in the Available Formulas for code hints.

...

Press OK to finish.

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

  2. Fix any errors detected, run the test again, and press OK to accept.

Image Added

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

...

Image Added

8. Select Stage(s)/Bench(es) from the tree on the left to display them in the viewport and review the result.

Image Added

Colors assigned for block shading can be seen in the Legend (bottom right, below the viewport).

Image Added

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 ;
	}
}
Image Added

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 ;
	}
}
Image Added

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;
		
	}
		
}

Image Added


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;
		
	}
		
}

Image Added