Selva Compute API Reference - v2.1.0
    Preparing search index...

    Interface GrasshopperComputeConfig

    Configuration for Grasshopper compute operations Combines server config with optional Grasshopper-specific computation settings

    Note: The definition source (pointer/algo) is NOT part of config. Instead, pass the definition directly to methods like solve(), getIO(), etc.

    interface GrasshopperComputeConfig {
        absolutetolerance?: number | null;
        angletolerance?: number | null;
        apiKey?: string;
        authToken?: string;
        cachesolve?: boolean | null;
        dataversion?: 7 | 8 | null;
        debug?: boolean;
        modelunits?: RhinoModelUnit | null;
        onServerTiming?: (timing: ServerTiming) => void;
        retry?: RetryPolicy;
        serverUrl: string;
        signal?: AbortSignal;
        suppressBrowserWarning?: boolean;
        suppressClientSideWarning?: boolean;
        timeoutMs?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    absolutetolerance?: number | null

    Absolute tolerance used in computation

    angletolerance?: number | null

    Angular tolerance used in computation

    apiKey?: string

    Optional API key for authenticating with the server (RhinoComputeKey)

    authToken?: string

    Optional Bearer token for authentication (e.g., when behind a proxy or API gateway)

    cachesolve?: boolean | null

    Whether to use cached solution

    dataversion?: 7 | 8 | null

    Data version (7 or 8)

    debug?: boolean

    Enable debug logging to the console

    modelunits?: RhinoModelUnit | null

    Model units used

    onServerTiming?: (timing: ServerTiming) => void

    Optional callback invoked with the server's per-request Server-Timing breakdown when the response carries one (the /grasshopper solve endpoint emits decode;dur=N, solve;dur=N, encode;dur=N on every response).

    Fires on success only, once per request, before the parsed body is returned. The transport stays response-type-agnostic — this is a side channel for telemetry, it does not change what a call returns. Use it to feed a perf monitor or surface "solve took Nms" without server log access.

    retry?: RetryPolicy

    Retry policy for transient errors. Default: no retries.

    serverUrl: string

    The base URL of the Rhino Compute server (e.g., http://localhost:6500).

    This should point at the rhino.compute front (the reverse proxy), not a bare compute.geometry child process. ComputeServerStats relies on the proxy-only endpoints /healthcheck and /activechildren; targeting a bare compute.geometry would make isServerOnline() 404 even though /grasshopper would still solve.

    signal?: AbortSignal

    Optional caller-supplied AbortSignal. Composes with the internal timeout — whichever fires first wins. Lets callers cancel in-flight requests (e.g. on component unmount or when superseding a stale solve).

    suppressBrowserWarning?: boolean

    Suppress browser security warnings in the console

    suppressClientSideWarning?: boolean

    Renamed to suppressBrowserWarning.

    timeoutMs?: number

    Per-request timeout in milliseconds. Set to 0 to disable (useful for long solves where any timeout is the wrong answer). Default: no timeout.

    Uses AbortSignal.timeout so the timer is not throttled when the tab is hidden.