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

@nativecad/kernel

v0.2.0

Published

Zero-dependency JavaScript solid-modeling kernel: STEP AP242 read/write, B-rep feature ops (extrude, revolve, loft, shell, holes, fillets, chamfers, booleans, patterns), watertight surface tessellation, constrained-Delaunay volume meshing, CAE export (Nas

Downloads

110

Readme

@nativecad/kernel

Renamed in 0.2.0 — this package was published as @cadsolver/kernel. NativeCAD (formerly CADSolver) is the same code under a new name; the repository URL is unchanged.

Zero-dependency JavaScript solid-modeling kernel. STEP AP242 read/write, B-rep feature operations (extrude, revolve, loft, shell, manufacturing holes, fillets, chamfers, booleans (including selective/partial booleans with cell decomposition), patterns), watertight surface tessellation, constrained-Delaunay volume meshing, CAE export (Nastran / Abaqus / VTK), and mass properties. No WASM, no native binaries, no third-party geometry kernels — npm install and you are modeling, versus the request-an-evaluation sales cycle of traditional CAD SDKs.

For rendering in a page, use @nativecad/viewer — it bundles the browser build of this kernel plus a drop-in three.js viewer component. This package is the Node/server-side surface.

Install

npm install @nativecad/kernel

Quickstart — STEP file to mesh

const cad = require('@nativecad/kernel');           // or: import cad from '@nativecad/kernel'

const res = cad.solveStepFile('part.step', { targetCount: 20000 });
// res.mesh  = { vertices, indices, normals, lineIndices, triangleFaceIds }
// res.stats = { vertices, triangles, faces, solids }
console.log(res.stats);

const props = cad.MassProperties.compute(res.mesh); // volume, centroid, inertia

Build a part from code

const cad = require('@nativecad/kernel');

const { parser, solidId } = cad.ops.primitives.box(40, 20, 10);
cad.ops.blend.blendConvexEdges(parser, solidId, { radius: 2 });

const stepText = cad.writeStep(parser);             // STEP AP242 out

Or drive it with a declarative JSON command document (the same format the CADSolver viewer's AI panel executes):

const doc = {
  version: 1,
  ops: [
    { op: 'box', id: 'block', dx: 40, dy: 20, dz: 10 },
    { op: 'blend', of: 'block', radius: 2 },
    { op: 'save', path: 'out/block.step' },
  ],
};
const check = cad.commands.validate(doc);   // { valid, errors }
if (check.valid) cad.commands.run(doc);

Volume meshing + CAE export

const cad = require('@nativecad/kernel');
const res = cad.solveStepFile('bracket.step');

const mesher = new cad.VolumeMesher();
const tets = mesher.mesh(res.mesh);                  // constrained-Delaunay tets
const deck = cad.CaeExporter.toNastran(tets);        // or toAbaqus / toVtk

API surface

Everything on the package export is supported; see index.d.ts for the typed surface. Highlights: solveStep / solveStepFile / solveStl / writeStep (pipeline), StepParser / StepWriter / SurfaceTessellator / Topology (core classes), ops.* (feature operations), commands.* (JSON command layer), sketch.* (2D sketch + constraint solver), MassProperties, GeometryStats, VolumeMesher, CaeExporter.

ops.boolean includes the CADSF-236 selective/partial boolean + cell decomposition entry points (decomposeCells, selectiveBoolean, selectiveBooleanStage2) alongside the classic subtract/union/ intersect — see the repo's docs/SELECTIVE_BOOLEAN.md. ops/offset.js's general body offset (CADSF-262) is aggregated as ops.offset (offsetBody(parser, solidId, distance, opts) — uniform or, via opts.faceDistances, per-face variable; see the source header for the sign convention and the local/convexTrim construction paths). It is not yet a JSON command-document op (commands.run) — only the JS ops.* entry point reaches it today (CADSB-302).

Logging: the kernel is quiet by default as a library (CADSOLVER_QUIET=1); set CADSOLVER_LOG=1 for the diagnostics log. Every solve also returns its provenance lines in res.log.

Versioning

0.x: minor versions may include breaking changes to the deeper B-rep machinery; the pipeline surface (solveStep*, writeStep, mesh payload shape) is stable. From 1.0.0, standard semver.

License

Dual-licensed: free for evaluation, personal, academic, and other non-commercial use; any commercial use requires a paid license — see LICENSE and COMMERCIAL.md (Indie $999/yr if you ship software or $490/yr if you ship hardware, Team $1,900/yr, OEM from $9,500/yr — flat, published, royalty-free). Automatic Support — agent-answered, 24/7/365 — is $499/yr on any plan.