Editor: Simplification Editor ()

 

Description:

This editor can be used to reduce the triangle count of a surface. In almost all cases, the output of the Generate Surface module must be simplified before a tetrahedral model can be generated. Surface simplification is done by means of an edge collapsing algorithm. Edges of the original surface are successively reduced to points. The shape of the original surface is preserved by minimizing a certain error criterion. Special care is taken to prevent the triangles of the simplified surface from intersecting each other. However, in some cases, intersections can still occur. Therefore, the resulting surface should be checked for intersections using the surface editor.

Figure 1: User interface of surface simplification editor.

Figure 2: Illustration of the edges collapsing. The blue edge is collapsed into a single point. The shaded triangles become degenerate and are removed during the contraction.

Ports:

Simplify This port provides three text fields for controlling some parameters of the simplification process.

The first field faces determines the desired number of triangles of the simplified surface. You may simplify the surface in multiple steps. However, somewhat more accurate results are obtained if the simplification is performed in a single step. When the simplification process is finished, a check is made whether the surface contains duplicated triangles. Such triangles are removed automatically. Therefore, the total number of triangles of the reduced surface will usually be somewhat less than the value specified in faces.

The second field, max dist, if different from zero, defines a maximum edge length for the triangles of the simplified surface.

The simplification stops when one of both criteria above is reached.

The third field, min dist, defines a minimum edge length for contracting edges. Note this is not a stop criteria for simplification as the two previous fields. Instead, setting a value different from zero enables the button Contract Edges (see below), then shorter edges are contracted if button Contract Edges is pressed.

Options If the toggle preserve slice structure is set, edges of exterior triangles of the surface are treated in a special way, so that the slice structure of the original voxel grid is preserved.

If toggle fast is set, a less extensive intersection test strategy is selected. Surface simplification will run faster, but there is a higher probability that intersecting triangles will occur (see explanation of port Intersections below).

If toggle create level-of-detail is set, all intermediate steps (edge-collapse) of the simplification process are stored in the surface in such a way that they can rapidly be restored. To this end, the surface receives a port Level of detail, where the desired level can be set. Note that the port will not be created if during simplification errors occur. In this case, a message in the console will be printed.

If toggle intersection tests strategies is set, a new port called Intesections will be displayed, in which the different intersection test strategies can be tuned.

Intersections This port is only displayed if the intersection tests strategies toggle is set.

This port lets you choose between different intersection test strategies. Three strategies can be set.

Triangles test: modified triangles are tested against existing edges. Modified triangles are all the triangles displayed on the right side of Figure 2, resulting of the edge collapsing. The test consists of checking that edges surrounding these triangles are not intersecting them. Several levels of test are available: low - medium - extensive. The more accurate the test, the more edges tested in the neighborhood of a given triangle.

Edges test: modified edges are tested against existing triangles. Modified edges are all the edges resulting of the edge collapsing (on the right side of Figure 2 they are the edges connecting the blue point to a red point). The test consists of checking that those edges do not intersect surrounding triangles. Two levels of test are available: medium - extensive. The more accurate the test, the more triangles tested in the neighborhood of a given edge.

Planar intersections test: if selected, modified triangles are tested against their direct neighbors, if coplanar, to make sure their edges do not intersect.

More extensive tests will reduce the probability for intersecting triangles to occur in most cases (some exceptions might be observed for very degenerate surfaces). Of course it will also require more computing time. By default, the moderately extensive tests are performed.

Action Button Simplify starts surface simplification. The The simplification process may take several minutes. You can interrupt it by clicking the stop button of the progress bar.

Button Flip Edges automatically flips some edges of a surface if this improves the triangle quality. The Quality is defined as the ratio of the circumscribed circle and the inscribed circle of a triangle. The smaller this ratio the higher the quality. Again, duplicated triangles are removed automatically after this operation.

Button Contract Edges contracts all edges shorter than the value defined at field min dist (see above).

Commands:

Simplifier setRadiusRatio <value>
This command defines a quality threshold for the edge flipping algorithm. Edges are flipped only if the radius ratio of a triangle exceeds the given value. By default, a radius ratio of 20 is used.

Simplifier smooth <nSteps> <lambda>
This commands shifts the vertices of the surface so that it gets smoother. The value for lambda should be in the range of 0...1. This option is experimental and should not be used for routine work.

Simplifier setFactError <value>
In surface simplification the maximal edge length and the maximal error (estimated distance between original and simplified surface) can be controlled separately. The maximal error is computed by multiplying the maximal edge length by a certain factor factError. The value of factError can be set using command setFactError. The default value is 1.

Simplifier getFactError
This command returns the current value of factError.