Sliders & rails

⚙️ 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 BOSL2’s sliders.scad: a V-groove Slider and the matching Rail, both designed to 3-D print without support. Tune the printed fit with the slider’s slop.

class pybosl2.parts.sliders.Slider(l=30, w=10, h=10, base=10, wall=5, angle=30, slop=0.0, fn=None, fa=None, fs=None)[source]

Bases: object

V-groove slider (BOSL2 slider()).

The slider rides in a matching V-groove rail. Both print without support. slop tunes the printed fit.

Examples

A slider:

from pybosl2.parts.sliders import Slider
Slider(l=30, base=10, wall=4, slop=0.2).show()
Loading 3-D preview…

⬇ Download STL mesh

Parameters:
l : float

w : float

h : float

base : float

wall : float

angle : float

slop : float

fn : int | None

fa : float | None

fs : float | None

property length : float

Slider length in mm.

property width : float

Slider width in mm.

property height : float

Slider height in mm.

shape()[source]

Return the slider geometry.

Return type:

CsgSolid

show()[source]

Display the slider in the viewer.

Return type:

None

class pybosl2.parts.sliders.Rail(l=30, w=10, h=10, chamfer=1.0, angle=30)[source]

Bases: object

V-groove rail (BOSL2 rail()).

A matching rail for the V-groove slider.

Examples

A rail:

from pybosl2.parts.sliders import Rail
Rail(l=100, w=10, h=10).show()
Loading 3-D preview…

⬇ Download STL mesh

Parameters:
l : float

w : float

h : float

chamfer : float

angle : float

property length : float

Rail length in mm.

property width : float

Rail width in mm.

property height : float

Rail height in mm.

shape()[source]

Return the rail geometry.

Return type:

CsgSolid

show()[source]

Display the rail in the viewer.

Return type:

None

Examples

These mirror the examples in BOSL2’s sliders.scad, rendered live through PythonSCAD. Examples that rely on BOSL2’s attachment/anchor system, or on features not in this port, are omitted.

slider

A V-groove slider:

from pybosl2.parts.sliders import Slider
Slider(l=30, base=10, wall=4, slop=0.2).shape().show()
Loading 3-D preview…

⬇ Download STL mesh

rail

The mating rail:

from pybosl2.parts.sliders import Rail
Rail(l=100, w=10, h=10).shape().show()
Loading 3-D preview…

⬇ Download STL mesh