gcode-preview - v3.0.0-alpha.6
    Preparing search index...

    Class LayersMetadataIndexer

    Indexer that organizes paths into layers using slicer metadata when available, falling back to tolerance-based detection

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    indexes: Layer[]

    Array of layers being managed

    Accessors

    • get hasMetadata(): boolean

      Whether slicer-provided layer metadata is available

      Returns boolean

    Methods

    • Replaces the layer metadata used for indexing.

      Parameters

      • layerMetadata: LayerMetadata[]

        Layer metadata from slicer comments

      Returns void

      Must be set before paths are indexed to take effect: the strategy locks on the first path (see useMetadata). A streaming parse re-sets the same (growing) array each chunk, which keeps the layer pointer; swapping in a different array rewinds the pointer so stale positions cannot leak.

    • Sorts a path into the appropriate layer using metadata or tolerance fallback

      Parameters

      • path: Path

        Path to sort

      Returns void

      NonPlanarPathError if path is non-planar (fallback mode only)