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

@idfkit/geometry

v0.4.0-rc.1

Published

Read-only geometry extraction for EnergyPlus models: vectors, polygons, and a model's resolved scene

Readme

@idfkit/geometry

Read-only geometry extraction for EnergyPlus models: where a model's surfaces are, in one frame, without editing the model to find out.

Peer-depends on @idfkit/core and on nothing else. Everything exported here is synchronous, reads no files and holds no state, so it runs unchanged in Node, a browser tab, a worker, or an edge runtime.

Documentation · API reference

npm install @idfkit/geometry

What it answers

import { parseIdf } from '@idfkit/core';
import { getScene } from '@idfkit/geometry';

const { document } = parseIdf(text, schema);
const scene = getScene(document);

for (const surface of scene.surfaces) {
  console.log(surface.objectType, surface.name, surface.area, surface.normal.asTuple());
}

getScene takes one argument and returns one value. The vertices it hands back are already in the frame the engine computes: the zone origin and the zone rotation are applied where the model declares the relative system, the building's north axis turns the resolved building as one body, and a ring entered clockwise is reversed so that the right-hand rule gives the outward normal.

The document is unchanged afterwards. Not "unchanged in the fields extraction reads": unchanged. A preserving write before and after yields identical bytes, which is what lets a caller resolve a model it is also editing.

Nothing is dropped silently

Every geometry object in the model appears exactly once across three lists, and there is no fourth outcome:

  • scene.surfaces, the objects that were placed;
  • scene.unresolved, the objects that could not be, each with an enumerated reason and, for the two that are a dangling reference, the name it pointed at;
  • scene.unattempted, the geometry types this package does not read yet, each with a count, so a model stated in the simplified surface family looks different from a model with no geometry at all.

scene.applied reports the declarations resolution read and names the ones the model left for it to assume. scene.bounds encloses the resolved vertices and is absent rather than degenerate when nothing was placed.

Extraction never raises over a model's contents. Judging a model is validation's job; this reports.

Not here

Geometry authoring is not in this package. The builders, the transforms, surface matching and zoning are a separate capability and land with the change that ports them.

Reading this package is not installed by @idfkit/idfkit, and it is not reachable through a subpath of the shared name. It is added by name, because a consumer that never asks about geometry should not carry it.

Versioning

This package joins the repository's release lockstep and peer-depends on @idfkit/core at a caret range rather than an exact pin. It reads only core's published object model, so a core that changed any of it would break here loudly at the first call rather than quietly, and a patch of core should reach a consumer without a release of this package.