Skip to content

jgphilpott/polysmith

Repository files navigation

Intro

Polysmith is a JavaScript based 3D modeling software that uses three.js along with CSG and BVH in the background. It can export STL and OBJ files to be used for 3D printing. In the future we would also like to be able to slice meshes directly in three.js and stream/export the resulting G-codes, see the Polyslice project for more info.

Setup

  1. Clone this repository to you local device with the command git clone https://github.com/jgphilpott/polysmith.git.

  2. Optionally, create or clone a Things repository in the same location with the command git clone https://github.com/<USERNAME>/things.git. You can also do this step later but you will need to rebuild your docker container.

  3. Assuming you have docker compose installed, navigate into the Polysmith repository and run npm run docker:setup. The build will take some time but once it’s done you can view the application by visiting localhost:4000 in a web browser. In future deployments you can simply use the command npm run docker:dev to start the containers and npm run docker:stop to stop them.

Docker Commands

For a better development experience, you can use these npm scripts:

Command Description
npm run docker:setup Build and start development environment (recommended)
npm run docker:dev Start development containers
npm run docker:stop Stop all containers
npm run docker:clean Clean up containers and volumes
npm run docker:logs View application logs
npm run docker:shell Access container shell

Environment Configuration

Copy the environment template and customize as needed:

cp .env.example .env

Usage

To create/view a 3D model you will need to add a polygen function to one of the root files in the scripts directory. You can either create a new function from scratch or copy and paste from one of the Things.

Once you see the desired model in the view you can use Ctrl + Enter to download it as an STL file or Shift + Enter to download it as an OBJ file. You can use any software you like to slice the STL/OBJ files but Cura is recommended.

If you have any problems with the software or an idea for a new feature please open an issue, thanks!

Connect & Share

I'd love to see all the things you create with Polysmith so please connect and share! I have used this software for all of my personal 3D models, you can view and download my creations on several different websites listed here:

About

A tool to generate STL and OBJ files for 3D printing.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors 3

  •  
  •  
  •