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 🙏

© 2024 – Pkg Stats / Ryan Hefner

quickbox

v0.1.1

Published

Enclosure generator for PCBs

Downloads

2

Readme

Quickbox

Quickbox creates 3D-printable housings for PCBs quickly ;)

Example

The example creates a box for my Relay PCB with:

const {Box} = require('quickbox');
const {TR, BR, BL, TL, CC, BC} = require('quickbox/alignment');
const {rectangle} = require('quickbox/elements');

const box = new Box({
	/* All units in mm */
	tolerances: {
		/* 3D prints aren't perfect.
		 * The oversize option adds a gap at every point the 3D print
		 * touches any other object like jacks, PCB, ... */
		oversize: 0.2
	},
	box: {
		/* Box radius */
		radius: 6,

		/* Wall thickness. Make sure to select a multiple of the 3D
		 * printer's nozzle diameter for best printing results. */
		wall: 1.6,

		/* Box height */
		height: 30,

		/* Box screws: */
		boxScrew: {
			/* Diameter of the thread insert */
			threadInsertDiameter: 4,

			/* Height of the thread insert */
			threadInsertHeight: 5.7,

			/* Screw diameter */
			screwDiameter: 3,

			/* Screw head diameter */
			screwHeadDiameter: 5.6
		},

		/* Inner PCB mounting screws: */
		mountingScrew: {
			/* Diameter of the thread insert */
			threadInsertDiameter: 4,

			/* Height of the thread insert */
			threadInsertHeight: 5.7,

			/* Diameter of the dome the PCB is resting on */
			domeDiameter: 12
		}
	},
	pcb: {
		/* Size of the rectangular PCB */
		size: [55.88, 46.99],

		/* PCB thickness */
		thickness: 1.5,

		/* Padding measured from the PCB edge to the outer box edge
		 *        N   E     S   W */
		padding: [15, 6.48, 15, 7.49]
	},
	mounts: [
		/* Center positions of the PCB mounts.
		 * The left bottom corner of the PCB is point [0, 0] */
		[35.56, 3.81],
		[35.56, 43.18],
	],
	breakouts: [{
		/* Side of the PCB:
		 * 'n': Northern side, upper edge
		 * 'e': Eastern side, right edge
		 * 's': Southern side, lower edge
		 * 'w': Western side, left edge */
		face: 'w',

		/* Position of [0, 0]:
		 * 'pcb-left': Left upper corner when locking on the PCB's side
		 * 'center': Center of the box */
		anchor: 'pcb-left',

		/* 2D sketch of the breakouts:
		 * breakout-name: geom2 */
		sketch: {
			j8_5: BL([0.635, 0], rectangle({size: [45.72, 10.3]}))
		}
	}, {
		face: 'e',
		anchor: 'pcb-left',
		sketch: {
			j4: BC([6.35, 0], rectangle({size: [11.36, 10.3]})),
			j3: BC([24.13, 1.02], rectangle({size: [11.31, 15.11]})),
			j1: BC([40.64, 1.02], rectangle({size: [11.31, 15.11]}))
		}
	}]
});

box.createBaseSTL('relay-base.stl');
box.createCapSTL('relay-cap.stl');