Joiners¶
⚙️ Spec sheet → — visual schematic and metrics measured from a real rendered STL.
Pure-Python port of the core joiners from BOSL2’s joiners.scad — shapes for connecting two
separately-printed parts. Dovetail is the flagship: a (optionally
tapered) dovetail joint you attach as a male tenon or difference out as a female socket. A functional
SnapPin and its SnapPinSocket give a
press-and-click pin.
-
class pybosl2.parts.joiners.Dovetail(gender=
Gender.MALE, width=15, height=8, slide=30, angle=None, slope=6, taper=0, back_width=None, slop=0.0, fn=None, fa=None, fs=None)[source]¶ Bases:
objectA dovetail joint that slides along Y and flares upward in X.
The male form is a tenon you attach to a part; the female form is the same shape enlarged by slop for you to difference out as the mating socket. slope is the flare (rise/run per side;
anglesets it as1/tan(angle)). Give taper (degrees) or back_width to taper it along its length.Examples
A male dovetail beside its female socket:
from pybosl2.parts.enums import Gender from pybosl2.parts.joiners import Dovetail (Dovetail(Gender.MALE, width=15, height=8, slide=30).shape() | Dovetail(Gender.FEMALE, width=15, height=8, slide=30).shape().right(24)).show()Loading 3-D preview…- Parameters:¶
- property gender : Gender¶
Male or female.
- property width : float¶
Base width in mm.
- property height : float¶
Joint height in mm.
- property slide : float¶
Slide length in mm.
-
class pybosl2.parts.joiners.SnapPin(diameter=
5, length=12, nub_depth=0.6, snap=2.2, clearance=0.2, slot=1.2, fn=None, fa=None, fs=None)[source]¶ Bases:
objectA press-and-click snap pin: a slotted shaft with a barbed head.
Push it head-first through a hole; the slot lets the barb compress and spring back to lock. nub_depth is the barb overhang, snap its height, and slot the width of the flex gap.
Examples
A snap pin:
from pybosl2.parts.joiners import SnapPin SnapPin().show()Loading 3-D preview…- Parameters:¶
- property diameter : float¶
Shaft diameter in mm.
- property length : float¶
Shaft length in mm.
-
class pybosl2.parts.joiners.SnapPinSocket(diameter=
5, length=12, nub_depth=0.6, snap=2.2, clearance=0.2, fn=None, fa=None, fs=None)[source]¶ Bases:
objectThe mating socket mask for a
SnapPin— difference it out of a part.A clearance bore with a relief groove that the pin’s barb clicks into.
Examples
A snap pin socket:
from pybosl2.parts.joiners import SnapPinSocket SnapPinSocket().show()Loading 3-D preview…- Parameters:¶
- property diameter : float¶
Shaft diameter in mm.
- property length : float¶
Shaft length in mm.
Examples¶
These mirror the examples in BOSL2’s joiners.scad, rendered live through PythonSCAD.
Examples that rely on BOSL2’s attachment/anchor system, or on features not in this port, are omitted.
dovetail
Straight dovetail, male:
from pybosl2.parts.enums import Gender
from pybosl2.parts.joiners import Dovetail
Dovetail(Gender.MALE, width=15, height=8, slide=30).show()
Straight dovetail, female socket:
from pybosl2.parts.enums import Gender
from pybosl2.parts.joiners import Dovetail
Dovetail(Gender.FEMALE, width=15, height=8, slide=30).show()
A 6-degree taper:
from pybosl2.parts.enums import Gender
from pybosl2.parts.joiners import Dovetail
Dovetail(Gender.MALE, width=15, height=8, slide=30, taper=6).show()
Setting the dovetail angle:
from pybosl2.parts.enums import Gender
from pybosl2.parts.joiners import Dovetail
Dovetail(Gender.MALE, width=15, height=8, slide=10, angle=30).show()
A narrower back width:
from pybosl2.parts.enums import Gender
from pybosl2.parts.joiners import Dovetail
Dovetail(Gender.MALE, slide=50, width=18, height=4, back_width=15).show()
Setting the flank slope:
from pybosl2.parts.enums import Gender
from pybosl2.parts.joiners import Dovetail
Dovetail(Gender.MALE, slide=15, width=20, height=8, slope=2).show()
snap_pin
A snap pin:
from pybosl2.parts.joiners import SnapPin
SnapPin().show()
snap_pin_socket
The matching socket:
from pybosl2.parts.joiners import SnapPinSocket
SnapPinSocket().show()