Skip to content

openpyscad as a python wrapper for openscad #29

@edmundsj

Description

@edmundsj

Have you thought about turning openpyscad into a full wrapper for openscad, instead of just a source code generator? I think it would require minimal additional effort depending on how it is done, as openscad has a command line API, so you could just invoke openscad and, for example, directly generate an STL file, i.e.:

import openpyscad as ops

ops.Cube([10, 10, 10]).write('input.scad')
os.system('openscad -o output.stl input.scad')

Or directly open the viewer:

import openpyscad as ops

ops.Cube([10, 10, 10]).write('input.scad')
os.system('openscad input.scad')

This would be nice for those of us (me) that love to work in python as much as possible and hate working in other people's UIs/programs except for stuff like simple viewing. An example of a software package that does this well is gdspy. It provides all the logic for generating structures and a (very) simple viewer for the output file, and is a very popular package. You could even perhaps bundle openscad and openpyscad as a single conda package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions