5. Clipping, Cutting, Merging and Extracting¶
5.1. Functions and Limitations¶
AthosGEO View is a viewer in the first place. In
it was described how attributes can be manipulated. In this current chapter it
will be about geometric manipulations of both block models and surfaces
such as topos.
Three types of manipulations will be described:
Extracting parts of a geometry
And the most complex subject: clipping and cutting geometries with other geometries
5.2. Extracting Parts of a Block Model or a Triangulated Surface¶
Extracting parts of a geometry is done in two steps:
First, select the parts to be extracted. Selections are a science in it’s own, so they are handled in an own chapter here: Section 6.
Second, use the Extract Selection filter
5.3. Merging Geometries¶
There are two filters that allow the merging of geometric objects, that are applicable depending on the input data type. In order to apply one of these two filters, we need to select the geometric objects to be merged in the Pipeline Browser, as shown in Fig. 5.9.
Once a number of items are selected, the following two filters can be activated from the Filters → Alphabetical menu, depending on the VTK data or geometry types of the input data items:
The Information panel is providing information about the VTK data or geometry type of a selected pipeline browser item.
5.3.1. Append Geometry¶
If all input items are of type Polygonal Mesh, it is possible to generate one merged polygonal mesh with the Append Geometry filter: see Fig. 5.10.
5.3.2. Append Dataset¶
If one or several of the input pipeline browser items are of type Unstructured Grid, then the Append Dataset filter is able to merge these items into one single unstructured grid: see Fig. 5.11.
To some degree, Unstructured Grid items can be “converted” into Polygonal Mesh items with the Extract Surface filter, but the result will not be a 1:1 equivalent. If the input unstructured grid is e.g. a block model, the output polygonal mesh will be a surface that represents the hull of the block model, without the volume filling.
5.3.3. Finalizing merged items¶
If merged surfaces or block models are actually adjoining each other, the merging process should be completed with the application of one of the Cleaning filters:
The Clean filter is for Polygonal Mesh data. Apply it in order to e.g. merge coinciding points at the boundary between the previously merged geometries
The Clean Cells to Grid filter does the same thing for Unstructured Grid objects like block models
The Clean to Grid filter does basically the same thing, but it will always generate an Unstructured Grid as output.
5.4. Clipping and Cutting¶
Clipping and cutting block models and surfaces are more complex operations, with different filters doing a similar job, but with a different focus. The following sections will deal with them in an order that is based on typical use cases:
Generic clipping of block models or surfaces
Manually shaping a manually generated block model
Clip Model with Boundary
Clip Model with Surface
Clip Model with GeoTiff
Cutting precise holes into a topo
Outline Block Model
5.4.1. Generic Clipping ¶
The Clip Geometry filter combines a number of functions into one filter, to allow clipping both block models and topo surfaces with both surfaces and boundary lines. The focus is on “getting it done” in a robust way, not on ensuring that the clipping is in all cases 100% perfact, no matter what the resolution (point density) of the input geometries is - see the examples below.
126.96.36.199. Clipping a Sphere (VTK type Poly Data) with a Plane (Poly Data)¶
The input geometries - sphere and plane - are shown in Fig. 5.12.
Without any options, cells are not clipped, and only cells that are fully on one side of the clipping plane are kept in the output: Fig. 5.13.
With the Keep cells along boundary option turned on, also all those cells that are cut by the clipping plane will be kept in the output: Fig. 5.14.
The Invert output will invert the orientation of the clipping plane, while not inverting the effect of the Keep cells along boundary option: Fig. 5.15.
The Clip cells option will actually clip also the cells, generating new ones: Fig. 5.16.
Note that the Only cells along boundary option does not have an effect if the input is of type Poly Data, like the sphere in this example.
Clipping the sphere can also happen with a boundary line. That boundary line will be extended along the Z axis, like a “cookie cutter”:
Clipping the sphere without further options: Fig. 5.17.
The same thing with the Clip cells option turned on: Fig. 5.18.
If precise “cookie cutting” is important, please have a look into the Precise Topo Cutting section.
For the following examples, a small block model (VTK type Unstructured Grid) will be clipped instead of the sphere of the previous examples:
All options turned off: Fig. 5.19
With the Keep cells along boundary option, blocks (cells) that are cut by the clipping plane are retained in the output: Fig. 5.20
The Invert output flips the orientation of the clipping plane (but not the effect of the Keep cells along boundary option): Fig. 5.21
For block models, the Keep only blocks along boundary option will only keep those blocks in the output that are cut by the clipping plane: Fig. 5.22
The Clip cells option, if applied to block models, will clip also those blocks (cells) that are cut by the clipping plane - with the effect, that they are not any more cuboids at the end: Fig. 5.23
The Clip Geometry filter clips a block model only geometrically, without taking attributes into account. If this is the intention, please have a look into the Shaping a Block Model section.
5.4.2. Shaping a Block Model¶
Normally, block models are assumed to be generated with other tools for further processing with AthosGEO View and AthosGEO Blend. However, it is possible to generate simple block models also “manually”, with the help of AthosGEO View. This includes the initial generation with the Block Model source, and assigning attributes with the different attribute assignment filters.
On top of that, we want to adapt the shape of the model to the volume that we want to cover. However, the Clip Geometry filter only deals with the geometry, but not with the specifics of a block model with it’s typical attributes and attribute types (see Section 6).
Example: Cutting a block model should keep the blocks intact, which we can achieve also with the Clip Geometry filter without the Clip the cells option. But along the boundary, we will certainly have blocks with reduced tonnage, and this cannot be handled with the Clip Geometry filter: This is the domain of the specific block model clipping filters.
188.8.131.52. Clip Model with Boundary ¶
The function of the Clip Model with Boundary filter is that of a “block model cookie cutter”. Input is a block model and a closed boundary line (polyline) - see Fig. 5.24.
The result of the clipping can be seen in Fig. 5.25. Part of the resulting block model is also shown in tabular form in Fig. 5.26. You see there that not only the KTons attribute was adapted to the fraction of a block inside the boundary line, but also a new attribute VolFactor was generated that reflects the percentage of the block that is part of the model.
The Minimum Retained Volume Factor option allows to discard those blocks that would contain only a very small fraction of the original block tonnage. Set this to 0 if such a behaviour is not allowed, or to some pragmatic low value like 10%.
Regarding the Respect Preceding Horizontal Clip option, please see the following section Clip Model with Surface
184.108.40.206. Clip Model with Surface ¶
The Clip Model with Surface filter is intended for adapting a block model to a real topo surface from above (with option Keep Blocks Below the Surface turned on), or cutting it from below at some underground limit (same option turned off). Input is a block model and a triangulated surface (in the sense of a “topo surfac” or “2.5D surface”), as shown in Fig. 5.27, and the result would be like shown in Fig. 5.28.
The Respect Previous Vertical Clip option has an effect if the input block model already has a VolFactor attribute from a previous clipping operation. The problem is that the filter cannot “know” from with side of a block any previously clipped volume was removed, so some simplifications must be made - and the user needs to give a hint in order to make the approximation a little bit more reliable.
The assumption is that we have two cases to distinguish:
The volume factor reduction is the result of a previous vertical clip, i.e. the application of a Clip Model with Boundary filter:
The volume factor is an update of a previous horizontal clip, i.e. the application of a Clip Model with Surface filter:
In the first case, the resulting VolFactor can be found by a multiplication of the old with a new volume factor, while in the second case, the result will be simply the smaller value of the two
5.4.3. Precise Topo Cutting ¶
It is obvious that the punched hole is not following the boundary input line precisely. However, if the required geometric resolution of the topography is defined by the input triangles, the approximation does not look unreasonable.
If a higher resolution is needed, it is possible to apply the Subdivide filter to the topo, the geometric resolution will be increased, and the punched hole accordingly - as can be seen in Fig. 5.32.
With all the above background, it is immediately obvious how the Topo Cutter filter is working with a very different algorithm: see Fig. 5.33.
The difference in strategy can be summarized in two points:
Clipping is done triangle by triangle in a way that the boundary line is followed exactly. This includes even cases where we have more than one closed boundary, and even if closed boundaries are nested within each other, as shown in Fig. 5.34. (Exception: self-intersections are not allowed.)
No clipping algorithm will ever be 100% perfect in all situations. While Clip Geometry is not as precise as possible, it tends to be very robust. The Topo Clipper, on the other hand, tries to do it’s best regarding precise clipping, but in some special cases it fails: Adapt the Delaunay Offset and/or the Number of Points to Insert properties.
5.4.4. Outline Block Model ¶
The Outline Block Model filter is a complement for the Topo Cutter filter described above if the purpose is to cut a hole into a topo surface that matches a block model precisely. The block model outline will be generated at a Z value of 0, as shown in :fig:`fig:OutlineBlockModelExample`. It is directly useable as input for the Topo Cutter filter.