Documented project description blurb and openscad.py.

This commit is contained in:
Chris Palmer 2020-12-29 12:20:32 +00:00
parent 46ff632bbb
commit 06e1c1a3da
4 changed files with 14 additions and 4 deletions

View File

@ -119,6 +119,16 @@ A more optimised approach for large projects is to include [NopSCADlib/core.scad
That only has the a small set of utilities and the global settings in [global_defs.scad](../global_defs.scad) plus screws, nuts and washers that are required by a lot of other vitamins.
Any other vitamins used need to be included explicitly. One can copy the includes or use a line from [NopSCADlib/lib.scad](../lib.scad).
### Project Description
A description of the project can be placed in comments in Markdown format before the first include file.
By default this is followed by the a picture of the main assembly unless the description contains any pictures.
The description can be divided into two or three sections using //! ***, which is a Markdown horizontal rule in a comment.
If there is a second section it is placed after the table of contents and a third section will be placed after the parts list.
If an actual horizontal rule is desired the alternative Markdown markup //! --- can be used.
### Parametric parts.
Modules that generate parts and assemblies need to take no parameters so that they can be called from the framework to make the STL files and assembly views, etc.

View File

@ -60,7 +60,8 @@ They should work with both Python 2 and Python 3.
break
if not blurb:
print("Missing description for", file)
print("| `%s` | %s |" % (file, blurb), file = doc_file)
else:
print("| `%s` | %s |" % (file, blurb), file = doc_file)
with open(dir + "/readme.html", "wt") as html_file:
do_cmd(("python -m markdown -x tables " + doc_name).split(), html_file)

View File

@ -18,7 +18,7 @@
#
#
# Run openscad
#! Run `openscad.exe` and capture `stdout` and `stderr` in `openscad.log` as well as printing to the console.
#
from __future__ import print_function

View File

@ -9,11 +9,10 @@ They should work with both Python 2 and Python 3.
| `bom.py` | Generates BOM files for the project. |
| `c14n_stl.py` | OpenSCAD produces randomly ordered STL files. This script re-orders them consistently so that GIT can tell if they have changed or not. |
| `doc_scripts.py` | Makes this document and doc/usage.md. |
| `dxf.py` | |
| `dxf2pdf.py` | |
| `dxfs.py` | Generates DXF files for all the routed parts listed on the BOM or a specified list. |
| `gallery.py` | Finds projects and adds them to the gallery. |
| `make_all.py` | Generates all the files for a project by running `bom.py`, `stls.py`, `dxfs.py`, `render.py` and `views.py`. |
| `openscad.py` | Run `openscad.exe` and capture `stdout` and `stderr` in `openscad.log` as well as printing to the console. |
| `panels.py` | Panelises DXF files so they can be routed together by running scad files found in the `panels` directory. |
| `platters.py` | Generates build plates of STL files for efficient printing by running scad files found in the `platters` directory. |
| `render.py` | Renders STL and DXF files to PNG for inclusion in the build instructions. |