Ball bearings¶
⚙️ Spec sheet → — visual schematic and metrics measured from a real rendered STL.
Pure-Python port of BOSL2’s ball_bearings.scad: models of standard ball-bearing cartridges.
ball_bearing() builds one from a trade-size name or explicit
dimensions; ball_bearing_info() returns the tabulated
dimensions as a BearingSpec.
.. autoclass:: bosl2.ball_bearings.BearingSpec
- members:
- class bosl2.ball_bearings.BallBearings[source]¶
Bases:
objectStandard ball-bearing cartridge models (BOSL2 ball_bearings.scad).
- static ball_bearing_info(trade_size)[source]¶
The
BearingSpecfor a standard trade size, e.g."608"/"6902ZZ"/"R8".- Parameters:
trade_size (str)
- Return type:
BearingSpec
- static ball_bearing(trade_size=None, inner_diameter=None, outer_diameter=None, width=None, shield=True, color='silver', fn=None, fa=None, fs=None)[source]¶
A ball-bearing cartridge model (BOSL2 ball_bearing()).
Give a trade_size name, or explicit inner_diameter/outer_diameter/width (with shield). Returns a
Bosl2Solidcentered on the origin.Examples
A common 608 skate bearing:
from bosl2.ball_bearings import BallBearings BallBearings.ball_bearing("608").show()
- Parameters:
trade_size (str | None)
inner_diameter (float | None)
outer_diameter (float | None)
width (float | None)
shield (bool)
color (str | None)
fn (int | None)
fa (float | None)
fs (float | None)
- Return type:
Examples¶
These mirror the examples in BOSL2’s ball_bearings.scad, rendered live through PythonSCAD.
Examples that rely on BOSL2’s attachment/anchor system, or on features not in this port, are omitted.
ball_bearing
A 608 skate bearing:
BallBearings.ball_bearing("608").show()
A shielded 608ZZ:
BallBearings.ball_bearing("608ZZ").show()
An R8 imperial bearing:
BallBearings.ball_bearing("R8").show()
A custom open bearing by dimensions:
BallBearings.ball_bearing(inner_diameter=12, outer_diameter=32, width=10, shield=False).show()