Skip to content
Python Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
Makefile
README.md
sbom

README.md

SBOM - Simple Bill of Materials

SBOM is a really simple BOM generation system for OpenSCAD.

SBOM is completely driven the OpenSCAD design and generates reStructuredText documents that can trivially be converted into PDF or HTML files. SBOM aggregates all of the parts found in the design into a simple tabular form.

While SBOM is intended for use with OpenSCAD it does not depend on this in any way and can be used with other applications.

SBOM Syntax

SBOM parses the input file for lines of the following form:

BOM:namespace..:part:key=value,..
  • BOM
    • Tell SBOM to consider this line.
  • namespace
    • Categorise part in a hierarchal namespace separated by colons (optional).
  • part
    • Name of the part type.
  • key=value
    • Parameters of this part.

For example an M6 bolt may be represented by:

BOM:hardware:bolt:size=M6,length=12

If out input file contained the above line four times then we would get a table like this:

# size length qty
A M6 12 4

The way these can be used is pretty flexible but it comes down to:

  • A BOM will contain a table for each part.
  • These tables will be organised by namespace.
  • The columns of the tables will contain the keys and aggregates values.

Every time a part is used in the design the line should be output again. We let SBOM do the counting for us.

Using SBOM with OpenSCAD

In OpenSCAD we can generate SBOM lines:

echo(str("BOM:hardware:bolt:size=M", size, ",length=", length));

Then we can generate a BOM:

openscad -o /tmp/null.stl model.scad 2>&1 | sbom -

Alternatively the output in the OpenSCAD console can be copied and pasted into a file then:

sbom myfile.txt
You can’t perform that action at this time.