Headless automatic rendering of build123d models using tcv-screenshots (three-cad-viewer adjacent) -- updates renders on any script changes (pushes) to this repository (or any forks).
- This repo contains GitHub workflows that setup
tcv-screenshots, Playwright, andbuild123din a GitHub runner. - On pushes, the GitHub workflow (
render_tcv.yml) executes a python script (render_tcv.py) which searches recursively for python files. - The script intelligently finds the latest
build123dobject in your script (or looks for standard variables liketo_export,result, orpart). - Under the hood, the script dynamically wraps your code to interface with
tcv_screenshotsand generates high-quality PNG screenshots directly from the three-cad-viewer rendering engine without requiring you to change your code. - Images are saved to the appropriate subfolder with the same name as the python script (e.g.
model.py->model.png). - The GitHub workflow commits via
github-actions[bot]the changed PNG images back to this repo so they can be embedded in yourREADME.mdfiles.
- Fork the repository
- Add a subfolder containing:
- yourbuild123dscript.py
- README.md (embed the image yourbuild123dscript.png) and any other documentation / info you want to include.