Bottle caps: PCO-1810 & PCO-1881 necks and caps¶
⚙️ Parts catalog → — this module is featured in the visual parts catalog.
Pure-Python port of the standard soda-bottle threadings from BOSL2’s bottlecaps.scad. The
BottleCaps class builds a threaded neck to graft onto a bottle body
and a matching cap, for the two common beverage-bottle standards:
BottleCaps.pco1810_neck() # PCO-1810 neck
BottleCaps.pco1810_cap() # matching PCO-1810 cap
BottleCaps.pco1881_neck() # PCO-1881 neck (the modern short-neck standard)
BottleCaps.pco1881_cap() # matching PCO-1881 cap
The neck outline (inner bore, support ring, tamper-ring channel and sealing lip) is a
turtle() path revolved with rotate_extrude, exactly as BOSL2 builds it; the
thread is thread_helix() with the two thread breaks cut by the same
prismoids. Geometry is anchored with its bottom on the XY plane.
Approximations relative to BOSL2¶
This port’s threading/cyl lack a few BOSL2 features, so the following are approximated:
Feature |
Status |
Notes |
|---|---|---|
|
ported |
faithful revolved profile; threads without the lead-in |
|
ported |
bored cap with internal thread built without the |
|
not ported |
fall back to a plain wall (VNF surface texturing is not in this port). |
named anchors ( |
not ported |
geometry is anchored bottom-on-origin instead. |
|
not ported |
a follow-up. |
Examples¶
A PCO-1881 neck and its cap, side by side:
from bosl2.bottlecaps import BottleCaps
(BottleCaps.pco1881_neck() | BottleCaps.pco1881_cap().right(45)).show()
API reference¶
- class bosl2.bottlecaps.BottleCaps[source]¶
Bases:
objectStandard soda-bottle necks and caps (BOSL2 bottlecaps.scad, PCO-1810 & PCO-1881).
Each
*_neck/*_capreturns aBosl2Solidanchored with its bottom on the XY plane. See the module docstring for the geometry approximations relative to BOSL2 (thread taper, internal-thread flank, and cap surface textures are not reproduced).- static pco1810_neck(wall=2)[source]¶
A PCO-1810 threaded beverage-bottle neck (BOSL2 pco1810_neck()).
- Parameters:
wall (float)
- Return type:
- static pco1810_cap(wall=2, texture='none')[source]¶
A cap for a PCO-1810 bottle (BOSL2 pco1810_cap()).
textureother than"none"falls back to a plain wall (surface texturing is not in this port).- Parameters:
wall (float)
texture (str)
- Return type:
- static pco1881_neck(wall=2)[source]¶
A PCO-1881 threaded beverage-bottle neck (BOSL2 pco1881_neck()).
- Parameters:
wall (float)
- Return type:
Examples¶
These mirror the examples in BOSL2’s bottlecaps.scad, rendered live through PythonSCAD.
Examples that rely on BOSL2’s attachment/anchor system, or on features not in this port, are omitted.
pco1810_neck
A PCO-1810 bottle neck:
BottleCaps.pco1810_neck().show()
pco1810_cap
Its matching cap:
BottleCaps.pco1810_cap().show()
pco1881_neck
A PCO-1881 bottle neck:
BottleCaps.pco1881_neck().show()
pco1881_cap
Its matching cap:
BottleCaps.pco1881_cap().show()