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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mitchallen/maze2openscad-cli

v0.2.9

Published

Code generate a maze as an OpenSCAD include file via the command line

Readme

@mitchallen/maze2openscad-cli

Code generate a maze as an OpenSCAD include file via the command line

Installation

You must use npm 2.7.0 or higher because of the scoped package name.

This is the command line version of the module @mitchallen/maze2openscad.

Because this is a command line tool, you should install it using the -g flag. This may require starting the command with sudo.

$ npm install -g @mitchallen/maze2openscad-cli

Usage

Square Maze

  • Find the file maze.scad in the root of the project and make a local copy of it.
  • Edit the include path at the top of the file and change it to:
include <demo-maze-data.scad>
  • The demo-maze-data.scad file will be generated by the tool
  • To generate a maze include file with data for 10 columns and 20 rows do this:
$ maze2openscad-cli square 10 20 demo-maze-data.scad
  • Start OpenSCAD and open maze.scad
  • You should see a generated maze
  • Leave OpenSCAD running and run the command line again to see a new maze appear in OpenSCAD

Circle Maze

  • Find the file maze-circle.scad in the root of the project and make a local copy of it.
  • Edit the include path at the top of the file and change it to:
include <demo-circle-maze-data.scad>
  • The demo-circle-maze-data.scad file will be generated by the tool
  • Create a subfolder called input
  • Copy the test/input/circle-demo.json file from the repo to that folder
  • To generate a maze include file with data for a circular maze run this command (you must use an absolute path for the first parameter - substitute your-project with your project folder):
$ maze2openscad-cli circle ~/your-project/input/circle-demo.json \
demo-circle-maze-data.scad

Windows users may need to adjust the input path to use drive letters, etc.

  • Start OpenSCAD and open maze-circle.scad
  • You should see a generated maze
  • Leave OpenSCAD running and run the command line again to see a new maze appear in OpenSCAD

Circle Options

  • See test/input/circle-demo.json in the repo for an example of how to create option files for circlular mazes.
  • The circle input file must be a valid JSON file with the following parameters:
{
    "rings": 5,
    "ringHeight": 6,
    "ringThickness": 1.5,
    "outerThickness": 3,
    "ringCutWidth": 5,
    "innerRadius": 6,
    "middleRadius": 18,
    "middleHole": false,
    "spokeWidth": 0.5,
    "hasFloor": false,
    "floorHeight": 2
}
  • Feel free to change the values to generate various types of mazes.

JSON Validator

To make sure that your circle maze input file is valid, paste it into an online JSON validator, like this one: https://jsonlint.com/


Testing

To test, go to the root folder and type (sans $):

$ npm test

Repo(s)


Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.


Version History

Version 0.2.9

  • Fixed type-o in readme

Version 0.2.8

  • Added image to readme

Version 0.2.7

  • Updated circular maze instructions to highlight need for absolute input path
  • Updated doc with example circle make input file and link to JSON validator

Version 0.2.6

  • Set license to MIT

Version 0.2.5

  • Updated code coverage script

Version 0.2.4

  • Added coverage script

Version 0.2.3

  • Install mocha as a local dev dependency

Version 0.2.2

  • Added CircleCI support and badges in README

Version 0.2.1

  • Fixed documentation

Version 0.2.0

  • now supports circular mazes
  • note that command line arguments have changed

Version 0.1.1

  • updated to use latest version of parent class

Version 0.1.0

  • initial release