Solid Python
Setup
Install Anaconda(3.x),
and OpenSCAD.
On windows OpenSCAD must be 32-bit(as of right now).
On windows this creates an Anaconda prompt you can search for in your start bar,
while on most nix distros it installs on the path. Open this prompt or on nix just a terminal.
This gives you access to two package managers, pip and conda.
Run both of these commands to install the necessary packages.
pip install viewscad
SolidPython is essentially just a wrapper for OpenSCAD while viewscad
allows the rendereing of SCAD files in jupyter notebooks.
Usage
With everything installed, you can use jupyter notebooks instead of standard python development.
Starting a notebook is just as simple as running "jupyter notebook"
in a terminal/conda prompt.
It should open your favored web browser as an interactive python script. From the menu you can open any folders
or make a new notebook (from a button in the top right).
With this new file there are cells of python code that can be indivdually run.
This supports modifying new sections of code without having to re-run the previous sections.
This is incredibly useful for debugging.
For modeling my first block always handles the imports and the rendered that allows inline rendering. Like so:
import viewscad
import numpy as np
r = viewscad.Renderer()
Usage
With everything installed, you can use jupyter notebooks instead of standard python development.
Starting a notebook is just as simple as running "jupyter notebook"
in a terminal/conda prompt.
It should open your favored web browser as an interactive python script. From the menu you can open any folders
or make a new notebook (from a button in the top right).
With this new file there are cells of python code that can be indivdually run.
This supports modifying new sections of code without having to re-run the previous sections.
This is incredibly useful for debugging.
For modeling my first block always handles the imports and the rendered that allows inline rendering. Like so:
import viewscad
import numpy as np
r = viewscad.Renderer()