NEMA steppers

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

Pure-Python port of BOSL2’s nema_steppers.scad: models of NEMA-standard stepper motors and the masks that cut their mounting-hole pattern into a plate. NemaMotor builds a motor (body, plinth, shaft and blind screw holes) for a NEMA size; NemaMountMask is the bolt-pattern-plus-plinth cutout; NemaSpec returns the standard dimensions.

class pybosl2.parts.nema_steppers.NemaSpec(size)[source]

Bases: object

Standard dimensions of a NEMA stepper motor (BOSL2 nema_motor_info()).

Construct with the NEMA size directly: NemaSpec(17).

Parameters:
size : int

motor_width : float
plinth_height : float
plinth_diam : float
screw_spacing : float
screw_size : float
screw_depth : float
shaft_diam : float
class pybosl2.parts.nema_steppers.NemaMotor(size=17, height=24, shaft_len=20, fn=None, fa=None, fs=None)[source]

Bases: object

A model of a NEMA stepper motor.

The motor’s mounting face is at z = 0 with the body below it and the plinth and shaft projecting up; the four mounting holes are drilled into the face.

Examples

A NEMA 17 motor:

from pybosl2.parts.nema_steppers import NemaMotor
NemaMotor(size=17).show()
Loading 3-D preview…

⬇ Download STL mesh

Parameters:
size : int

height : float

shaft_len : float

fn : int | None

fa : float | None

fs : float | None

property spec : NemaSpec

The resolved NemaSpec.

property size : int

NEMA size (6, 8, 11, 14, 17, 23, 34 or 42).

property height : float

Motor body height in mm.

property shaft_len : float

Shaft projection length in mm.

shape()[source]

Build and return the motor geometry (cached).

Return type:

CsgSolid

show()[source]

Display the motor in the viewer.

Return type:

None

class pybosl2.parts.nema_steppers.NemaMountMask(size, depth=5, length=5, atype=NemaMaskType.FULL, slop=0.0, fn=None, fa=None, fs=None)[source]

Bases: object

The mounting cutout for a NEMA stepper motor – difference it from a plate.

Cuts the four screw holes and (atype=NemaMaskType.FULL) the central plinth clearance. A slot length > 0 elongates each hole so the motor can be positioned (e.g. to tension a belt).

Examples

A NEMA 17 mount mask:

from pybosl2.parts.nema_steppers import NemaMountMask, NemaMaskType
NemaMountMask(size=17, atype=NemaMaskType.FULL).show()
Loading 3-D preview…

⬇ Download STL mesh

Parameters:
size : int

depth : float

length : float

atype : NemaMaskType

slop : float

fn : int | None

fa : float | None

fs : float | None

property spec : NemaSpec

The resolved NemaSpec.

property size : int

NEMA size.

property mask_type : NemaMaskType

Mask cutout type.

shape()[source]

Build and return the mount mask geometry (cached).

Return type:

CsgSolid

show()[source]

Display the mount mask in the viewer.

Return type:

None

class pybosl2.parts.nema_steppers.NemaMaskType(*values)[source]

Bases: StrEnum

Mounting mask cutout type for NEMA stepper motors.

FULL = 'full'
SCREWS = 'screws'

Examples

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

nema_stepper_motor

NEMA 8:

from pybosl2.parts.nema_steppers import NemaMotor
NemaMotor(size=8, height=24, shaft_len=15).show()
Loading 3-D preview…

⬇ Download STL mesh

NEMA 11:

from pybosl2.parts.nema_steppers import NemaMotor
NemaMotor(size=11, height=24, shaft_len=20).show()
Loading 3-D preview…

⬇ Download STL mesh

NEMA 17:

from pybosl2.parts.nema_steppers import NemaMotor
NemaMotor(size=17, height=40, shaft_len=30).show()
Loading 3-D preview…

⬇ Download STL mesh

NEMA 23:

from pybosl2.parts.nema_steppers import NemaMotor
NemaMotor(size=23, height=50, shaft_len=40).show()
Loading 3-D preview…

⬇ Download STL mesh

nema_mount_mask

Bolt-pattern mask for a NEMA 14:

from pybosl2.parts.nema_steppers import NemaMountMask
NemaMountMask(size=14, depth=5, length=5).show()
Loading 3-D preview…

⬇ Download STL mesh

NEMA 17 with slotted holes:

from pybosl2.parts.nema_steppers import NemaMountMask
NemaMountMask(size=17, depth=5, length=5).show()
Loading 3-D preview…

⬇ Download STL mesh

NEMA 17 with round holes (length=0):

from pybosl2.parts.nema_steppers import NemaMountMask
NemaMountMask(size=17, depth=5, length=0).show()
Loading 3-D preview…

⬇ Download STL mesh