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

pco1810_neck / pco1881_neck

ported

faithful revolved profile; threads without the lead-in taper.

pco1810_cap / pco1881_cap

ported

bored cap with internal thread built without the internal= flank flip.

knurled / ribbed cap textures

not ported

fall back to a plain wall (VNF surface texturing is not in this port).

named anchors ("support-ring", "inside-top", …)

not ported

geometry is anchored bottom-on-origin instead.

generic_bottle_neck / generic_bottle_cap, bottle adapters, SPI (sp_) threads

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()

⬇ Download STL mesh

API reference

class bosl2.bottlecaps.BottleCaps[source]

Bases: object

Standard soda-bottle necks and caps (BOSL2 bottlecaps.scad, PCO-1810 & PCO-1881).

Each *_neck / *_cap returns a Bosl2Solid anchored 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:

Bosl2Solid

static pco1810_cap(wall=2, texture='none')[source]

A cap for a PCO-1810 bottle (BOSL2 pco1810_cap()). texture other than "none" falls back to a plain wall (surface texturing is not in this port).

Parameters:
  • wall (float)

  • texture (str)

Return type:

Bosl2Solid

static pco1881_neck(wall=2)[source]

A PCO-1881 threaded beverage-bottle neck (BOSL2 pco1881_neck()).

Parameters:

wall (float)

Return type:

Bosl2Solid

static pco1881_cap(wall=2, texture='none')[source]

A cap for a PCO-1881 bottle (BOSL2 pco1881_cap()). texture other than "none" falls back to a plain wall (surface texturing is not in this port).

Parameters:
  • wall (float)

  • texture (str)

Return type:

Bosl2Solid

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()

⬇ Download STL mesh

pco1810_cap

Its matching cap:

BottleCaps.pco1810_cap().show()

⬇ Download STL mesh

pco1881_neck

A PCO-1881 bottle neck:

BottleCaps.pco1881_neck().show()

⬇ Download STL mesh

pco1881_cap

Its matching cap:

BottleCaps.pco1881_cap().show()

⬇ Download STL mesh