Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "to-scale-axis"

Index

Variables

Functions

Variables

Private _debug_

_debug_: MatDebug

Let len

len: function = length([0,1])

Type declaration

    • (ps: number[][]): number
    • Parameters

      • ps: number[][]

      Returns number

Functions

linearScale

  • linearScale(cpNode: CpNode, s: number): (Anonymous function)

toScaleAxis

  • toScaleAxis(mat: Mat, s: number, f?: function): Mat
  • Apply and returns an enhanced version of the Scale Axis Transform (SAT) to the given MAT. The returned SAT is guaranteed to be a subset of the MAT and preserves topology at any scale.

    Typically the MAT contains too many branches caused by minute details on the boundary of the shape. The SAT is a simplification of the MAT that preserves less detail the higher the applied scale factor. The severity at which noise are removed depends on the local scale of the shape.

    Parameters

    • mat: Mat

      The Medial Axis Transform (Mat) on which to apply the SAT.

    • s: number

      The scale factor >= 1 (e.g. 1.3)

    • Default value f: function = linearScale
        • (cpNode: CpNode, s: number): function
        • Parameters

          Returns function

            • (r: number): number
            • Parameters

              • r: number

              Returns number

    Returns Mat

Generated using TypeDoc