npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

negative-support

v0.4.10

Published

Generate 3D-print negative-space support structures from STL, OBJ, or STEP files

Readme

negative-support — Negative-Space 3D Print Support Generator

Generates model-conforming support structures for 3D printing. Unlike slicer-generated tree or grid supports, these are negative-space supports — exact shapes created by subtracting the model from a surrounding block, producing solid mesh that conforms to the model's actual surface contours.

Available on npm and as a browser app at negative.support/generate.

Install

npm install -g negative-support

Or run directly with npx:

npx negative-support model.stl

Usage

negative-support model.step                # STEP with B-Rep overhang detection
negative-support model.stl                 # STL with triangle-normal overhang detection
negative-support model.obj -m 0.15 -a 40   # tighter margin + stricter angle
negative-support model.step --3mf          # 3MF with model + supports + slicer settings
negative-support model.stl -o out.stl      # custom output path
negative-support model.stl -q              # quiet mode for scripting

Options

| Flag | Default | Description | | ----------------------- | ---------------------- | -------------------------------- | | -o, --output <path> | <input>_supports.stl | Output path | | -m, --margin <mm> | 0.2 | Gap between supports and model | | -a, --angle <degrees> | 45 | Overhang angle threshold | | --min-volume <mm³> | 1.0 | Discard pieces smaller than this | | --3mf | | Export 3MF with model + supports | | -q, --quiet | | Suppress progress display | | --version | | Show version | | --status | | Show license status | | --activate <token> | | Activate license token |

How It Works

1. Overhang Detection

Both STEP and mesh files produce targeted per-region supports through overhang detection:

  • STEP files (.step/.stp) — B-Rep face topology provides exact face boundaries and normals via occt-import-js. Each face with a downward normal steeper than the angle threshold becomes a support region.
  • Mesh files (.stl/.obj) — Triangle normals are computed per-face, then adjacent overhang triangles are clustered via BFS flood fill over shared edges. Each cluster becomes a support region, producing results comparable to STEP.

2. Support Generation

For each overhang region:

  1. Bounding box column — A vertical column is extracted from the region's AABB, extending down to the build plate
  2. Negative space — The inflated model (offset outward by margin along vertex normals) is subtracted from the column using boolean operations (manifold-3d)
  3. Decomposition — The resulting shape is split into separate pieces
  4. Filtering — Pieces smaller than minVolume or not touching the build plate are discarded
  5. Merge — Overlapping pieces from adjacent regions are merged via geometric intersection testing

3. Output

  • STL (default) — All support pieces merged into a single binary STL
  • 3MF (--3mf) — Model + individual support pieces as separate objects with per-piece slicer settings (1 wall, 10% cubic infill)

API

Call activate() with your license token before generating. The token is the same one you use for the CLI.

import { generateSupports, activate } from 'negative-support'
import { readFileSync, writeFileSync } from 'fs'

await activate('ns_live_...')

const buffer = readFileSync('model.stl').buffer
const result = await generateSupports(buffer, {
  format: 'stl',
  margin: 0.2,
  angle: 45,
})

writeFileSync('supports.stl', Buffer.from(result.stl))
console.log(result.stats) // { pieces, faces, volume }

generateSupports() will throw if called without activation or if the free tier is exhausted. result.supportPieces contains individual ParsedMesh objects for custom export or 3MF packaging.

Documentation

Full docs at negative.support/docs.

Development

git clone --recurse-submodules https://github.com/drcmda/negative-support
npm install
npm run dev               # Frontend dev server on :5173
npm run dev:server        # API dev server on :8787
npm test                  # Full test suite
npm run build             # Build frontend
npm run deploy            # Build frontend + deploy to Cloudflare

License

See negative.support for licensing details.