Selva Compute API Reference - v1.1.2
    Preparing search index...

    Function processInput

    • Internal

      Processes a raw input parameter schema and converts it into a typed InputParam object.

      This is an internal processor. Use fetchParsedDefinitionIO() to get processed inputs instead.

      This function handles the transformation of raw input parameter data from Grasshopper into a structured, type-safe format. It performs validation, type-specific processing, and error handling for various parameter types including numeric, boolean, text, geometry, point, and line inputs.

      Parameters

      Returns InputParam

      A fully processed and typed InputParam object with appropriate type-specific properties

      When an unknown paramType is encountered

      Re-throws any non-RhinoComputeError exceptions

      The function performs the following operations:

      • Extracts base properties common to all input types
      • Preprocesses the raw input data
      • Applies type-specific validation and transformation
      • Handles errors gracefully by creating safe default values for validation errors

      Supported parameter types:

      • Number and Integer: Numeric inputs with optional min/max constraints
      • Boolean: Boolean flag inputs
      • Text: String inputs
      • Geometry: Generic geometry objects
      • Point: 3D point objects
      • Line: Line objects
      const rawInput = {
      name: 'Length',
      paramType: 'Number',
      minimum: 0,
      maximum: 100,
      default: 50
      };
      const processedInput = processInput(rawInput);