node package manager

@mitchallen/maze2openscad-cli

@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

  • If you don't have a copy of OpenSCAD you can download it for free from here: http://www.openscad.org

  • Create a new test folder and change to it

  • Browse to: https://github.com/mitchallen/maze2openscad-cli/

  • 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 <maze-data.scad>
    
  • The maze-data.scad file will be generated by the tool

  • To generate a maze include file with data for 10 columns and 20 rows you could do something like this:

      $ maze2openscad-cli 10 20 maze-data.scad
    
  • Start OpenSCAD and open maze.scad

  • You should see a generated maze

  • Leave OpenSCAD running and run execute the command line again to see a new maze appear in OpenSCAD


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.1.0

  • initial release

Version 0.1.1

  • updated to use latest version of parent class