OOF2: The Manual
Name
Fix Illegal Elements (FixIllegal) — Remove illegal elements from a Skeleton.
Synopsis
FixIllegal()
Description
FixIllegal is a SkeletonModifier that fixes illegal
Skeleton Elements.
Excluding paranormal alien interventions, illegal elements are only
generated by moving Nodes manually with the Move Nodes toolbox.
Many algorithms used by OOF2 (including solving finite element
equations and some Skeleton modifiers) assume that Elements are legal,
so it prohibits almost all operations if illegal Elements exist.
FixIllegal fixes an Element by moving one or
more of its Nodes to the average position of its neighboring Nodes
In many cases, it is sufficient to fix an Element by applying this
smoothing procedure to the offending Nodes, namely those Nodes located
at corners that subtend interior angles greater than
180° or less than 0° (for quadrilaterals, illegal elements
include those that have non-convex geometries). However, this
smoothing procedure may not work when the corner angle is very close
to zero. In this case, the Nodes at other corners should be moved as well.
Each move is ultimately accepted or rejected solely by
whether or not it reduces the number of illegal Elements in the
vicinity of the Node.
Figure 6.80 illustrates the process of creating
and fixing illegal Elements. Notice that in (c) the Nodes are not
exactly in their initial positions. This is because
FixIllegal is a brutal technique: it pays no
attention to Element homogeneity
or shape
energy and does not attempt to optimize the positions of the
Nodes that it moves. If it's necessary to return them to a
particular legal configuration, it's better to undo the modification
that created the illegal Elements.
Figure 6.80. Fixing Illegal Elements

(a) A section of a Skeleton. The highlighted Nodes will be
moved as shown by the arrows to make the highlighted Elements
illegal.
(b) The Nodes have been moved and the illegal Elements are
automatically highlighted in red. For comparison, the
original Element edges are displayed in pale green. The
triangle has been inverted and the quadrilateral is no longer
convex.
(c) After applying FixIllegal, the
Elements are legal again, but the Nodes are not exactly where
they started in (a).
On one pass through the Skeleton, FixIllegal
attempts to move each Node of the troublesome elements once,
choosing the Elements and Nodes in a random order. It may not be
successful on the first pass, so it repeats the process until there
are no more illegal Elements. If any one pass through the Skeleton
fails to fix any Elements, or if it fails to remove all the illegal
Elements after a fixed number of iterations,[34] it will quit trying and notify the
user.



