brepjs API Reference
    Preparing search index...

    Function sdfLattice

    • A graded/conformal TPMS lattice: |f(p)| − ½·thickness(p) for the chosen kind (negative = strut material), with period and thickness GRADED per-position via ScalarFieldHandle. A fieldConst period/thickness reproduces a uniform lattice. The field is Lipschitz and APPROXIMATE (not a true SDF).

      The lattice is INFINITE/periodic, so it must be clipped to a bounded region (lattice.intersection(region)) before rasterizing — that conformal clip is what frames a finite grid. NOTE: grading the PERIOD is an approximation (a spatially-varying period isn't strictly periodic); grading THICKNESS is the well-behaved primary knob.

      Parameters

      Returns Result<SdfHandle>