44 lines
1.8 KiB
Python
44 lines
1.8 KiB
Python
"""TEMPLATE — Bill of Materials (BOM). Copy this folder to <PROJECT>/source/ and fill it in.
|
||||
|
|
|
|||
|
|
A list of parts to pull, check and pack. Marked INTERNAL USE automatically. 1–2 pages.
|
|||
|
|
See MPM_Document_Standard.md §9.4. Reference: BOM-OMT-HW-01 (Omnitrans).
|
|||
|
|
|
|||
|
|
Order: masthead (automatic) → item sections (doc.bom) → Draft items to confirm (while < 1.0)
|
|||
|
|
→ sign-off → Revision history (automatic)
|
|||
|
|
Unknown values are TBC (red), never guessed; every TBC appears in the 'items to confirm' note.
|
|||
|
|
"""
|
|||
|
|
import sys, pathlib
|
|||
|
|
HERE = pathlib.Path(__file__).resolve().parent
|
|||
|
|
sys.path.insert(0, str(next(p / "_STANDARDS" for p in HERE.parents if (p / "_STANDARDS").is_dir())))
|
|||
|
|
|
|||
|
|
from mpmdoc import Doc, TBC
|
|||
|
|
|
|||
|
|
doc = Doc(
|
|||
|
|
number="BOM-MPM-SUBJ-01", rev="0.1", date="2026-11-06",
|
|||
|
|
customer=None, subject="Project hardware",
|
|||
|
|
title="What Is Being Packed",
|
|||
|
|
lede="What the list covers and what to do with it (pull, check off, pack).",
|
|||
|
|
meta=[("Customer", "Customer"), ("Prepared by", "Jason · MPM")],
|
|||
|
|
slug="Customer_Short-Title_BOM",
|
|||
|
|
history=[("0.1", "2026-11-06", "Initial draft.")],
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
doc.add(
|
|||
|
|
# (item, specification, qty, uom[, part no.]) · group by category · subtotal per section
|
|||
|
|
doc.bom([
|
|||
|
|
("Fasteners", [
|
|||
|
|
("Hex bolt, M8 × 30 mm", f"M8 × 1.25 · 30 mm L · hex head<br>Material/grade {TBC}", 150, "ea"),
|
|||
|
|
("Flange nut, M8", "M8 × 1.25 · serrated flange", 150, "ea", "PN-0000"),
|
|||
|
|
], "Fastener subtotal"),
|
|||
|
|
("Consumables", [
|
|||
|
|
("Sealing tape", f"Foil tape<br>Width × length {TBC}", 6, "roll"),
|
|||
|
|
], "Consumables subtotal"),
|
|||
|
|
]),
|
|||
|
|
doc.note("Draft · items to confirm before release", [
|
|||
|
|
"<b>Material and grade</b> for all fasteners.",
|
|||
|
|
"<b>Tape size</b> (width × roll length).",
|
|||
|
|
], tone="warn"),
|
|||
|
|
doc.signoff(("Pulled by", "Checked by", "Date")),
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
doc.build()
|