brepjs API Reference
    Preparing search index...

    Interface EvaluatorOptions

    interface EvaluatorOptions {
        kernel?: string;
        maxCacheEntries?: number;
        maxMeshCacheEntries?: number;
        onStep?: (info: StepInfo) => void;
        tolerance?: number;
    }
    Index

    Properties

    kernel?: string

    Kernel id to materialize against. Defaults to the currently-active kernel.

    maxCacheEntries?: number

    Upper bound on the number of materialized entries kept in the content cache. When the cache exceeds this after a top-level evaluate(), the least-recently-used entries are evicted and their kernel handles disposed (a handle shared by several entries is freed only when its last entry is evicted). Defaults to unbounded — entries live for the Evaluator's lifetime. With a bound set, a returned shape is only guaranteed valid until the next successful evaluate() call; a failed or thrown evaluate() is transactional (the cache is left unchanged), and evaluate() is non-reentrant (calling it from an onStep callback throws). Must be a positive integer.

    maxMeshCacheEntries?: number

    Upper bound on entries in the Evaluator.evaluateMesh content cache, which is independent of the shape cache. Defaults to unbounded. Bounding it separately is what lets a mesh outlive its (evicted) kernel shape, so a re-evaluateMesh is a pure data hit with no re-materialization. Must be a positive integer.

    onStep?: (info: StepInfo) => void

    Optional callback fired after every node visit, including cache hits (info.cacheHit discriminates).

    tolerance?: number

    Default boolean tolerance applied when a node doesn't override it.