Polygonica provides a range of advanced functionality for automating the process of reducing, tidying, manipulating and managing the huge amounts of incoming real-world data from the frequent and regular scans performed by asset owners and operators.
In this blog we focus on using Polygonica’s robust Boolean algorithm to perform simulations of the material removal process on a digital terrain model (DTM). Fans of the MachineWorks SDK for CNC material-removal simulation will no doubt notice the similarities.
In order to keep customer data confidential, the demonstrator and accompanying data used in this blog have been created internally by the Polygonica team, and are (obviously) not real-world LIDAR data.


Healing and decimation
LIDAR data from terrain scans is large, dense and noisy. Producing a usable mesh can be problematic. Polygonica provides a range of tools for mesh decimation, smoothing and healing that excel in both user-guided and automatic workflows.
Polygonica’s best-in-class mesh healing was initially developed more than two decades ago to meet the exacting demands of the high-precision CNC subtractive manufacturing industry. During the last fifteen years it has been further tested, refined and improved to meet the requirements of advanced mesh workflows driven by the burgeoning additive manufacturing market. It provides the perfect tool for automatically turning a poor quality mesh into a watertight, manifold surface, free from self-intersections.
Also developed to meet the demands of high tolerance manufacturing, Polygonica’s mesh decimation algorithms can work to a specified tolerance, such that the resulting mesh is guaranteed to be within the specified distance of the original. Many options are provided, such as preservation of surface boundaries marking, for example, regions of different materials, and outside faceting, which guarantees the decimated mesh lies outside the original - very useful in conservative clash-detection workflows.
Sometimes it is necessary to decimate meshes that are too large to fit into available RAM. Polygonica's decimation offers an out-of-core mode, where the mesh is loaded in chunks from disk and simplified in stages, until the final mesh is small enough to load into physical memory.
Finally Polygonica’s unique edge boundary tidying and tangential boundary extension can be used to cleanly extend a scanned surface so that trimming and clipping by other meshes can be more easily achieved.



Leveraging Polygonica’s 2D operations
Polygonica provides a range of fast and optimized operations for working with 2D polylines, including slicing for creating planar polylines from a mesh, and reconstruction which creates a mesh from a stack of polylines. In 2D itself Polygonica offers a range of functionality including healing, decimation, Minkowski sum offsetting, inflate/dilate, Booleans and medial axis. If required example code can be provided to perform a range of hatch and infill operations.
The mine schedule is a series of ‘benches’ at different ‘levels’ or depths. These can be represented by a mesh solid showing the volume of material that must be removed to create the bench at the relevant depth, or more simply by a series of 2D curves, or slices, each with an associated depth.
In order to provide a 3D material removal simulation, the 2D curves must be correctly extruded into mesh solids, so they can then be successively subtracted from the original digital terrain model. This can be done easily with Polygonica’s functionality to create multi-axis sweeps of 2D profiles along a vector.
More difficult is correctly reconstructing solids from curves which include representations of bench levels along with sloping ramps, which in turn sometimes have branches. Again, Polygonica provides functions such as ruled surface joining and mesh closing that makes creation of solids from these complex representations much easier.


Fast and robust 3D mesh Booleans
Once a representation of the volume of material that is to be removed during a scheduled operation or timeframe has been created, Polygonica’s 3D mesh Boolean can be used to subtract the volume from the surrounding mesh that represents the current state of the excavation at a particular time, t.
Successive subtractions can be used to provide an animation showing the planned, or actual, sequencing of the material removal process over time. At each point Polygonica provides a high-quality explicit mesh representation of the surface as it is at the point in the mining sequence, which can be used for clash detection in scheduling activities such as haulage simulation, which models the arrival of empty transports into the mine and the flow of material away from the mine.





Dealing with gaps using offset
It can often be the case that the boundaries between adjacent planned, or actual, material removal operations are not quite coincident. In such cases very thin sliver geometry is likely to be left following Boolean subtractions. Whilst the presence of such geometry could indicate an error in the planning or measurement process, it is more likely to be a result of slight differences in modelling coordinates that would not occur in the real world.
Polygonica offers a number of solutions to mitigate such issues, in both 2D and 3D. In the 2D case, Polygonica’s 2D offset can be used to slightly offset the profile before extrusion, so the subsequently created volumes overlap. In 3D a range of operations are available, from anisotropic offset, which can be used to extend the solid in x/y, with minimal extension in Z, to gluing, which is designed to mate two adjacent surfaces such that no gaps are left when a Boolean operation occurs.


Using Polygonica to clean underground tunnel scans
Polygonica provides a wide range of mesh operations for resource extraction and other geotechnical workflows. One example is the effective use of shrinkwrap to automatically remove internal artefacts picked up by scanners operating inside underground tunnels, to give an accurate, in-tolerance, mesh of the surface of the tunnel walls. For more information go to Tidying Tunnel Scans Using Polygonica’s shrinkwrap.
To see a demonstration of Polygonica's functionality for mine excavation and terrain healing please check out the following videos. If you'd like to learn more, or to evaluate Polygonica, please don't hesitate to get in touch.




