<h1 align="center">
  <img src="https://i.imgur.com/IiI57LR.png" alt="scad-js" height="128"> SCAD-JS
</h1>

> **scad-js** transpile your Javascript to **OpenSCAD** letting you create programmatic 3d solid models with the familiar javascript syntax.

<p align="center">
  <a href="https://www.npmjs.com/package/scad-js">
    <img alt="Latest release" src="https://img.shields.io/npm/v/scad-js?style=for-the-badge">
    <img alt="Codecov coverage" src="https://img.shields.io/codecov/c/github/scad-js/scad-js?style=for-the-badge">
    <img alt="Build passing" src="https://img.shields.io/travis/scad-js/scad-js?style=for-the-badge">
  </a>
  <a href="https://www.npmjs.com/package/scad-js">
    <img alt="scad-js demo" src="https://i.imgur.com/GhjNUxM.gif">
  </a>
</p>

**OpenSCAD** is an amazing software for creating solid 3D CAD objects, but modeling with the **OpenSCAD** language can be really cumbersome and limited.

**scad-js** overcomes these limitations with the power of Javascript.

## Getting started
First make sure you have [OpenSCAD](https://www.openscad.org/downloads.html) installed on your system, we will use it to visualize the model.

clone [scad-js-starter](https://github.com/scad-js/scad-js-starter):

```bash
git clone https://github.com/20lives/scad-js-starter.git my-scad-js-project
cd my-scad-js-project
```

install dependencies and run develpment script:

```bash
yarn # or npm install
yarn dev # or npm run dev
```

Now open `index.js` in your favourite text editor and start tinkering.

## Documentation

For detailed documentation on how to use scad-js visit [scad-js-docs](https://github.com/scad-js/scad-js-docs), you can also look at the official [OpenSCAD Documentation](https://www.openscad.org/documentation.html) page.

## Examples

A good way for learning scad-js and OpenSCAD is throught examples: [examples](https://github.com/scad-js/examples)

## Acknowledgements

This project was inspired by many other projects: [farrellm/scad-clj](https://github.com/farrellm/scad-clj), [OpenJSCAD.org](https://openjscad.org/), [tasn/scadjs](https://github.com/tasn/scadjs) and more... And of course it would not even exist without [OpenSCAD](https://www.openscad.org) itself.

## License

This project is open source and available under the [MIT License](LICENSE).
