TRIBOOL2

Computes a grid based union or intersection of two triangulations. Tribool2 can also smooth a triangulation according to a 3D grid.


Usage:

tribool2 [{-above}|{-below}|{-inside}|{-outside}] <input_triangulation1> {-and|-or} [{-above}|{-below}|{-inside}|{-outside}] <input_triangulation2> [-delta dx dy dz] -output <output_triangulation>
OR
tribool2 tri -delta dx dy dz -output <output_triangulation>


Where:

Option

Description

<input triangulation1> and <input triangulation2>

Refers to the triangulations that are to be used in the Boolean operation. The extension .00t must follow any triangulation name. It does not matter which of the two input triangulations is listed first.

[output_triangulation1] and [output_triangulation2]

[{-above}|{-below}|{-inside}|{-outside}]

The -inside or -below parameter selects the portion of the triangulation inside a solid or below a surface.

The -above or -outside parameter selects the portion of a triangulation outside a solid or above a surface.

If not specified, inside a solid or below a surface is assumed.

{-and|-or}

The inputs are two triangulations and the output is a union (-and) or intersection (-or) triangulation.

[-delta dx dy dz]

The dx, dy and dz parameters are the grid cell sizes.

Choosing a reasonable grid cell size is important for getting good answers from tribool2. Using too small a grid cell size will cause the program to run for a long time and creates a large triangulation. Using too large a grid cell size results in the output losing detail.

For large triangulations, a reasonable grid cell size is the dimension divided by 100. For example, if the triangulations extend from 1100 to 35000 in the Z direction, then a dz of (3500-1100)/100=2.4 is a reasonable starting point. For smaller triangulations, you may want to divide the dimension by 20. In some cases it is reasonable to make the dz smaller than the dx and dy sizes. A smaller dz helps the program to follow steep portions of the terrain or pit without creating too many small triangulations on flat areas. The default cell sizes are 10 10 10.

-output

If only one triangulation is supplied, tribool2 runs in filter mode. The input triangulation is filtered by the grid cell size and a new triangulation is written out to output_triangulation.

Example 1

The following diagrams use section views of a topography triangulation and a pit triangulation. For a surface, an imaginary vertical line is drawn from the outer edges of the triangulation.

Figure 1: Imaginary Lines

The vertical lines generate the "solid" used in the boolean operation. The hatching patterns show points considered to be inside the imaginary solid.

Figure 2: Points Inside Imaginary Solid

All examples are entered on one line with each part being separated by a space.

tribool2 topography.00t -and pit.00t -delta 100 100 10 -output inttopopit.00t

Creates a smoothed triangulation, with a 100 by 100 by 10 resolution, called inttopopit.00t at the intersection of the two input triangulations (topography.00t and pit.00t). Only points inside topography.00t and pit.00t will be included in the final triangulation.

Figure 3: Input Triangulations

This will generate the following triangulation (inttopit.00t).

Figure 4: Final Triangulation

tribool2 topography.00t -or pit.00t -delta 100 100 10 -output uniontopopit.00t

Constructs the union of the two triangulations (points included would be inside one or the other triangulation) and creates the output triangulation uniontopopit.00t.

tribool2 topography.00t -and -outside pit.00t -delta 100 100 10 -output outtopopit.00t

Takes points outside pit.00t and intersects them with the points inside topography.00t and creates the output triangulation outtopopit.00t.

tribool2 topography.00t -delta 100 100 10 -output toposmooth.00t

Smooths an input triangulation to a desired resolution. This has the effect of creating a gridded triangulation at the desired resolution.

tribool2 s1.00t -or s2.00t -output out.00t

Computes the union of two solids (s1.00t and s2.00t), i.e. the output triangulation contains both input triangulations.

tribool2 s1.00t -and s2.00t -output out.00t

Computes the intersection of two solids (s1.00t and s2.00t), i.e. the output triangulation consists of the part inside both input triangulations.

tribool2 s1.00t -and -outside s2.00t -output out.00t

Removes a solid triangulation (s2.00t) from a surface triangulation (s1.00t).

tribool2 s1.00t -or s2.00t -output out.00t

Adds a solid triangulation (s1.00t) to a surface triangulation (s2.00t).

tribool2 -below s1.00t -and -above s2.00t -output between.00t

Finds the solid between two surfaces (s1.00t and s2.00t). S1.00t is above s2.00t.

tribool2 s1.00t -and -above s2.00t -delta 100 100 10 -output out.00t

Finds the portion of a solid (s1.00t) above a surface (s2.00t) using a 100 by 100 by 10 grid cell size.

tribool2 s1.00t -and -above s2.00t -delta 20 20 1 -output out.00t

Finds the portion of a solid (s1.00t) above a surface (s2.00t) using a 20 by 20 by 1 grid cell size. This is the same as the above example but the output will be larger and more detailed.

tribool2 s1.00t -delta 10 10 5 -output s1new.00t

Filters a triangulation (s1.00t) by a grid cell size of 10 x 10 x 5.