OOF2: The Manual

Name

OOF.Skeleton.Auto — Automatically create and refine a Skeleton.

Synopsis

OOF.Skeleton.Auto(name,microstructure,left_right_periodicity,top_bottom_periodicity,maxscale,minscale,units,threshold)

Details

  • Parent Menu: OOF.Skeleton
  • Callback: function autoSkeleton in module ooflib.engine.autoskeleton
  • Options: no_log=True
  • Parameters:

    name
    Name of the new skeleton. Type: A character string, or the variable automatic.
    microstructure
    Type: The path to an existing Microstructure object.
    left_right_periodicity
    Whether or not the skeleton is periodic in the horizontal direction Type: Boolean, 0 (false) or 1 (true).
    top_bottom_periodicity
    Whether or not the skeleton is periodic in the vertical direction Type: Boolean, 0 (false) or 1 (true).
    maxscale
    Rough size of the largest elements. Type: A real number.
    minscale
    Rough size of the smallest elements. Type: A real number.
    units
    Units for minscale and maxscale. Type: An object from the Units enumerated class.
    threshold
    Minimum acceptable homogeneity Type: A real number in the range [0, 1].

Description

OOF.Skeleton.Auto tries to create and refine a Skeleton with no feedback from the user. It actually runs a series of other OOF2 commands, so the Auto command itself will never appear in a log file. After automatically creating a Skeleton the Undo command can be applied multiple times to undo the separate steps used in creating the Skeleton.

Auto inherits a few parameters from the commands that it invokes, and it adds a few of its own. It begins by creating a new Skeleton with quadrilateral elements. The size of the elements is set so that the initial Skeleton resolves features of size maxscale in the Microstructure. If units is Physical, then maxscale is assumed to be in physical units; if it's Pixel, then it's assumed to be in units of the Microstructure's pixel size; if it's Fractional, then it's assumed to be relative to the Microstructure's overall dimensions. The periodicity of the Skeleton is set by the parameters left_right_periodicity and top_bottom_periodicity, which have the same meanings that they have in QuadSkeleton.

After creating the initial Skeleton, Auto then Refines the Skeleton, using unconditional bisection with the liberal ruleset and alpha=0.8, until the linear dimensions of the smallest Elements are smaller than minscale. To get rid of rough corners, Auto applies SnapRefine once, with min_distance set to 0.0. All refinement operations are applied only to elements whose homogeneity is less than the specified threshold.

After refining, Auto cleans up the Skeleton by applying Rationalize twice, with alpha=0.8. It uses the specific Rationalizers RemoveShortSide(ratio=5.0), QuadSplit(angle=150), and RemoveBadTriangle(acute_angle=15, obtuse_angle=150). Finally, it Smooths the Skeleton after pinning the internal boundary Nodes, which it unpins when it's done. The smoothing is done with alpha=0.3 for 5 iterations.