Skip to main content

Yet another python to openscad translator

Project description

yaost

Yet another openscad translator.

Yaost - is python to openscad translator.

Prerequisites

  • python >= 3.5
  • openscad >= 2015

Quickstart

Create file example.py:

#!/usr/bin/env python
from yaost import project
from yaost import scad

p = Project('example project')

@p.add_part
def simple_cube():
    return scad.cube(10, 10, 10)

if __name__ == '__main__':
    p.run()

Build scad file:

$ python3 example.py build-scad

Now you can see your scad model:

$ openscad scad/simple-cube.scad

To build stl, run:

$ python3 example.py build-stl

Your model will be at stl/simple-cube.stl

You can run yaost in watch mode, it regenerates scad each time when you save python file:

$ python example.py watch

The open file with

$ openscad scad/simple-cube.scad

Chane something in example.py (eg. cube(30, 10, 10)) you should see changes in openscad viewe immediately.

See more in examples section.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yaost-0.2.1.tar.gz (13.4 kB view hashes)

Uploaded Source

Built Distribution

yaost-0.2.1-py3-none-any.whl (15.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page