Bottle caps: PCO-1810 & PCO-1881 necks and caps

⚙️ Spec sheet →  —  visual schematic and metrics measured from a real rendered STL.

⚙️ 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 turtle2d() path revolved with rotate_extrude, exactly as BOSL2 builds it; the thread is ThreadHelix 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 pybosl2.parts.bottlecaps import BottleCaps
(BottleCaps.pco1881_neck() | BottleCaps.pco1881_cap().right(45)).show()
Loading 3-D preview…

⬇ Download STL mesh

API reference

class pybosl2.parts.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).

See also

Visual spec sheet — measurements and STL previews

static pco1810_neck(fn=None, fa=None, fs=None)[source]

Return a PCO-1810 threaded beverage-bottle neck (BOSL2 pco1810_neck()).

Parameters:
fn : int | None

Number of fragments for cylinder resolution. Passed to the geometry primitives.

fa : float | None

Minimum fragment angle. Passed to the geometry primitives.

fs : float | None

Minimum fragment size. Passed to the geometry primitives.

Returns:

A PCO-1810 bottle neck as a Bosl2Solid anchored bottom-on-origin.

Return type:

CsgSolid

Examples

A standard PCO 1810 bottle neck (28 mm):

from pybosl2.parts.bottlecaps import BottleCaps
BottleCaps.pco1810_neck(fa=6).show()
Loading 3-D preview…

⬇ Download STL mesh

static pco1810_cap(wall=2, texture=BottleCapTexture.NONE, fn=None, fa=None, fs=None)[source]

Return 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

Cap wall thickness in mm. Defaults to 2.

texture : str | BottleCapTexture

Cap surface texture style (NONE, RIBS, or CHECKERS). Defaults to NONE.

fn : int | None

Number of fragments for cylinder resolution. Passed to the geometry primitives.

fa : float | None

Minimum fragment angle. Passed to the geometry primitives.

fs : float | None

Minimum fragment size. Passed to the geometry primitives.

Returns:

A PCO-1810 bottle cap as a Bosl2Solid anchored bottom-on-origin.

Return type:

CsgSolid

Examples

A plain-walled cap for a PCO 1810 neck:

from pybosl2.parts.bottlecaps import BottleCaps
BottleCaps.pco1810_cap(fa=6).show()
Loading 3-D preview…

⬇ Download STL mesh

static pco1881_neck(fn=None, fa=None, fs=None)[source]

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

Parameters:
fn : int | None

Number of fragments for cylinder resolution. Passed to the geometry primitives.

fa : float | None

Minimum fragment angle. Passed to the geometry primitives.

fs : float | None

Minimum fragment size. Passed to the geometry primitives.

Returns:

A PCO-1881 bottle neck as a Bosl2Solid anchored bottom-on-origin.

Return type:

CsgSolid

Examples

A standard PCO 1881 bottle neck (38 mm):

from pybosl2.parts.bottlecaps import BottleCaps
BottleCaps.pco1881_neck(fa=6).show()
Loading 3-D preview…

⬇ Download STL mesh

static pco1881_cap(wall=2, texture=BottleCapTexture.NONE, fn=None, fa=None, fs=None)[source]

Return 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

Cap wall thickness in mm. Defaults to 2.

texture : str | BottleCapTexture

Cap surface texture style (NONE, RIBS, or CHECKERS). Defaults to NONE.

fn : int | None

Number of fragments for cylinder resolution. Passed to the geometry primitives.

fa : float | None

Minimum fragment angle. Passed to the geometry primitives.

fs : float | None

Minimum fragment size. Passed to the geometry primitives.

Returns:

A PCO-1881 bottle cap as a Bosl2Solid anchored bottom-on-origin.

Return type:

CsgSolid

Examples

A plain-walled cap for a PCO 1881 neck:

from pybosl2.parts.bottlecaps import BottleCaps
BottleCaps.pco1881_cap(fa=6).show()
Loading 3-D preview…

⬇ Download STL mesh

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:

from pybosl2.parts.bottlecaps import BottleCaps
BottleCaps.pco1810_neck().show()
Loading 3-D preview…

⬇ Download STL mesh

pco1810_cap

Its matching cap:

from pybosl2.parts.bottlecaps import BottleCaps
BottleCaps.pco1810_cap().show()
Loading 3-D preview…

⬇ Download STL mesh

pco1881_neck

A PCO-1881 bottle neck:

from pybosl2.parts.bottlecaps import BottleCaps
BottleCaps.pco1881_neck().show()
Loading 3-D preview…

⬇ Download STL mesh

pco1881_cap

Its matching cap:

from pybosl2.parts.bottlecaps import BottleCaps
BottleCaps.pco1881_cap().show()
Loading 3-D preview…

⬇ Download STL mesh