brepjs API Reference
    Preparing search index...

    Function convexHull

    • Compute the 3D convex hull of a point cloud.

      Returns the tightest convex solid enclosing all given points. At least 4 non-coplanar points are required to form a solid.

      Parameters

      • points: readonly Vec3[]

        Array of 3D coordinates.

      Returns Result<Solid>

      Result<Solid> — the convex hull solid, or an error.

      const solid = unwrap(convexHull([
      [0, 0, 0], [10, 0, 0], [0, 10, 0], [0, 0, 10],
      ]));