Making models with Python
Introduction
Python is a general purpose programming language.
There are a few Python packages which facilitate the creation of 3D models in a format that can be used with a 3D printer.
SolidPython
SolidPython is a Python ‘wrapper’ around None. It provides analogues for all of the operations in the OpenSCAD language, and returns objects which you can manipulate further in Python.
The ViewSCAD package adds interactive renderings of SolidPython objects inside Jupyter notebooks.
Examples
numpy-stl
numpy-stl provides functions to work with meshes loaded from and saved to .stl files. Meshes are represented as lists of vertices and faces; the package doesn’t provide any solid geometry operations, so you have to do everything yourself.