brepjs API Reference
    Preparing search index...

    Function surfaceFromGrid

    • Create a B-spline surface (or triangulated shell) from a 2D grid of height values.

      The grid is interpreted as Z heights at evenly spaced (X, Y) positions. Row index maps to Y, column index maps to X.

      Parameters

      • heights: readonly (readonly number[])[]

        2D array of Z values, at least 2x2

      • options: SurfaceFromGridOptions = {}

        Physical dimensions and Z scaling

      Returns Result<AnyShape>

      Result containing the surface shape (may be a Face or Shell depending on grid complexity)