OOF2: The Manual
Snap Refine (SnapRefine) — Subdivide elements along pixel boundaries.
- Target elements to be refined. Type: An object of the
- Exclude certain elements. Type: An object of the
- Minimum distance of transition points along a given edge from each other and the end-points, in units of the maximum pixel dimension. Type: A real number in the range [0, 3].
SnapRefine is a SkeletonModifier that attempts to
combine the most desirable features of Refine and SnapNodes into a single method. The
method operates like Refine,
except that the
Segments are split by points located at the
interface of two different pixel
categories. These points become the corners of new elements
that subdivide the original elements. Figure 6.105 illustrates the result of applying
SnapRefine to the starting
in Figure 6.104.
SnapRefine can yield a
Skeleton with a
comparable homogeneity to a
Skeleton produced by Refine, but often with significantly
SnapRefine can also be
more flexible than SnapNodes in
Skeleton to a microstructure, because
SnapRefine introduces new nodes and
additional edges that can be made to follow the boundaries of
pixel categories. For example, Figure 6.106 shows the result of using the
standard Refine method and the
result of using the stand-alone SnapNodes method on the original
SnapRefine can lead to the
creation of very thin elements (see Figure 6.105). The creation of such
badly-shaped elements may be prevented in many cases by a
judicious choice of the parameter
SnapRefine will not place a new
within a distance
min_distance of one of the
corners of an
min_distance is given in
units of the pixel size.
In general, iterating
very bad results, with a lot of very thin elements. A good
strategy is often to use the regular Refine method first, and to apply
SnapRefine just once at the end to smooth
out jagged edges.
SnapRefine finds at most two transition
points along an edge.
The method also generates
both triangular and quadrilateral elements liberally
(corresponding to the liberal rule set in Refine). Note also that
SnapRefine does not use an alpha
parameter. Instead, it takes into account the pixel categories
underneath the element edges, as well as the bisection of the
edges, when deciding among several ways of subdividing an
element. The subdivision of an element may also introduce new
nodes within the element. These nodes may also be located at the
interface of pixel categories.
 If the pixels are not square, the larger pixel dimension is used.