Library of parts modelled in OpenSCAD and a framework for making projects
OpenSCAD
1,652
1,637 commits
updated Sep 24, 2026
An ever expanding library of parts modelled in OpenSCAD useful for 3D printers and enclosures for electronics, etc.
It contains lots of vitamins (the RepRap term for non-printed parts), some general purpose printed parts and some utilities. There are also Python scripts to generate Bills of Materials (BOMs), STL files for all the printed parts, DXF files for CNC routed parts in a project and a manual containing assembly instructions and exploded views by scraping markdown embedded in OpenSCAD comments, see scripts.
A simple example project can be found here and more complex examples here.
For more examples of what it can make see the gallery.
The license is GNU General Public License v3.0, see COPYING.
See usage for requirements, installation instructions and a usage guide.
A list of changes classified as breaking, additions or fixes is maintained in CHANGELOG.md.
7 Segment displays.
Can be single digits stacked side by side or can be multiple digits in one unit. This is determined by the overall width compared to the width of a digit. Presence of a decimal point is determined by the number of pins. Its position is determined by a heuristic.
vitamins/7_segments.scad Object definitions.
vitamins/7_segment.scad Implementation.
tests/7_segments.scad Code for this example.
| Function | Description |
|---|---|
7_segment_digit_size(type) | Size of the actual digit and segment width and angle |
7_segment_pin_pitch(type) | x and y pin pitches and pin diameter |
7_segment_pins(type) | None |
7_segment_size(type) | Size of the body |
| Module | Description |
|---|---|
7_segment_digit(type, colour = grey(95), pin_length = 6.4) | Draw the specified 7 segment digit |
7_segment_digits(type, n, colour = grey(70), pin_length = 6.4, cutout = false) | Draw n digits side by side |

Wifi Antennas
vitamins/antennas.scad Object definitions.
vitamins/antenna.scad Implementation.
tests/antennas.scad Code for this example.
| Function | Description |
|---|---|
antenna_bot_d(type) | Diameter at the base |
antenna_gap(type) | Space for left panel, washers and nuts when screwed on fully. |
antenna_grip(type) | Grip d, h, h2 |
antenna_hinge(type) | Hinge post width, z value of the pin, pin diameter, width reduction and slot width |
antenna_length(type) | Total length |
antenna_rings(type) | List of ring z, thickness, depths |
antenna_split(type) | Split point |
antenna_straight(type) | Length of the straight part |
antenna_top_d(type) | Diameter at the top |
| Function | Description |
|---|---|
antenna_hole_r(type) | Panel hole radius |
antenna_nut(type) | The nut |
| Module | Description |
|---|---|
antenna(type, thickness, angle) | Draw a WiFi antenna |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | antenna(ESP201_antenna) | Antenna ESP201 |
| 1 | nut(ant_nut) | Nut M6.25 x 1.8mm |
| 1 | star_washer(ant_washer_washer) | Washer star M6.4 x 0.6mm |
Axial components for PCBs.
vitamins/axials.scad Object definitions.
vitamins/axial.scad Implementation.
tests/axials.scad Code for this example.
| Function | Description |
|---|---|
ax_diode_colour(type) | Body colour and stripe colour |
ax_diode_size(type) | Body length, diameter and corner radius |
ax_diode_wire(type) | Wire diameter |
ax_res_colour(type) | Body colour |
ax_res_diameter(type) | Body diameter |
ax_res_end_d(type) | End cap diameter |
ax_res_end_l(type) | End cap length |
ax_res_length(type) | Body length |
ax_res_wattage(type) | Power rating |
ax_res_wire(type) | Wire diameter |
| Module | Description |
|---|---|
ax_diode(type, value, pitch = 0) | Through hole axial diode. If pitch is zero the minimum is used. If below the minimum the resistor is placed vertical. |
ax_res(type, value, tol = 5, pitch = 0) | Through hole axial resistor. If pitch is zero the minimum is used. If below the minimum the resistor is placed vertical. |
wire_link(d, l, h = 1, tail = 3, sleeve = false) | Draw a wire jumper link. sleeve can be a list with the diameter and colour. If l is zero then a vertical wire is drawn. |

| Qty | Module call | BOM entry |
|---|---|---|
| 2 | ax_diode(DO_41, "1N4007") | Diode 1N4007 |
| 2 | ax_diode(DO_35, "1N4148") | Diode 1N4148 |
| 1 | pcb(PERF60x40) | Perfboard 60 x 40mm |
| 1 | ax_res(res1_8, 1000) | Resistor 1000 Ohms 5% 0.125W |
| 1 | ax_res(res1_8, 2200, tol = 1) | Resistor 2200 Ohms 1% 0.125W |
| 1 | ax_res(res1_4, 39000, tol = 1) | Resistor 39000 Ohms 1% 0.25W |
| 1 | ax_res(res1_4, 47000) | Resistor 47000 Ohms 5% 0.25W |
| 1 | ax_res(res1_2, 8200) | Resistor 8200 Ohms 5% 0.5W |
| 1 | ax_res(res1_2, 8250, tol = 1) | Resistor 8250 Ohms 1% 0.5W |
| 1 | wire_link(0.8, 7.62, h = 0.75, sleeve = [1.5, "red"]) | Wire link 0.8mm x 0.3" with red sleeving |
| 1 | wire_link(0.8, 10.16) | Wire link 0.8mm x 0.4" |
| 1 | wire_link(0.8, 0, h = 5) | Wire link 0.8mm x 8mm |
Simple model of ball bearings with seals, the colour of which can be specified. If silver they are assumed to be metal and the part number gets a ZZ suffix. Any other colour is assumed to be rubber and the suffix is -2RS.
If a ball bearing has a child it is placed on its top surface, the same as nuts and washers, etc.
Also single bearing balls are modelled as just a silver sphere and a BOM entry.
vitamins/ball_bearings.scad Object definitions.
vitamins/ball_bearing.scad Implementation.
tests/ball_bearings.scad Code for this example.
| Function | Description |
|---|---|
bb_bore(type) | Internal diameter |
bb_colour(type) | Shield colour, "silver" for metal |
bb_diameter(type) | External diameter |
bb_flange_diameter(type) | Flange diameter |
bb_flange_width(type) | Flange width |
bb_hub(type) | Inner rim thickness guesstimate |
bb_name(type) | Part code without shield type suffix |
bb_rim(type) | Outer rim thickness guesstimate |
bb_width(type) | Width |
| Module | Description |
|---|---|
ball_bearing(type) | Draw a ball bearing |
bearing_ball(dia) | Draw a steel bearing ball |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | ball_bearing(BB608) | Ball bearing 608-2RS 8mm x 22mm x 7mm |
| 1 | ball_bearing(BB6200) | Ball bearing 6200-2RS 10mm x 30mm x 9mm |
| 1 | ball_bearing(BB6201) | Ball bearing 6201-2RS 12mm x 32mm x 10mm |
| 1 | ball_bearing(BB624) | Ball bearing 624-2RS 4mm x 13mm x 5mm |
| 1 | ball_bearing(BB6808) | Ball bearing 6808-2RS 40mm x 52mm x 7mm |
| 1 | ball_bearing(BB686) | Ball bearing 686ZZ 6mm x 13mm x 5mm |
| 1 | ball_bearing(BB696) | Ball bearing 696ZZ 6mm x 16mm x 5mm |
| 1 | ball_bearing(BBF623) | Ball bearing F623-2RS 3mm x 10mm x 4mm |
| 1 | ball_bearing(BBF625) | Ball bearing F625ZZ 5mm x 16mm x 5mm |
| 1 | ball_bearing(BBF693) | Ball bearing F693ZZ 3mm x 8mm x 3mm |
| 1 | ball_bearing(BBF695) | Ball bearing F695ZZ 5mm x 13mm x 4mm |
| 1 | ball_bearing(BBMR63) | Ball bearing MR63ZZ 3mm x 6mm x 2.5mm |
| 1 | ball_bearing(BBMR83) | Ball bearing MR83ZZ 3mm x 8mm x 3mm |
| 1 | ball_bearing(BBMR85) | Ball bearing MR85ZZ 5mm x 8mm x 2.5mm |
| 1 | ball_bearing(BBMR93) | Ball bearing MR93ZZ 3mm x 9mm x 4mm |
| 1 | ball_bearing(BBMR95) | Ball bearing MR95ZZ 5mm x 9mm x 3mm |
| 1 | ball_bearing(BBSMR95) | Ball bearing SMR95ZZ 5mm x 9mm x 2.5mm |
| 8 | bearing_ball(3) | Steel ball 3mm |
Actually just single cells at the moment, shown here with mating contacts in place.
Note that the Lumintop LM34 has a built in charger with a USB socket and two LEDs.
The battery length includes its contacts and the origin is the centre of that length. As well as drawing the battery and contacts there are functions exposing enough information to make a battery box.
vitamins/batteries.scad Object definitions.
vitamins/battery.scad Implementation.
tests/batteries.scad Code for this example.
| Function | Description |
|---|---|
battery_colour(type) | Casing colour |
battery_contact(type) | Contact type |
battery_diameter(type) | Casing diameter |
battery_led_positions(type) | LED positions for Lumintop |
battery_length(type) | Total length including terminals |
battery_neg_dia(type) | Negative terminal diameter |
battery_pos_dia(type) | Positive terminal diameter |
battery_pos_height(type) | Positive terminal height above the casing |
battery_type(type) | Battery type |
battery_usb_offset(type) | USB connector offset from the top |
contact_height(type) | Height of the flat part |
contact_neg(type) | Negative spring height above the plate when compressed and the spring type |
contact_pos(type) | Positive contact dimple height and top and bottom internal diameter |
contact_tab_length(type) | Length of the tab |
contact_tab_width(type) | Width of the tab |
contact_thickness(type) | Thickness of the metal |
contact_width(type) | Width of the flat part |
| Module | Description |
|---|---|
battery(type) | Draw a battery |
battery_contact(type, pos = true) | Draw a positive or negative battery contact for specified battery |
battery_led_positions(type) | Position of the LEDs on a Lumintop |

| Qty | Module call | BOM entry |
|---|---|---|
| 10 | battery_contact(bcontact, false) | Battery negative contact |
| 10 | battery_contact(bcontact, true) | Battery positive contact |
| 1 | battery(A23CELL) | Cell A23 12v |
| 1 | battery(AACELL) | Cell AA |
| 1 | battery(AAACELL) | Cell AAA |
| 1 | battery(CCELL) | Cell C |
| 1 | battery(DCELL) | Cell D |
| 1 | battery(LUMINTOP) | Cell LUMINTOP 18650 LION with charger |
| 1 | battery(S25R18650) | Cell Samsung 25R 18650 LION |
| 1 | battery(L16340) | Li-Ion/LiFePo4 16340 3.2v |
| 1 | battery(L32700) | Li-Ion/LiFePo4 32700 3.2v |
| 1 | battery(L4680) | Li-Ion/LiFePo4 4680 3.2v |
SCSnUU and SCSnLUU bearing blocks
vitamins/bearing_blocks.scad Object definitions.
vitamins/bearing_block.scad Implementation.
tests/bearing_blocks.scad Code for this example.
| Function | Description |
|---|---|
sbr_bearing(type) | Linear bearing used |
sbr_circlip(type) | Circlip used |
sbr_hole_offset(type) | Offset of bearing hole from base of rail |
sbr_screw(type) | Screw type |
sbr_screw_separation_x(type) | Screw separation in X direction |
sbr_screw_separation_z(type) | Screw separation in Z direction |
sbr_side_height(type) | Height of side above rail |
sbr_spacer(type) | Spacer used in long bearings |
scs_bearing(type) | Linear bearing used |
scs_block_center_height(type) | Height of the center of the block |
scs_block_side_height(type) | Height of the side of the block, this determines the minimum screw length |
scs_circlip(type) | Circlip used |
scs_hole_offset(type) | Offset of bearing hole from base of block |
scs_screw(type) | Screw type |
scs_screw_separation_x(type) | Screw separation in X direction |
scs_screw_separation_z(type) | Screw separation in Z direction |
scs_spacer(type) | Spacer used in long bearings |
| Function | Description |
|---|---|
sbr_size(type) | Size of SBR bracket bounding block |
scs_size(type) | Size of scs bracket bounding block |
| Module | Description |
|---|---|
right_trapezoid(base, top, height, h = 0, center = true) | A right angled trapezoid with the 90° corner at the origin. 3D when h is nonzero, otherwise 2D |
sbr_bearing_block(type) | Draw the specified SBR bearing block |
sbr_bearing_block_assembly(type, part_thickness, screw_type) | Assembly with screws in place |
sbr_bearing_block_hole_positions(type) | Place children at hole positions |
scs_bearing_block(type) | Draw the specified SCS bearing block |
scs_bearing_block_assembly(type, part_thickness, screw_type, nut_type) | Assembly with screws and nuts in place |
scs_bearing_block_hole_positions(type) | Place children at hole positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 12 | nut(M4_nut) | Nut M4 x 3.2mm |
| 24 | nut(M5_nut) | Nut M5 x 4mm |
| 1 | sbr_bearing_block(SBR16UU) | SBR16UU bearing block |
| 1 | scs_bearing_block(SCS10LUU) | SCS10LUU bearing block |
| 1 | scs_bearing_block(SCS10UU) | SCS10UU bearing block |
| 1 | scs_bearing_block(SCS12LUU) | SCS12LUU bearing block |
| 1 | scs_bearing_block(SCS12UU) | SCS12UU bearing block |
| 1 | scs_bearing_block(SCS16LUU) | SCS16LUU bearing block |
| 1 | scs_bearing_block(SCS16UU) | SCS16UU bearing block |
| 1 | scs_bearing_block(SCS6UU) | SCS6UU bearing block |
| 1 | scs_bearing_block(SCS8LUU) | SCS8LUU bearing block |
| 1 | scs_bearing_block(SCS8UU) | SCS8UU bearing block |
| 4 | screw(M4_cap_screw, 25) | Screw M4 cap x 25mm |
| 8 | screw(M4_cap_screw, 30) | Screw M4 cap x 30mm |
| 4 | screw(M5_cap_screw, 16) | Screw M5 cap x 16mm |
| 16 | screw(M5_cap_screw, 35) | Screw M5 cap x 35mm |
| 8 | screw(M5_cap_screw, 45) | Screw M5 cap x 45mm |
| 12 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
| 24 | washer(M5_washer) | Washer M5 x 10mm x 1mm |
Models timing belt running in a path over toothed or smooth pulleys and calculates an accurate length. Only models 2D paths, belt may twist to support crossed belt core XY and other designs where the belt twists!
By default the path is a closed loop. An open loop can be specified by specifying open=true, and in that case the start and end points are not connected, leaving the loop open.
To get a 180 degree twist of the loop, you can use the twist argument. Twist can be a single number, and in that case the belt will twist after
the position with that number. Alternatively twist can be a list of boolean values with a boolean for each position; the belt will then twist after
the position that have a true value in the twist list. If the path is specified with pulley/idler types, then you can use auto_twist=true; in
that case the belt will automatically twist so the back of the belt always runs against idlers and the tooth side runs against pulleys. If you use
open=true then you might also use start_twist=true to let the belt start the part with the back side out.
The path must be specified as a list of positions. Each position should be either a vector with [x, y, pulley] or [x, y, r]. A pulley is a type from
pulleys.scad, and correct radius and angle will automatically be calculated. Alternatively a radius can be specified directly.
To make the back of the belt run against a smooth pulley on the outside of the loop specify a negative pitch radius. Alternatively you can just specify smooth pulleys in the path, and it will then happen automatically.
Individual teeth are not drawn, instead they are represented by a lighter colour.
vitamins/belts.scad Object definitions.
vitamins/belt.scad Implementation.
tests/belts.scad Code for this example.
| Function | Description |
|---|---|
belt_pitch(type) | Pitch in mm |
belt_pitch_height(type) | Offset of the pitch radius from the tips of the teeth |
belt_thickness(type) | Total thickness including teeth |
belt_tooth_height(type) | Tooth height |
belt_width(type) | Width in mm |
| Function | Description |
|---|---|
_belt_points_info(type, points, open, twist, auto_twist, start_twist) | Helper function that calculates [twist, istwisted, points, tangents, arcs] |
belt_length(type, points, open = false) | Compute belt length given path |
belt_pitch_to_back(type) | Offset of the back from the pitch radius |
belt_pulley_pr(type, pulley, twisted=false) | Pitch radius. Default it expects the belt tooth to be against a toothed pulley an the backside to be against a smooth pulley (an idler). If twisted is true, the the belt is the other way around. |
| Module | Description |
|---|---|
belt(type, points, belt_colour = grey(20), tooth_colour = grey(50), open = false, twist = undef, auto_twist = false, start_twist = false) | Draw a belt path given a set of points and pitch radii where the pulleys are. Closed loop unless open is specified |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | belt(GT2x12, [ ... ]) | Belt GT2 x 12mm x 128mm |
| 1 | belt(GT2x6, [ ... ]) | Belt GT2 x 6mm x 128mm |
| 1 | belt(GT2x6, [ ... ]) | Belt GT2 x 6mm x 584mm |
| 2 | belt(GT2x6, [ ... ]) | Belt GT2 x 6mm x 588mm |
| 1 | belt(GT2x9, [ ... ]) | Belt GT2 x 9mm x 128mm |
| 1 | belt(GT3x12, [ ... ]) | Belt GT3 x 12mm x 128mm |
| 1 | belt(GT3x6, [ ... ]) | Belt GT3 x 6mm x 128mm |
| 1 | belt(GT3x9, [ ... ]) | Belt GT3 x 9mm x 128mm |
| 1 | belt(T2p5x6, [ ... ]) | Belt T2.5 x 6mm x 130mm |
| 1 | belt(T5x10, [ ... ]) | Belt T5 x 10mm x 130mm |
| 1 | belt(T5x6, [ ... ]) | Belt T5 x 6mm x 130mm |
| 2 | insert(F1BM3) | Heatfit insert M3 x 5.8mm |
| 2 | pulley(GT2x16_toothed_idler) | Pulley GT2 idler 16 teeth |
| 4 | pulley(GT2x20_toothed_idler) | Pulley GT2 idler 20 teeth |
| 6 | pulley(GT2x16_plain_idler) | Pulley GT2 idler smooth 9.63mm |
| 3 | pulley(GT2x20ob_pulley) | Pulley GT2OB 20 teeth |
| 2 | screw(M3_cs_cap_screw, 20) | Screw M3 cs cap x 20mm |
| 6 | screw(M3_grub_screw, 6) | Screw M3 grub x 6mm |
Brushless DC electric motor
vitamins/bldc_motors.scad Object definitions.
vitamins/bldc_motor.scad Implementation.
tests/BLDC_motors.scad Code for this example.
| Function | Description |
|---|---|
BLDC_base_diameter(type) | Base diameter |
BLDC_base_height_1(type) | Base height 1 |
BLDC_base_height_2(type) | Base height 2 |
BLDC_base_hole_diameter(type) | Base hole diameter |
BLDC_base_holes(type) | Base holes |
BLDC_base_open(type) | Base open |
BLDC_bell_diameter(type) | Bell diameter |
BLDC_bell_height_1(type) | Bell height 1 |
BLDC_bell_height_2(type) | Bell height 2 |
BLDC_bell_hole_diameter(type) | Bell hole diameter |
BLDC_bell_holes(type) | Bell holes |
BLDC_bell_spokes(type) | Bell spoke count |
BLDC_body_colour(type) | Body colour |
BLDC_boss_diameter(type) | Boss diameter |
BLDC_boss_height(type) | Boss height |
BLDC_diameter(type) | Diameter of motor |
BLDC_height(type) | Height of motor including boss, if any, but excluding prop shaft |
BLDC_prop_shaft_diameter(type) | Diameter of unthreaded portion of prop shaft |
BLDC_prop_shaft_length(type) | Prop shaft length, including threaded section |
BLDC_prop_shaft_thread_diameter(type) | Diameter of threaded section of prop shaft |
BLDC_prop_shaft_thread_length(type) | Length of threaded section of prop shaft |
BLDC_shaft_diameter(type) | shaft diameter |
BLDC_shaft_length(type) | Total shaft length |
BLDC_shaft_offset(type) | shaft offset from base |
BLDC_side_colour(type) | Side colour |
BLDC_wire_diameter(type) | Wire diameter |
| Module | Description |
|---|---|
BLDC(type) | Draw specified BLDC motor |
BLDC_base_screw_positions(type, n = 4) | Positions children at the base screw holes |
BLDC_bell_screw_positions(type, n = 4) | Positions children at the bell screw holes |
BLDC_screw_positions(holes, n = 4) | Screw positions utility function |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | BLDC(BLDC0603) | Brushless DC motor BLDC0603 |
| 1 | BLDC(BLDC0802) | Brushless DC motor BLDC0802 |
| 1 | BLDC(BLDC1105) | Brushless DC motor BLDC1105 |
| 1 | BLDC(BLDC1306) | Brushless DC motor BLDC1306 |
| 1 | BLDC(BLDC1804) | Brushless DC motor BLDC1804 |
| 1 | BLDC(BLDC2205) | Brushless DC motor BLDC2205 |
| 1 | BLDC(BLDC2212) | Brushless DC motor BLDC2212 |
| 1 | BLDC(BLDC3548) | Brushless DC motor BLDC3548 |
| 1 | BLDC(BLDC4250) | Brushless DC motor BLDC4250 |
Models of radial blowers. Note that blower_exit() and blower_exit_offset() are for the inside of the exit for square blowers but the outside for spiral blowers.
vitamins/blowers.scad Object definitions.
vitamins/blower.scad Implementation.
tests/blowers.scad Code for this example.
| Function | Description |
|---|---|
blower_axis(type) | XY coordinates of the axle |
blower_base(type) | Thickness of the base |
blower_bore(type) | The air intake hole diameter |
blower_depth(type) | Height |
blower_exit(type) | The width of the exit port |
blower_hub(type) | Rotor hub diameter |
blower_hub_height(type) | Height of the rotor |
blower_length(type) | Length of enclosing rectangle |
blower_lug(type) | Height of the lugs |
blower_screw(type) | The type of screws needed |
blower_screw_hole(type) | Screw hole diameter |
blower_screw_holes(type) | List of XY coordinates of the screw holes |
blower_top(type) | Thickness of the top |
blower_wall(type) | Side wall thickness |
blower_wall_left(type) | Left side wall thickness |
blower_wall_right(type) | Right wall thickness (for square fans) |
blower_width(type) | Width of enclosing rectangle |
| Function | Description |
|---|---|
blower_casing_is_square(type) | True for square radial fans, false for spiral shape radial blowers |
blower_exit_offset(type) | Offset of exit's centre from the edge |
blower_size(type) | Size |
| Module | Description |
|---|---|
blower(type) | Draw specified blower |
blower_hole_positions(type) | Translate children to screw hole positions |
blower_square(type) | Draw a square blower |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | blower(PE4020) | Blower Pengda Technology 4020 |
| 1 | blower(RB5015) | Blower Runda RB5015 |
| 4 | screw(M2_cap_screw, 8) | Screw M2 cap x 8mm |
| 2 | screw(M2_cap_screw, 10) | Screw M2 cap x 10mm |
| 3 | screw(M3_cap_screw, 20) | Screw M3 cap x 20mm |
| 2 | screw(M4_cap_screw, 25) | Screw M4 cap x 25mm |
| 1 | blower(BL30x10) | Square radial fan 3010 |
| 1 | blower(BL40x10) | Square radial fan 4010 |
| 6 | washer(M2_washer) | Washer M2 x 5mm x 0.3mm |
| 3 | washer(M3_washer) | Washer M3 x 7mm x 0.5mm |
| 2 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
Box sections.
vitamins/box_sections.scad Object definitions.
vitamins/box_section.scad Implementation.
tests/box_sections.scad Code for this example.
| Function | Description |
|---|---|
box_section_colour(type) | Colour |
box_section_colour2(type) | Colour2, for woven box section |
box_section_fillet(type) | Fillet |
box_section_material(type) | Material description |
box_section_size(type) | Size |
box_section_thickness(type) | Wall thickness |
| Function | Description |
|---|---|
box_section_is_woven(type) | Box section is woven, eg carbon fiber |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | box_section(AL12x8x1, 100) | Aluminium rectangular box section 12mm x 8mm x 1mm, length 100mm |
| 1 | box_section(AL20x20x2, 80) | Aluminium rectangular box section 20mm x 20mm x 2mm, length 80mm |
| 1 | box_section(AL38p1x25p4x1p6, 60) | Aluminium rectangular box section 38.1mm x 25.4mm x 1.6mm, length 60mm |
| 1 | box_section(AL50p8x38p1x3, 40) | Aluminium rectangular box section 50.8mm x 38.1mm x 3.0mm, length 40mm |
| 1 | box_section(CF10x10x1, 100) | Carbon fiber rectangular box section 10mm x 10mm x 1mm, length 100mm |
Crude representation of a bulldog clip. The handle is not currently drawn but its length can be accessed to allow clearance. Used for holding glass on 3D printer beds but Swiss picture clips can be better.
vitamins/bulldogs.scad Object definitions.
vitamins/bulldog.scad Implementation.
tests/bulldogs.scad Code for this example.
| Function | Description |
|---|---|
bulldog_depth(type) | Depth from the back to the front of the tubes |
bulldog_handle_length(type) | Length that the handle protrudes from the back |
bulldog_height(type) | Height at the back |
bulldog_length(type) | Length along the profile |
bulldog_radius(type) | Outside radius of the back corners |
bulldog_thickness(type) | Thickness of the metal |
bulldog_tube(type) | Outside diameter of the tubes |
| Module | Description |
|---|---|
bulldog(type, open = 4) | Draw bulldog clip open by specified amount |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | bulldog(small_bulldog) | Bulldog clip 19mm |
| 1 | bulldog(large_bulldog) | Bulldog clip 25mm |
PCB mounted buttons. Can optionally have a coloured cap
vitamins/buttons.scad Object definitions.
vitamins/button.scad Implementation.
tests/buttons.scad Code for this example.
| Function | Description |
|---|---|
square_button_cap_d(type) | Diameter of the body of the cap |
square_button_cap_flange_d(type) | Diameter of the flange of the cap |
square_button_cap_flange_h(type) | Height of the cap flange |
square_button_cap_h(type) | Height of the cap including the stem |
square_button_cap_stem(type) | Length of the cap stem |
square_button_d(type) | Button diameter |
square_button_h(type) | Height of the button above the PCB |
square_button_height(type) | Height of the base |
square_button_ra_z(type) | Height of button centre above the PCB for right_angle version |
square_button_rivit(type) | Size of the corner rivets |
square_button_wall(type) | Offset of the metal part |
square_button_width(type) | Width and depth of the base |
| Module | Description |
|---|---|
square_button(type, colour = "yellow", right_angle = false) | Draw square button with specified cap colour if it has a cap |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | square_button(button_12mm, "yellow") | Square button 12mm with yellow cap |
| 1 | square_button(button_4p5mm) | Square button 4.5mm |
| 1 | square_button(button_6mm) | Square button 6mm |
| 1 | square_button(button_6mm_7) | Square button 6mm |
A strip of polypropylene used with ribbon cable to make a cable flexible in one direction only.
Modelled with a Bezier spline, which is not quite the same as a minimum energy curve but very close, especially near the extreme positions, where the model needs to be accurate.
When the sides are constrained then a circular model is more accurate.
vitamins/cable_strip.scad Implementation.
tests/cable_strips.scad Code for this example.
| Function | Description |
|---|---|
bezier_cable_length(depth, min_z, pos) | Calculate a length that will achieve the desired minimum z |
cable_strip_length(depth, travel, extra = 15) | Calculate circular cable strip length |
ribbon_clamp_slot(ways) | Width of the slot to accept a ribbon cable |
ribbon_clamp_slot_depth() | Depth of slot to accept a ribbon cable and a cable strip |
ribbon_ways(ways) | Allows ribbon clamps to accept multiple cables |
| Module | Description |
|---|---|
bezier_cable_strip(ways, depth, length, below, extra, pos = 0) | Draw a cable strip using a Bezier curve |
cable_strip(ways, depth, travel, extra = 15, pos = 0) | Draw a cable stripe with a semi circular fold |

| Qty | Module call | BOM entry |
|---|---|---|
| 3 | bezier_cable_strip(20, 50, 150, 100, 10) | Polypropylene strip 170mm x 26mm x 0.8mm |
| 3 | cable_strip(20, 25, 100, 30) | Polypropylene strip 189mm x 24mm x 0.8mm |
PCB cameras.
vitamins/cameras.scad Object definitions.
vitamins/camera.scad Implementation.
tests/cameras.scad Code for this example.
| Function | Description |
|---|---|
camera_connector_pos(type) | The flex connector block for the camera itself's position |
camera_connector_size(type) | The flex connector block for the camera itself's size |
camera_fov(type) | The field of view of the camera lens |
camera_lens(type) | Stack of lens parts, can be round, rectangular or rounded rectangular, with optional tapered aperture |
camera_lens_offset(type) | Offset of the lens center from the PCB centre |
camera_pcb(type) | The PCB part of the camera |
| Function | Description |
|---|---|
camera_lens_height(type) | The height of the lens stack |
| Module | Description |
|---|---|
camera(type, show_lens = true, fov_distance = 0, fov = undef) | Draw specified PCB camera |
camera_lens(type, offset = 0, show_lens = true) | Draw the lens stack, with optional offset for making a clearance hole |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | camera(ESP32_CAM) | ESP32-CAM Camera module |
| 1 | camera(rpi_camera_v1) | Raspberry Pi camera V1 |
| 1 | camera(rpi_camera_v2) | Raspberry Pi camera V2 |
| 1 | camera(rpi_camera) | Raspberry Pi focusable camera |
Circlips aka tapered retaining rings.
vitamins/circlips.scad Object definitions.
vitamins/circlip.scad Implementation.
tests/circlips.scad Code for this example.
| Function | Description |
|---|---|
circlip_a(type) | Size of the lugs |
circlip_b(type) | Widest part of the taper |
circlip_d1(type) | Nominal OD, i.e. diameter of tube |
circlip_d2(type) | Groove diameter, i.e. OD when installed |
circlip_d3(type) | Relaxed OD when not installed |
circlip_d5(type) | Plier hole diameter |
circlip_thickness(type) | Thickness |
| Function | Description |
|---|---|
circlip_closed_angle(type) | Closed angle |
| Module | Description |
|---|---|
internal_circlip(type, open = 0) | Draw specified internal circlip, open = 0, for nominal size installed, 1 for relaxed uninstalled, -1 for squeezed to install |

| Qty | Module call | BOM entry |
|---|---|---|
| 3 | circlip(circlip_12i) | Circlip internal 12mm |
| 3 | circlip(circlip_15i) | Circlip internal 15mm |
| 3 | circlip(circlip_19i) | Circlip internal 19mm |
| 3 | circlip(circlip_21i) | Circlip internal 21mm |
| 3 | circlip(circlip_28i) | Circlip internal 28mm |
| 3 | circlip(circlip_28iw) | Circlip internal 28mm (wide opening) |
Various electronic components used in hot ends and heated beds.
vitamins/components.scad Object definitions.
vitamins/component.scad Implementation.
tests/components.scad Code for this example.
| Function | Description |
|---|---|
al_clad_clearance(type) | Clearance from screw hole centre to the body |
al_clad_height(type) | Body height |
al_clad_hole(type) | Hole diameter |
al_clad_hpitch(type) | Lengthways pitch between screw holes |
al_clad_length(type) | Body length |
al_clad_tab(type) | Tab width |
al_clad_thickness(type) | Tab thickness |
al_clad_vpitch(type) | Widthways pitch between screw holes |
al_clad_width(type) | Width including tabs |
al_clad_wire_length(type) | Total length including wires |
resistor_colour(type) | Body colour |
resistor_diameter(type) | Body diameter |
resistor_hole(type) | Hole big enough to glue it into |
resistor_length(type) | Body length |
resistor_radial(type) | Radial gives bead thermistor style body |
resistor_sleeved(type) | Are the leads sleeved |
resistor_wire_diameter(type) | Wire diameter |
resistor_wire_length(type) | Wire length from body |
tc_body_height(type) | Plastic body height |
tc_body_inset(type) | How far metal is inset into the plastic body |
tc_body_length(type) | Plastic body length |
tc_body_width(type) | Plastic body width |
tc_hole_dia(type) | Screw hole diameter |
tc_hole_pitch(type) | Screw hole pitch |
tc_length(type) | Across the lugs |
tc_spade_height(type) | Terminal spade height measured from base |
tc_spade_pitch(type) | Terminal spade pitch |
tc_thickness(type) | Metal thickness |
tc_width(type) | Width of lugs |
| Function | Description |
|---|---|
TO220_lead_pos(i, l) | Position of ith lead end when length = l |
TO220_size() | Size of a TO220 |
TO220_thickness() | Thickness of the tab of a TO220 |
TO247_size() | Body dimensions of a T247, hole offset, lead height and lead wide length |
fack2spm_bezel_size() | FACK2SPM Bezel dimensions |
fack2spm_screw() | Screw type for FACK2SPM |
| Module | Description |
|---|---|
TO220(description, leads = 3, lead_length = 16) | Draw a TO220 package, use description to describe what it is |
TO247(description, lead_length = 20) | Draw a TO247 package, use description to describe what it is |
al_clad_resistor(type, value, leads = true) | Draw an aluminium clad resistor |
al_clad_resistor_assembly(type, value, sleeved = true, sleeving = HSHRNK32, sleeving_length = 15) | Draw aluminium clad resistor with optional sleaving, positions children at the screw positions |
al_clad_resistor_hole_positions(type) | Position children at the screw holes of an aluminium clad resistor |
al_clad_resistor_holes(type, h = 100) | Drill screw holes for an aluminium clad resistor |
fack2spm() | Draw a FACK2SPM Cat5E RJ45 shielded panel mount coupler |
fack2spm_hole_positions() | Place children at the FACK2SPM mounting hole positions |
fack2spm_holes(h = 0) | Cut the holes for a FACK2SPM |
multiwatt11(part_no, tail = 3) | Draw a MULTIWATT11 package |
panel_USBA() | Draw a panel mount USBA connector |
panel_USBA_hole_positions() | Place children at hole positions |
panel_USBA_holes(h = 100) | Make holes for USBA connector |
resistor(type) | Draw specified type of resistor |
sleeved_resistor(type, sleeving, bare = 5, heatshrink = false) | Draw a resistor with sleeved leads and option heatshrink |
thermal_cutout(type) | Draw specified thermal cutout |
thermal_cutout_hole_positions(type) | Place children at hole positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | TO220("Generic TO220 package") | Generic TO220 package |
| 1 | TO247("Generic TO247 package") | Generic TO247 package |
| 8 | tubing(HSHRNK32) | Heatshrink sleeving ID 3.2mm x 15mm |
| 1 | multiwatt11("L6203") | MULTIWATT11 L6203 |
| 1 | resistor(RWM04106R80J) | Resistor RWM04106R80J 6R8 3W vitreous enamel |
| 1 | resistor(RIE1212UB5C5R6) | Resistor UB5C 5R6F 5R6 3W vitreous enamel |
| 1 | al_clad_resistor(THS10, 4.7) | Resistor aluminium clad THS10 4.7 |
| 1 | al_clad_resistor(THS15, 4.7) | Resistor aluminium clad THS15 4.7 |
| 1 | al_clad_resistor(THS25, 4.7) | Resistor aluminium clad THS25 4.7 |
| 1 | al_clad_resistor(THS50, 4.7) | Resistor aluminium clad THS50 4.7 |
| 4 | screw(M2p5_pan_screw, 16) | Screw M2.5 pan x 16mm |
| 4 | screw(M3_pan_screw, 16) | Screw M3 pan x 16mm |
| 1 | panel_USBA() | Socket USB A panel mount |
| 1 | tuk_fack2spm() | TUK FACK2SPM Cat5E RJ45 shielded panel mount coupler |
| 1 | thermal_cutout(TC) | Thermal cutout TC |
| 1 | resistor(Epcos) | Thermistor Epcos B57560G104F 100K 1% |
| 1 | resistor(EpcosBlue) | Thermistor Epcos B57861S104F40 100K 1% |
| 1 | resistor(Honewell) | Thermistor Honeywell 135-104LAC-J01 100K 1% |
D-connectors. Can be any number of ways, male or female, solder buckets, PCB mount or IDC, with or without pillars.
vitamins/d_connectors.scad Object definitions.
vitamins/d_connector.scad Implementation.
tests/d_connectors.scad Code for this example.
| Function | Description |
|---|---|
d_flange_length(type) | Length of the flange |
d_flange_thickness(type) | Thickness of the flange |
d_flange_width(type) | Width of the flange |
d_front_height(type) | From the back of the flange to the front |
d_height(type) | From the front to the back of the metal part |
d_hole_pitch(type) | Mounting hole pitch |
d_lengths(type) | Lengths of the D for plug and socket |
d_ways(type) | Number of ways |
d_widths(type) | Widths of the D for plug and socket |
| Function | Description |
|---|---|
d_mate_distance(type) | Spacing when mated |
d_pcb_offset(type) | Height of the back of the flange above the PCB |
d_slot_length(type) | Slot to clear the back |
| Module | Description |
|---|---|
d_connector_holes(type) | Place children at the screw hole positions |
d_hole(type, h = 0, center = true, clearance = 0.2) | Make a hole to clear the back of d-connector |
d_pillar() | Draw a pillar for a D-connector |
d_plug(type, socket = false, pcb = false, idc = false) | Draw specified D plug, which can be IDC, PCB or plain solder bucket |
d_plug_D(length, width, rad) | D plug D shape |
d_socket(connector, pcb = false, idc = false) | Draw specified D socket, which can be IDC, PCB or plain solder bucket |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | d_plug(DCONN15, idc = true) | D-type 15 way IDC plug |
| 1 | d_socket(DCONN15, idc = true) | D-type 15 way IDC socket |
| 1 | d_plug(DCONN25, pcb = true) | D-type 25 way PCB mount plug |
| 1 | d_socket(DCONN25, pcb = true) | D-type 25 way PCB mount socket |
| 1 | d_plug(DCONN37) | D-type 37 way plug |
| 1 | d_socket(DCONN37) | D-type 37 way socket |
| 1 | d_plug(DCONN9) | D-type 9 way plug |
| 1 | d_socket(DCONN9) | D-type 9 way socket |
| 8 | d_pillar() | D-type connector pillar |
Dual inline IC packages and sockets
vitamins/dip.scad Implementation.
tests/DIP.scad Code for this example.
| Function | Description |
|---|---|
pdip_pin_W(type) | Pin shoulder width |
pdip_pin_h(type) | Pin height |
pdip_pin_n(type) | Pin neck |
pdip_pin_s(type) | Height above seating plane |
pdip_pin_t(type) | Pin thickness |
pdip_pin_w(type) | Pin width |
| Module | Description |
|---|---|
dip(n, part, size, w, pitch, pin) | Draw DIP package |
pdip(pins, part, socketed, w = inch(0.3), pitch = inch(0.1)) | Draw standard 0.1" PDIP IC package |
pdip_pin(type, l, end) | Draw a pin |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | dil_socket(14, 7.62) | DIL socket 28 x 0.3" |
| 1 | pdip(14, 74HC00) | IC 74HC00 PDIP14 |
| 1 | pdip(20, 74HC245) | IC 74HC245 PDIP20 |
| 1 | pdip(28, ATMEGA328) | IC ATMEGA328 PDIP28 |
| 1 | pdip(8, NE555) | IC NE555 PDIP8 |
| 1 | pdip(6, OPTO) | IC OPTO PDIP6 |
| 1 | pdip(16, ULN2003) | IC ULN2003 PDIP16 |
| 1 | pdip(18, ULN2803) | IC ULN2803 PDIP18 |
LCD displays.
vitamins/displays.scad Object definitions.
vitamins/display.scad Implementation.
tests/displays.scad Code for this example.
| Function | Description |
|---|---|
display_aperture(type) | Size of the aperture including its depth |
display_height(type) | Depth of the metal part |
display_pcb(type) | PCB mounted on the back |
display_pcb_offset(type) | 3D offset of the PCB centre |
display_ribbon(type) | Keep out region for ribbon cable |
display_thickness(type) | Height of the metal part |
display_threads(type) | Length that studs protrude from the PCB holes |
display_touch_screen(type) | Touch screen position and size |
display_width(type) | Width of the metal part |
| Function | Description |
|---|---|
display_depth(type) | Total thickness including touch screen and PCB |
display_ts_thickness(type) | Touch screen thickness or 0 |
| Module | Description |
|---|---|
display(type) | Draw specified display |
display_aperture(type, clearance, clear_pcb = false) | Make aperture cutout |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | display(BigTreeTech_TFT35v3_0) | BigTreeTech TFT35 v3.0 |
| 1 | display(HDMI5) | HDMI display 5" |
| 1 | display(TFT128x160) | LCD TFT ST7735 display 128x160 |
| 2 | display(LCD1602A) | LCD display 1602A |
| 1 | display(LCD2004A) | LCD display 2004A |
| 1 | display(LCDS7282B) | LCD display S-7282B |
| 1 | display(SSD1963_4p3) | LCD display SSD1963 4.3" |
Brackets for joining extrusions at a corner.
vitamins/extrusion_brackets.scad Object definitions.
vitamins/extrusion_bracket.scad Implementation.
tests/extrusion_brackets.scad Code for this example.
| Function | Description |
|---|---|
extrusion_corner_bracket_3D_inner_height(type) | The depth offset of the dip in the cuboid |
extrusion_corner_bracket_3D_inner_side_length(type) | The length of the dip in the cuboid sides |
extrusion_corner_bracket_3D_nut_dia(type) | The width of bottom part of the nut |
extrusion_corner_bracket_3D_nut_nyloc_thickness(type) | The total thickness of the nut |
extrusion_corner_bracket_3D_nut_screw(type) | The screw (most likely Mx_grub_screw from <NopSCADlib/vitamins/screws.scad>) |
extrusion_corner_bracket_3D_nut_screws_hor(type) | The positions of the screw holes on the horizontal arms, expressed in %/100 of the nut arm |
extrusion_corner_bracket_3D_nut_screws_ver(type) | The positions of the screw holes on the vertical arms, expressed in %/100 of the nut arm |
extrusion_corner_bracket_3D_nut_sx(type) | The length of the nuts |
extrusion_corner_bracket_3D_nut_thickness(type) | The thickness of the top part of the nut |
extrusion_corner_bracket_3D_nut_ty1(type) | The total width of the nut |
extrusion_corner_bracket_3D_nut_ty2(type) | The width of the top edge of the nut |
extrusion_corner_bracket_3D_outer_height(type) | The height of the cuboid |
extrusion_corner_bracket_3D_outer_side_length(type) | The length of the base cuboid sides |
extrusion_corner_bracket_base_thickness(type) | Thickness of base of bracket |
extrusion_corner_bracket_extrusion(type) | Default extrusion this bracket is for |
extrusion_corner_bracket_hole_offset(type) | Hole offset from corner |
extrusion_corner_bracket_side_thickness(type) | Thickness of side of bracket |
extrusion_corner_bracket_size(type) | Size of bracket |
extrusion_corner_bracket_tnut(type) | The sliding t-nut to use in the assembly |
extrusion_inner_corner_bracket_extrusion(type) | Default extrusion this bracket is for |
extrusion_inner_corner_bracket_screw_offsets(type) | Screw offsets from the ends |
extrusion_inner_corner_bracket_size(type) | Size of inner bracket |
extrusion_inner_corner_bracket_tnut(type) | The sliding t-nut it is based on |
| Function | Description |
|---|---|
extrusion_corner_bracket_3D_get_x_offset(type) | helper function to position the x beam |
extrusion_corner_bracket_3D_get_x_rot(type) | helper function to rotate the y beam |
extrusion_corner_bracket_3D_get_y_offset(type) | helper function to position the y beam |
extrusion_corner_bracket_3D_get_y_rot(type) | helper function to rotate the y beam |
| Module | Description |
|---|---|
extrusion_corner_bracket(type) | Corner bracket for extrusion |
extrusion_corner_bracket_3D(type, grub_screws = true) | draw the specified extrusion_corner_bracket_3D |
extrusion_corner_bracket_assembly(type, part_thickness = undef, screw_type = undef, nut_type = undef, max_screw_depth = undef, extrusion = undef) | Assembly with fasteners in place |
extrusion_inner_corner_bracket(type, grub_screws = true, backwards = false, extrusion = undef) | Inner corner bracket for extrusion |

| Qty | Module call | BOM entry |
|---|---|---|
| 3 | extrusion(E2020, 40, cornerHole = true) | Extrusion E2020 x 40mm |
| 2 | extrusion(E2020t, 20.5) | Extrusion E2020t x 20.5mm |
| 1 | extrusion(E2020t, 28) | Extrusion E2020t x 28mm |
| 2 | extrusion(E2020t, 39.5) | Extrusion E2020t x 39.5mm |
| 1 | extrusion(E2020t, 48) | Extrusion E2020t x 48mm |
| 3 | extrusion(E3030, 40, cornerHole = true) | Extrusion E3030 x 40mm |
| 3 | extrusion(E4040, 40, cornerHole = true) | Extrusion E4040 x 40mm |
| 1 | extrusion(E4040t, 27.4, cornerHole = true) | Extrusion E4040t x 27.4mm |
| 1 | extrusion(E4040t, 40, cornerHole = true) | Extrusion E4040t x 40mm |
| 1 | extrusion(E4040t, 60.4, cornerHole = true) | Extrusion E4040t x 60.4mm |
| 1 | extrusion(E4040t, 80, cornerHole = true) | Extrusion E4040t x 80mm |
| 2 | extrusion_corner_bracket(E20_corner_bracket) | Extrusion corner bracket 20mm for E2020t |
| 2 | extrusion_corner_bracket(E40_corner_bracket) | Extrusion corner bracket 35mm for E4040t |
| 2 | extrusion_corner_bracket_3D(extrusion_corner_bracket_3D_2020) | Extrusion corner bracket 3D mm for E2020 |
| 2 | extrusion_corner_bracket_3D(extrusion_corner_bracket_3D_3030) | Extrusion corner bracket 3D mm for E3030 |
| 2 | extrusion_corner_bracket_3D(extrusion_corner_bracket_3D_4040) | Extrusion corner bracket 3D mm for E4040 |
| 4 | extrusion_inner_corner_bracket(E20_inner_corner_bracket) | Extrusion inner corner bracket for E2020t |
| 2 | extrusion_inner_corner_bracket(E40_inner_corner_bracket) | Extrusion inner corner bracket for E4040t |
| 4 | sliding_t_nut(M4_sliding_t_nut) | Nut M4 sliding T |
| 4 | sliding_t_nut(M8_sliding_ball_t_nut) | Nut M8 sliding T with spring loaded ball |
| 4 | screw(M4_cap_screw, 8) | Screw M4 cap x 8mm |
| 12 | screw(M4_grub_screw, 5) | Screw M4 grub x 5mm |
| 20 | screw(M6_grub_screw, 6.2) | Screw M6 grub x 6.2mm |
| 20 | screw(M6_grub_screw, 9.5) | Screw M6 grub x 9.5mm |
| 4 | screw(M8_cap_screw, 12) | Screw M8 cap x 12mm |
| 4 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
| 4 | washer(M8_washer) | Washer M8 x 17mm x 1.6mm |
Aluminium extrusion.
vitamins/extrusions.scad Object definitions.
vitamins/extrusion.scad Implementation.
tests/extrusions.scad Code for this example.
| Function | Description |
|---|---|
extrusion_center_hole_wd(type) | Diameter of center hole if -ve or square side if +ve |
extrusion_center_square_wd(type) | Size of center square if +ve or tube diameter if -ve |
extrusion_channel_recess(type) | Channel recess width and depth or false in none |
extrusion_channel_width(type) | Channel width |
extrusion_channel_width_internal(type) | Internal channel width |
extrusion_corner_hole_wd(type) | Diameter of corner hole if -ve or square side if +ve |
extrusion_fillet(type) | Radius of corner fillet |
extrusion_height(type) | Height of extrusion |
extrusion_spar_thickness(type) | Spar thickness |
extrusion_tab_thickness(type) | Tab thickness |
extrusion_width(type) | Width of extrusion |
| Function | Description |
|---|---|
extrusion_center_hole(type) | Diameter of center hole or side if square |
extrusion_center_square(type) | Size of center square or tube |
extrusion_corner_hole(type) | Diameter of corner hole or side if square |
| Module | Description |
|---|---|
extrusion(type, length, center = true, cornerHole = true) | Draw the specified extrusion |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | extrusion(E1515, 80, cornerHole = true) | Extrusion E1515 x 80mm |
| 1 | extrusion(E2020, 80, cornerHole = true) | Extrusion E2020 x 80mm |
| 1 | extrusion(E2020t, 80, cornerHole = true) | Extrusion E2020t x 80mm |
| 1 | extrusion(E2040, 80, cornerHole = true) | Extrusion E2040 x 80mm |
| 1 | extrusion(E2060, 80, cornerHole = true) | Extrusion E2060 x 80mm |
| 1 | extrusion(E2080, 80, cornerHole = true) | Extrusion E2080 x 80mm |
| 1 | extrusion(E3030, 80, cornerHole = true) | Extrusion E3030 x 80mm |
| 1 | extrusion(E3060, 80, cornerHole = true) | Extrusion E3060 x 80mm |
| 1 | extrusion(E4040, 80, cornerHole = true) | Extrusion E4040 x 80mm |
| 1 | extrusion(E4040t, 80, cornerHole = true) | Extrusion E4040t x 80mm |
| 1 | extrusion(E4080, 80, cornerHole = true) | Extrusion E4080 x 80mm |
| 1 | extrusion(Makerbeam, 80, cornerHole = true) | Extrusion Makerbeam x 80mm |
| 1 | extrusion(MakerbeamXL, 80, cornerHole = true) | Extrusion MakerbeamXL x 80mm |
Axial fans.
Can draw three styles: solid, open frame and open frame with screw bosses.
vitamins/fans.scad Object definitions.
vitamins/fan.scad Implementation.
tests/fans.scad Code for this example.
| Function | Description |
|---|---|
fan_aperture(type) | Optional diameter for the aperture, which can be bigger than the bore it has flared corners. |
fan_blades(type) | The number of blades |
fan_bore(type) | Diameter of the hole for the blades |
fan_boss_d(type) | Diameter of the screw bosses |
fan_depth(type) | Depth of fan |
fan_hole_pitch(type) | Screw hole pitch |
fan_hub(type) | Diameter of the hub |
fan_outer_diameter(type) | Outside diameter of the frame |
fan_screw(type) | Screw type |
fan_thickness(type) | Thickness of the frame |
fan_width(type) | Width of square |
| Module | Description |
|---|---|
fan(type) | Draw specified fan, origin in the centre |
fan_assembly(type, thickness, include_fan = true, screw = false, full_depth = false) | Fan with its fasteners |
fan_hole_positions(type, z = undef) | Position children at the screw hole positions |
fan_holes(type, poly = false, screws = true, h = 100) | Make all the holes for the fan, or just the aperture if screws is false. Set poly true for poly_holes. |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | fan(fan120x25) | Fan 120mm x 25mm |
| 1 | fan(fan17x8) | Fan 17mm x 8mm |
| 1 | fan(fan25.4x10) | Fan 25.4mm x 10mm |
| 1 | fan(fan30x10) | Fan 30mm x 10mm |
| 1 | fan(fan40x11) | Fan 40mm x 11mm |
| 1 | fan(fan50x15) | Fan 50mm x 15mm |
| 1 | fan(fan60x15) | Fan 60mm x 15mm |
| 1 | fan(fan60x25) | Fan 60mm x 25mm |
| 1 | fan(fan70x15) | Fan 70mm x 15mm |
| 1 | fan(fan80x25) | Fan 80mm x 25mm |
| 1 | fan(fan80x38) | Fan 80mm x 38mm |
| 4 | nut(M2_nut, nyloc = true) | Nut M2 x 1.6mm nyloc |
| 4 | nut(M2p5_nut, nyloc = true) | Nut M2.5 x 2.2mm nyloc |
| 8 | nut(M3_nut, nyloc = true) | Nut M3 x 2.4mm nyloc |
| 28 | nut(M4_nut, nyloc = true) | Nut M4 x 3.2mm nyloc |
| 4 | screw(M2_cap_screw, 16) | Screw M2 cap x 16mm |
| 4 | screw(M2p5_pan_screw, 20) | Screw M2.5 pan x 20mm |
| 8 | screw(M3_dome_screw, 20) | Screw M3 dome x 20mm |
| 20 | screw(M4_dome_screw, 16) | Screw M4 dome x 16mm |
| 4 | screw(M4_dome_screw, 25) | Screw M4 dome x 25mm |
| 4 | screw(M4_dome_screw, 30) | Screw M4 dome x 30mm |
| 8 | washer(M2_washer) | Washer M2 x 5mm x 0.3mm |
| 8 | washer(M2p5_washer) | Washer M2.5 x 5.9mm x 0.5mm |
| 12 | washer(M3_washer) | Washer M3 x 7mm x 0.5mm |
| 32 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
Faston receptacles to mate with spade connectors
vitamins/fastons.scad Object definitions.
vitamins/faston.scad Implementation.
tests/fastons.scad Code for this example.
| Function | Description |
|---|---|
faston_d_bot(type) | Radius of bottom corners |
faston_d_top(type) | Radius of the clips |
faston_fillet_d(type) | Fillets at the transition |
faston_insul_crimp_d(type) | Outside diameter of the insulation crimp |
faston_insul_crimp_l(type) | Length of the insulation crimp |
faston_insul_crimp_o(type) | Offset of insulation crimp |
faston_insul_crimp_p(type) | Position of the tip of the insulation crimp |
faston_size(type) | Size of the receptacle part |
faston_t(type) | Thickness |
faston_wall_h(type) | Height of transition web wall |
faston_width(type) | Width of matching spade |
faston_wire_crimp_d(type) | Outside diameter of the wire crimp |
faston_wire_crimp_l(type) | Length of the wire crimp |
faston_wire_crimp_p(type) | Position of the tip of the wire crimp |
| Function | Description |
|---|---|
faston_insul_stop(type) | Position where insulation stops |
faston_length(type) | Total length of crimp |
| Module | Description |
|---|---|
faston(type, closed = false) | Draw specified faston |

| Qty | Module call | BOM entry |
|---|---|---|
| 4 | faston(5_160430_7) | Faston part no 5_160430_7 to fit 4.75mm spade |
20mm panel mount fuse holder.
vitamins/fuseholder.scad Implementation.
tests/fuseholder.scad Code for this example.
| Function | Description |
|---|---|
fuseholder_diameter() | Outside diameter of flange |
| Module | Description |
|---|---|
fuseholder(thickness) | Fuseholder with nut in place for specified panel thickness |
fuseholder_hole(h = 100) | Hole with flats for fuseholder |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | fuseholder(6) | Fuse holder 20mm |
DC motors with a gearbox
vitamins/gear_motors.scad Object definitions.
vitamins/gear_motor.scad Implementation.
tests/gear_motors.scad Code for this example.
| Function | Description |
|---|---|
gm_boss(type) | Motor boss diameter, corner radius, height and colour |
gm_box(type) | Size, corner radius, colour |
gm_holes(type) | List of hole positions |
gm_hub(type) | Motor hub diameter, height, corner rad |
gm_motor(type) | Motor position, diameter, height, corner rad and colour |
gm_motor_boss(type) | Motor mounting boss on gearbox |
gm_screw(type) | Screw type |
gm_screw_boss(type) | Screw boss diameter and height |
gm_screw_depth(type) | Screw hole depth |
gm_shaft(type) | Shaft diameter, flat width, length, flat length. |
gm_shaft_offset(type) | Offset of shaft from the centre of the gearbox |
gm_tags(type) | Tag size and pitch |
| Function | Description |
|---|---|
gm_box_width(type) | Gearbox width if rectangular or diameter if round |
gm_depth(type) | Motor total depth |
gm_motor_d(type) | Motor diameter |
gm_motor_pos(type) | Motor position relative to centre of the gearbox |
gm_shaft_flat_l(type) | Length of the shaft flat section |
gm_shaft_flat_w(type) | Shaft width across the flat |
gm_shaft_length(type) | Length of the shaft |
gm_shaft_pos(type) | Shaft position |
gm_shaft_r(type) | Shaft radius |
| Module | Description |
|---|---|
gear_motor(type, alpha = 1) | Draw specified gear motor, can be partially transparent to see what is behind it |

Geared tin can steppers
vitamins/geared_steppers.scad Object definitions.
vitamins/geared_stepper.scad Implementation.
tests/geared_steppers.scad Code for this example.
| Function | Description |
|---|---|
gs_boss_d(type) | Boss around the shaft diameter |
gs_boss_h(type) | Boss around the shaft height |
gs_bulge(type) | Plastic bulge width, depth, height, z offset |
gs_bulge2(type) | Plastic rear bulge width, depth, height |
gs_diameter(type) | Can diameter |
gs_flat_length(type) | Shaft flat length |
gs_height(type) | Can height |
gs_hole_d(type) | Screw hole diameter |
gs_lug_t(type) | Screw lug thickness |
gs_lug_w(type) | Screw lug width |
gs_motor(type) | Motor diameter and height if separate from gearbox |
gs_offset(type) | Offset of the shaft from the centre of the can |
gs_pitch(type) | Screw pitch |
gs_radius(type) | Top - or bottom + corner radius |
gs_shaft_d(type) | Shaft diameter |
gs_shaft_flat(type) | Shaft width across the flats |
gs_shaft_length(type) | Shaft length |
gs_wire_d(type) | Wire diameter |
gs_wires(type) | Wire colours and grouping |
| Module | Description |
|---|---|
geared_stepper(type, angle = 0) | Draw the specified geared stepper with optional shaft angle. |
geared_stepper_screw_positions(type) | Place children at the screw positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | geared_stepper(28BYJ_48) | Geared stepper - 28BYJ-48 5V |
| 1 | geared_stepper(35BYGHJ75) | Geared stepper - 35BYGHJ75 0.4A |
Parametric green terminal blocks
vitamins/green_terminals.scad Object definitions.
vitamins/green_terminal.scad Implementation.
tests/green_terminals.scad Code for this example.
| Function | Description |
|---|---|
gt_back_depth(type) | Back ledge depth |
gt_back_height(type) | Height at the back |
gt_box_h(type) | Height of the cable entry box |
gt_box_setback(type) | How far the contact box is set back from the front |
gt_box_w(type) | Width inside the cable entry box |
gt_depth(type) | Total front to back depth |
gt_front_depth(type) | Front ledge depth |
gt_front_height(type) | Height at the front |
gt_front_t(type) | Thickness of frame around the front aperture |
gt_height(type) | Height of the flat top |
gt_pitch(type) | Pitch between terminals |
gt_screw_r(type) | Screw head radius |
gt_top(type) | Depth at the top |
gt_tube_h(type) | Height of optional tubes around the screws |
gt_y_offset(type) | Offset of the pins from centre of the depth |
gt_y_offset2(type) | Offset of the pins from the screws |
| Module | Description |
|---|---|
green_terminal(type, ways, skip = [], colour = "lime") | Draw green terminal blocks, skip can be used to remove pins. |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | green_terminal(gt_5x17, 2) | Terminal block 2 way 5mm |
| 1 | green_terminal(gt_5x11, 3) | Terminal block 3 way 5mm |
| 1 | green_terminal(gt_6p35, 4) | Terminal block 4 way 0.25" |
| 1 | green_terminal(gt_5p08, 5) | Terminal block 5 way 0.2" |
| 1 | green_terminal(gt_3p5, 6) | Terminal block 6 way 3.5mm |
| 1 | green_terminal(gt_2p54, 7) | Terminal block 7 way 0.1" |
Hot end models. The E3D models were originally contributed to Mendel90 by Philippe LUC @philfifi
Needs updating as mostly obsolete versions.
vitamins/hot_ends.scad Object definitions.
vitamins/hot_end.scad Implementation.
tests/hot_ends.scad Code for this example.
| Function | Description |
|---|---|
hot_end_duct_height_fan(type) | Duct height at fan end |
hot_end_duct_height_nozzle(type) | Duct height at nozzle end |
hot_end_duct_offset(type) | Offset of circular duct centre from the nozzle |
hot_end_duct_radius(type) | Require radius to clear the heater block |
hot_end_groove(type) | Groove length |
hot_end_groove_dia(type) | Groove internal diameter |
hot_end_inset(type) | The length that goes into the mounting |
hot_end_insulator_colour(type) | Colour of the insulator |
hot_end_insulator_diameter(type) | Outside diameter |
hot_end_insulator_length(type) | Length of the insulator |
hot_end_part(type) | Description |
hot_end_style(type) | Basic type, jhead or e3d |
hot_end_total_length(type) | Length from nozzle tip to the top |
| Function | Description |
|---|---|
hot_end_length(type) | The amount the hot end extends below its mounting |
hot_end_need_cooling(type) | Has own fan so don't need cooling hole in the duct |
| Module | Description |
|---|---|
hot_end(type, filament, naked = false, resistor_wire_rotate = [0,0,0], bowden = false) | Draw specified hot end |

| Qty | Module call | BOM entry |
|---|---|---|
| 2 | tubing(HSHRNK16) | Heatshrink sleeving ID 1.6mm x 15mm - not shown |
| 4 | tubing(HSHRNK64, 60) | Heatshrink sleeving ID 6.4mm x 60mm |
| 1 | e3d_hot_end(E3Dv5, 3) | Hot end E3D V5 direct 3mm |
| 1 | e3d_hot_end(E3Dv6, 3) | Hot end E3D V6 direct 3mm |
| 1 | e3d_hot_end(E3D_clone, 3) | Hot end E3D clone aliexpress 3mm |
| 1 | jhead_hot_end(JHeadMk5, 3) | Hot end JHead MK5 3mm |
| 2 | tubing(PTFE07, 62) | PTFE sleeving OD 1.2mm ID 0.71mm x 62mm - not shown |
| 2 | tubing(PTFE20, 45) | PTFE sleeving OD 2.6mm ID 2mm x 45mm - not shown |
| 1 | resistor(RIE1212UB5C5R6) | Resistor UB5C 5R6F 5R6 3W vitreous enamel - not shown |
| 1 | Tape self amalgamating silicone 110mm x 25mm | |
| 1 | resistor(Epcos) | Thermistor Epcos B57560G104F 100K 1% - not shown |
| 2 | Wire Red PTFE 16/0.2mm strands, length 170mm | |
| 4 | ziptie(small_ziptie) | Ziptie 2.5mm x 100mm min length |
Parametric PVC HT water pipes commonly found in hardware stores around germany. Great for building weather proof cases for IoT things.
vitamins/ht_pipes.scad Object definitions.
vitamins/ht_pipe.scad Implementation.
tests/HT_pipes.scad Code for this example.
| Function | Description |
|---|---|
pipe_length(type) | Pipe length |
pipe_od(type) | Outside diameter |
pipe_td(type) | T-Pipe diameter |
pipe_wall(type) | Wall thickness |
| Module | Description |
|---|---|
ht_cap(type) | Draw specified cap |
ht_pipe(type) | Draw specified pipe |
ht_tpipe(type) | Draw specified T-pipe |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | ht_cap(HT_110_cap) | PVC Waterpipe - HT 110 cap |
| 1 | ht_pipe(HT_110_pipe_1000) | PVC Waterpipe - HT 110 pipe 1000 mm |
| 1 | ht_pipe(HT_110_pipe_150) | PVC Waterpipe - HT 110 pipe 150 mm |
| 1 | ht_pipe(HT_110_pipe_1500) | PVC Waterpipe - HT 110 pipe 1500 mm |
| 1 | ht_pipe(HT_110_pipe_2000) | PVC Waterpipe - HT 110 pipe 2000 mm |
| 1 | ht_pipe(HT_110_pipe_250) | PVC Waterpipe - HT 110 pipe 250 mm |
| 1 | ht_pipe(HT_110_pipe_500) | PVC Waterpipe - HT 110 pipe 500 mm |
| 1 | ht_cap(HT_125_cap) | PVC Waterpipe - HT 125 cap |
| 1 | ht_pipe(HT_125_pipe_1000) | PVC Waterpipe - HT 125 pipe 1000 mm |
| 1 | ht_pipe(HT_125_pipe_150) | PVC Waterpipe - HT 125 pipe 150 mm |
| 1 | ht_pipe(HT_125_pipe_1500) | PVC Waterpipe - HT 125 pipe 1500 mm |
| 1 | ht_pipe(HT_125_pipe_2000) | PVC Waterpipe - HT 125 pipe 2000 mm |
| 1 | ht_pipe(HT_125_pipe_250) | PVC Waterpipe - HT 125 pipe 250 mm |
| 1 | ht_pipe(HT_125_pipe_500) | PVC Waterpipe - HT 125 pipe 500 mm |
| 1 | ht_cap(HT_160_cap) | PVC Waterpipe - HT 160 cap |
| 1 | ht_pipe(HT_160_pipe_1000) | PVC Waterpipe - HT 160 pipe 1000 mm |
| 1 | ht_pipe(HT_160_pipe_150) | PVC Waterpipe - HT 160 pipe 150 mm |
| 1 | ht_pipe(HT_160_pipe_1500) | PVC Waterpipe - HT 160 pipe 1500 mm |
| 1 | ht_pipe(HT_160_pipe_2000) | PVC Waterpipe - HT 160 pipe 2000 mm |
| 1 | ht_pipe(HT_160_pipe_250) | PVC Waterpipe - HT 160 pipe 250 mm |
| 1 | ht_pipe(HT_160_pipe_500) | PVC Waterpipe - HT 160 pipe 500 mm |
| 1 | ht_cap(HT_32_cap) | PVC Waterpipe - HT 32 cap |
| 1 | ht_pipe(HT_32_pipe_1000) | PVC Waterpipe - HT 32 pipe 1000 mm |
| 1 | ht_pipe(HT_32_pipe_150) | PVC Waterpipe - HT 32 pipe 150 mm |
| 1 | ht_pipe(HT_32_pipe_1500) | PVC Waterpipe - HT 32 pipe 1500 mm |
| 1 | ht_pipe(HT_32_pipe_2000) | PVC Waterpipe - HT 32 pipe 2000 mm |
| 1 | ht_pipe(HT_32_pipe_250) | PVC Waterpipe - HT 32 pipe 250 mm |
| 1 | ht_pipe(HT_32_pipe_500) | PVC Waterpipe - HT 32 pipe 500 mm |
| 1 | ht_cap(HT_40_cap) | PVC Waterpipe - HT 40 cap |
| 1 | ht_pipe(HT_40_pipe_1000) | PVC Waterpipe - HT 40 pipe 1000 mm |
| 1 | ht_pipe(HT_40_pipe_150) | PVC Waterpipe - HT 40 pipe 150 mm |
| 1 | ht_pipe(HT_40_pipe_1500) | PVC Waterpipe - HT 40 pipe 1500 mm |
| 1 | ht_pipe(HT_40_pipe_2000) | PVC Waterpipe - HT 40 pipe 2000 mm |
| 1 | ht_pipe(HT_40_pipe_250) | PVC Waterpipe - HT 40 pipe 250 mm |
| 1 | ht_pipe(HT_40_pipe_500) | PVC Waterpipe - HT 40 pipe 500 mm |
| 1 | ht_tpipe(HT_50_tpipe) | PVC Waterpipe - HT 50 T pipe |
| 1 | ht_cap(HT_50_cap) | PVC Waterpipe - HT 50 cap |
| 1 | ht_pipe(HT_50_pipe_1000) | PVC Waterpipe - HT 50 pipe 1000 mm |
| 1 | ht_pipe(HT_50_pipe_150) | PVC Waterpipe - HT 50 pipe 150 mm |
| 1 | ht_pipe(HT_50_pipe_1500) | PVC Waterpipe - HT 50 pipe 1500 mm |
| 1 | ht_pipe(HT_50_pipe_2000) | PVC Waterpipe - HT 50 pipe 2000 mm |
| 1 | ht_pipe(HT_50_pipe_250) | PVC Waterpipe - HT 50 pipe 250 mm |
| 1 | ht_pipe(HT_50_pipe_500) | PVC Waterpipe - HT 50 pipe 500 mm |
| 1 | ht_tpipe(HT_50_40_tpipe) | PVC Waterpipe - HT 50/40 T pipe |
| 1 | ht_cap(HT_75_cap) | PVC Waterpipe - HT 75 cap |
| 1 | ht_pipe(HT_75_pipe_1000) | PVC Waterpipe - HT 75 pipe 1000 mm |
| 1 | ht_pipe(HT_75_pipe_150) | PVC Waterpipe - HT 75 pipe 150 mm |
| 1 | ht_pipe(HT_75_pipe_1500) | PVC Waterpipe - HT 75 pipe 1500 mm |
| 1 | ht_pipe(HT_75_pipe_2000) | PVC Waterpipe - HT 75 pipe 2000 mm |
| 1 | ht_pipe(HT_75_pipe_250) | PVC Waterpipe - HT 75 pipe 250 mm |
| 1 | ht_pipe(HT_75_pipe_500) | PVC Waterpipe - HT 75 pipe 500 mm |
| 1 | ht_cap(HT_90_cap) | PVC Waterpipe - HT 90 cap |
| 1 | ht_pipe(HT_90_pipe_1000) | PVC Waterpipe - HT 90 pipe 1000 mm |
| 1 | ht_pipe(HT_90_pipe_150) | PVC Waterpipe - HT 90 pipe 150 mm |
| 1 | ht_pipe(HT_90_pipe_1500) | PVC Waterpipe - HT 90 pipe 1500 mm |
| 1 | ht_pipe(HT_90_pipe_2000) | PVC Waterpipe - HT 90 pipe 2000 mm |
| 1 | ht_pipe(HT_90_pipe_250) | PVC Waterpipe - HT 90 pipe 250 mm |
| 1 | ht_pipe(HT_90_pipe_500) | PVC Waterpipe - HT 90 pipe 500 mm |
Mini LCD Celsius Digital Thermometer Hygrometer Temperature Humidity Meter Gauge on eBay
vitamins/hygrometer.scad Implementation.
tests/hygrometer.scad Code for this example.
| Function | Description |
|---|---|
hygrometer_or() | The outside radius of a hygrometer |
| Module | Description |
|---|---|
hygrometer() | Draw a hygrometer |
hygrometer_hole(h = 0) | Drill the hole for a hygrometer |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | hygrometer() | Mini LCD Digital Thermometer / Hygrometer |
IEC mains inlets and outlet.
vitamins/iecs.scad Object definitions.
vitamins/iec.scad Implementation.
tests/IECs.scad Code for this example.
| Function | Description |
|---|---|
iec_bezel_h(type) | Bezel height |
iec_bezel_r(type) | Bezel corner radius |
iec_bezel_t(type) | Bezel thickness |
iec_bezel_w(type) | Bezel width |
iec_body_h(type) | Body height |
iec_body_r(type) | Body corner radius |
iec_body_w(type) | Body width |
iec_body_w2(type) | Body width at the narrow part |
iec_can(type) | If it has a can then the width, height, thickness and total width of the metal flange |
iec_depth(type) | Depth of the body below the flange |
iec_flange_h(type) | Flange height |
iec_flange_r(type) | Flange corner radius |
iec_flange_t(type) | Flange thickness |
iec_flange_w(type) | Flange width not including the lugs |
iec_male(type) | True for an outlet |
iec_part(type) | Description |
iec_pitch(type) | Screw hole pitch |
iec_screw(type) | Screw type |
iec_spades(type) | Spade type |
iec_width(type) | Widest part including the lugs |
| Function | Description |
|---|---|
iec_insert_screw_length() | Screw length used for inserts |
| Module | Description |
|---|---|
iec(type) | Draw specified IEC connector |
iec_assembly(type, thickness) | Assembly with fasteners given panel thickness |
iec_holes(type, h = 100, poly = false, horizontal = false, insert = false) | Drill the required panel holes |
iec_inserts(type) | Place the inserts |
iec_screw_positions(type) | Position children at the screw holes |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | iec(IEC_fused_inlet) | IEC fused inlet JR-101-1F |
| 1 | iec(IEC_fused_inlet2) | IEC fused inlet old |
| 1 | iec(IEC_inlet) | IEC inlet |
| 1 | iec(IEC_yunpen) | IEC inlet filtered |
| 1 | iec(IEC_inlet_atx) | IEC inlet for ATX |
| 1 | iec(IEC_outlet) | IEC outlet RS 811-7193 |
| 1 | iec(IEC_inlet_atx2) | IEC pressfit inlet for ATX |
| 1 | iec(IEC_320_C14_switched_fused_inlet) | IEC320 C14 switched fused inlet module |
| 14 | nut(M3_nut, nyloc = true) | Nut M3 x 2.4mm nyloc |
| 4 | screw(M3_cs_cap_screw, 10) | Screw M3 cs cap x 10mm |
| 10 | screw(M3_cs_cap_screw, 12) | Screw M3 cs cap x 12mm |
| 14 | washer(M3_washer) | Washer M3 x 7mm x 0.5mm |
Heatfit threaded inserts. Can be pushed into thermoplastics using a soldering iron with a conical bit set to 200°C.
vitamins/inserts.scad Object definitions.
vitamins/insert.scad Implementation.
tests/inserts.scad Code for this example.
| Function | Description |
|---|---|
insert_barrel_d(type) | Diameter of the main barrel |
insert_hole_radius(type) | Radius of the required hole in the plastic |
insert_length(type) | Length |
insert_outer_d(type) | Outer diameter at the top |
insert_ring1_h(type) | Height of the top and middle rings |
insert_ring2_d(type) | Diameter of the middle ring |
insert_ring3_d(type) | Diameter of the bottom ring |
insert_screw_diameter(type) | Screw size |
threaded_insert_chamfer(type) | Size of the chamfer for threaded inserts |
threaded_insert_pitch(type) | Pitch of the outer thread for threaded inserts |
| Function | Description |
|---|---|
insert_boss_radius(type, wall) | Compute the outer radius of an insert boss |
insert_hole_length(type) | Length of the insert rounded to layer height |
insert_nose_length(type, d) | The length before the second ring. |
| Module | Description |
|---|---|
insert(type) | Draw specified insert |
insert_boss(type, z, wall = 2 * extrusion_width) | Make a boss to take an insert |
insert_hole(type, counterbore = 0, horizontal = false) | Make a hole to take an insert, counterbore is the extra length for the screw |
insert_lug(insert, wall, counter_bore = 0, extension = 0, corner_r = 0, flying = true) | Make a flying insert lug, see ssr_shroud |
threaded_insert(type) | Draw specified threaded insert, for use in wood |

| Qty | Module call | BOM entry |
|---|---|---|
| 2 | insert(F1BM2) | Heatfit insert M2 x 4mm |
| 1 | insert(CNCKM2p5) | Heatfit insert M2.5 x 4mm |
| 1 | insert(F1BM2p5) | Heatfit insert M2.5 x 5.8mm |
| 1 | insert(CNCKM3) | Heatfit insert M3 x 3mm |
| 1 | insert(F1BM3) | Heatfit insert M3 x 5.8mm |
| 1 | insert(CNCKM4) | Heatfit insert M4 x 4mm |
| 1 | insert(F1BM4) | Heatfit insert M4 x 8.2mm |
| 2 | insert(CNCKM5) | Heatfit insert M5 x 5.8mm |
| 1 | threaded_insert(M10x25) | Threaded insert M10 x 25mm |
| 1 | threaded_insert(M12x30) | Threaded insert M12 x 30mm |
| 1 | threaded_insert(M16x30) | Threaded insert M16 x 30mm |
| 1 | threaded_insert(M3x8) | Threaded insert M3 x 8mm |
| 1 | threaded_insert(M4x10) | Threaded insert M4 x 10mm |
| 1 | threaded_insert(M5x12) | Threaded insert M5 x 12mm |
| 1 | threaded_insert(M6x15) | Threaded insert M6 x 15mm |
| 1 | threaded_insert(M8x18) | Threaded insert M8 x 18mm |
4mm jack sockets and binding posts. Each has a colour for the BOM entry and an optional alternative colour for display. E.g. a "brown" socket for mains live needs to be displayed as "sienna" to look realistic.
vitamins/jack.scad Implementation.
tests/jack.scad Code for this example.
| Function | Description |
|---|---|
jack_4mm_flange_radius() | 4mm jack socket flange radius |
jack_4mm_hole_radius() | Panel hole radius for 4mm jack |
jack_4mm_plastic_flange_radius() | 4mm plastic jack socket flange radius |
jack_4mm_shielded_hole_radius() | Panel hole radius for 4mm shielded jack |
jack_4mm_shielded_nut_radius() | Largest diameter of 4mm shielded jack |
post_4mm_diameter() | Outer diameter of 4mm binding post |
power_jack_radius() | Power jack socket flange radius |
| Module | Description |
|---|---|
jack_4mm(colour, thickness, display_colour = false) | Draw a 4mm jack socket with nut positioned for specified panel thickness |
jack_4mm_plastic(colour, thickness, display_colour = false) | Draw a 4mm plastic jack socket with nut positioned for specified panel thickness |
jack_4mm_shielded(colour, thickness, display_colour = false) | Draw a 4mm shielded jack |
post_4mm(colour, thickness, display_colour = false) | Draw a 4mm binding post |
post_4mm_hole(h = 100, poly = false) | Drill hole for 4mm binding post |
power_jack(thickness) | Draw a power jack socket with nut positioned for specified panel thickness |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | post_4mm("red", 3) | 4mm jack binding post red |
| 1 | jack_4mm("blue", 3, "royalblue") | 4mm jack socket blue |
| 1 | jack_4mm_plastic("[0.2, 0.2, 0.2]", 3, [0.2, 0.2, 0.2]) | 4mm plastic jack socket [0.2, 0.2, 0.2] |
| 1 | jack_4mm_shielded("brown", 3, "sienna") | 4mm shielded jack socket brown |
| 1 | power_jack() | Power jack socket |
Light dependent resistors.
Larger ones seem to have both a higher dark resistance and a lower bright light resistance.
vitamins/ldrs.scad Object definitions.
vitamins/ldr.scad Implementation.
tests/LDRs.scad Code for this example.
| Function | Description |
|---|---|
ldr_active(type) | The active width |
ldr_description(type) | Description |
ldr_diameter(type) | The diameter of the round bit |
ldr_lead_d(type) | The lead diameter |
ldr_pitch(type) | Pitch between the leads |
ldr_thickness(type) | Thickness |
ldr_width(type) | Across the flats |
| Module | Description |
|---|---|
LDR(type, lead_length = 3) | Draw an LDR, can specify the lead length |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | ldr(large_ldr) | Light dependent resistor - large |
| 1 | ldr(small_ldr) | Light dependent resistor - small |
Nuts for leadscrews.
vitamins/leadnuts.scad Object definitions.
vitamins/leadnut.scad Implementation.
tests/leadnuts.scad Code for this example.
| Function | Description |
|---|---|
leadnut_bore(type) | Thread size |
leadnut_colour(type) | The colour |
leadnut_flange_dia(type) | Flange diameter |
leadnut_flange_offset(type) | Offset of the flange from the top |
leadnut_flange_t(type) | Flange thickness |
leadnut_flat(type) | Flat section width |
leadnut_height(type) | Total height |
leadnut_hole_dia(type) | The diameter of the screw holes |
leadnut_hole_pitch(type) | The radial pitch of the screw holes |
leadnut_holes(type) | The number of screw holes |
leadnut_lead(type) | Screw lead |
leadnut_od(type) | Outer diameter of the shank |
leadnut_pitch(type) | Screw pitch |
leadnut_screw(type) | The type of the fixing screws |
leadnuthousing_height(type) | Height of housing |
leadnuthousing_hole_pos(type) | Offset from center for nut hole |
leadnuthousing_length(type) | Length of housing |
leadnuthousing_mount_screw(type) | Mounting screw |
leadnuthousing_mount_screw_len(type) | Mounting screw length |
leadnuthousing_nut(type) | Nut type this is suitable for |
leadnuthousing_nut_screw_length(type) | Length of mounting screw for nut |
leadnuthousing_screw_dist_l(type) | Distance between mounting holes length |
leadnuthousing_screw_dist_w(type) | Distance between mounting holes width |
leadnuthousing_width(type) | Width of housing |
| Function | Description |
|---|---|
leadnut_shank(type) | The length of the shank below the flange |
| Module | Description |
|---|---|
leadnut(type) | Draw specified leadnut |
leadnut_screw_positions(type) | Position children at the screw holes |
leadnuthousing(type) | Nut housing, to connect a lead nut to another object |
leadnuthousing_nut_position(type) | The position of the nut may be off-center, use this to get the position |
leadnuthousing_nut_screw_positions(type) | get screw positions to mount the nut to the nut housing |
leadnuthousing_screw_positions(type) | Get screw positions to mount the leadnut housing |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | nuthousing(LNHT8x2) | Lead Screw Nut Housing T8 |
| 2 | leadnut(LSN8x2) | Leadscrew nut 8 x 2 |
| 1 | leadnut(LSN8x8) | Leadscrew nut 8 x 8 RobotDigg |
| 1 | leadnut(SFU1610) | Leadscrew nut for SFU1610 |
| 4 | screw(M3_cap_screw, 15) | Screw M3 cap x 15mm |
LED voltmeter and ammeter modules available from China and a printed bezel that allows the voltmeter to be mounted into a CNC cut panel. The meter is held in the bezel by melting the stakes with a soldering iron set to 200°C. The bezel is fixed in the panel with hot glue.
The 7 SEGMENT.TTF font from the docs directory needs to be installed to get realistic digits.
vitamins/led_meters.scad Object definitions.
vitamins/led_meter.scad Implementation.
tests/LED_meters.scad Code for this example.
| Function | Description |
|---|---|
meter_hole_pitch(type) | Lug hole pitch |
meter_hole_radius(type) | Lug hole radius |
meter_lug_offset(type) | Lug position, 0 = center, +1 = top |
meter_lug_size(type) | Lug length and width |
meter_offset(type) | Display position, 0 = center, +1 = top |
meter_pcb_size(type) | PCB size excluding lugs |
meter_shunt(type) | Ammeter shunt wire |
meter_size(type) | Size of display |
| Function | Description |
|---|---|
meter_bezel_length(type) | Printed bezel length |
meter_bezel_rad(type) | Printed bezel corner radius |
meter_bezel_wall(type) | Printed bezel wall thickness |
meter_bezel_width(type) | Printed bezel width |
meter_shunt_y(type) | Shunt y coordinate |
| Module | Description |
|---|---|
meter(type, colour = "red", value = "888", display_colour = false) | Draw a meter with optional colour and display value |
meter_assembly(type, colour = "red", value = "888", display_colour = false) | Meter assembled into the bezel |
meter_bezel(type) | Generate the STL for the meter bezel |
meter_bezel_hole(type, h = 100) | Make a hole to fit the meter Bezel |
meter_hole_positions(type) | Position children over the holes |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | meter(led_ameter, colour = "blue") | LED ammeter blue |
| 1 | meter(led_meter, colour = "blue") | LED voltmeter blue |
| 1 | meter(led_meter) | LED voltmeter red |
| Qty | Filename |
|---|---|
| 1 | meter_bezel.stl |
Standard domed through hole LEDs. Can specify colour and lead length.
vitamins/leds.scad Object definitions.
vitamins/led.scad Implementation.
tests/LEDs.scad Code for this example.
| Function | Description |
|---|---|
led_diameter(type) | Body diameter |
led_height(type) | Body height |
led_lead_t(type) | Lead thickness |
led_pitch(type) | Lead pitch |
led_rim_dia(type) | Rim diameter |
led_rim_t(type) | Rim height |
| Function | Description |
|---|---|
led_hole_radius(type) | Radius of panel hole to accept LED |
led_radius(type) | Radius |
| Module | Description |
|---|---|
led(type, colour = "red", lead = 5, right_angle = 0) | Draw specified LED with desired colour and lead length |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | led(LED10mm, "orange") | LED 10 mm orange |
| 1 | led(LED3mm, "green") | LED 3 mm green |
| 1 | led(LED5mm, "blue") | LED 5 mm blue |
| 1 | led(LED8mm) | LED 8 mm red |
| 1 | led(LED5x2mm, "green") | LED [5, 2] mm green |
LED strip lights that can be cut to size.
The definitions are for the full length but they can be cut to size by specifying how many segments,
which can by calculated using light_strip_segments(type, max_length).
The light_strip_clip() module makes a clip to go around the light that can be incorporated into a printed bracket to hold it.
vitamins/light_strips.scad Object definitions.
vitamins/light_strip.scad Implementation.
tests/light_strips.scad Code for this example.
| Function | Description |
|---|---|
light_strip_aperture(type) | Inside width |
light_strip_depth(type) | Outside depth |
light_strip_grouped(type) | Number of LEDs in each group |
light_strip_leds(type) | Total number of LEDs |
light_strip_length(type) | Un-cut length |
light_strip_pcb_thickness(type) | PCB thickness |
light_strip_thickness(type) | Metal thickness |
light_strip_width(type) | Outside width |
| Function | Description |
|---|---|
light_strip_clip_depth(light) | Depth of the clip |
light_strip_clip_length(light) | Outside length of clip |
light_strip_clip_slot(light) | Clip slot size |
light_strip_clip_wall() | Clip wall thickness |
light_strip_clip_width(light) | Outside width of clip |
light_strip_cut_length(type, segs) | Calculate cut length given segments |
light_strip_segments(type, max_length) | Calculate the maximum number of segments that fit in max_length |
| Module | Description |
|---|---|
light_strip(type, segs = undef) | Draw specified light strip, segs can be used to limit the length |
light_strip_clip(light) | Make a clip to go over the strip to be incorporated into a bracket |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | light_strip(Rigid5050, 6) | Light strip rigid SMD5050 low profile x 250mm (6 segments) |
| 1 | light_strip(RIGID5050, 6) | Light strip rigid SMD5050 x 250mm (6 segments) |
LMnUU linear bearings.
vitamins/linear_bearings.scad Object definitions.
vitamins/linear_bearing.scad Implementation.
tests/linear_bearings.scad Code for this example.
| Function | Description |
|---|---|
bearing_dia(type) | Outside diameter |
bearing_groove_dia(type) | Groove diameter |
bearing_groove_length(type) | Groove length |
bearing_groove_spacing(type) | Spacing between grooves, outer to outer, ie includes the grooves themselves |
bearing_length(type) | Total length |
bearing_rod_dia(type) | Internal diameter |
open_bearing_width(type) | For open bearings, the width of the opening at the rod |
| Function | Description |
|---|---|
bearing_radius(type) | Outside radius |
open_bearing_theta(type) | For open bearings, the angle of the opening |
| Module | Description |
|---|---|
linear_bearing(type) | Draw specified linear bearing |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | linear_bearing(LM10LUU) | Linear bearing LM10LUU |
| 1 | linear_bearing(LM10UU) | Linear bearing LM10UU |
| 1 | linear_bearing(LM12LUU) | Linear bearing LM12LUU |
| 1 | linear_bearing(LM12UU) | Linear bearing LM12UU |
| 1 | linear_bearing(LM16LUU) | Linear bearing LM16LUU |
| 1 | linear_bearing(LM16UU) | Linear bearing LM16UU |
| 1 | linear_bearing(LM16UUOP) | Linear bearing LM16UUOP |
| 1 | linear_bearing(LM3LUU) | Linear bearing LM3LUU |
| 1 | linear_bearing(LM3UU) | Linear bearing LM3UU |
| 1 | linear_bearing(LM4LUU) | Linear bearing LM4LUU |
| 1 | linear_bearing(LM4UU) | Linear bearing LM4UU |
| 1 | linear_bearing(LM5LUU) | Linear bearing LM5LUU |
| 1 | linear_bearing(LM5UU) | Linear bearing LM5UU |
| 1 | linear_bearing(LM6LUU) | Linear bearing LM6LUU |
| 1 | linear_bearing(LM6UU) | Linear bearing LM6UU |
| 1 | linear_bearing(LM8LUU) | Linear bearing LM8LUU |
| 1 | linear_bearing(LM8UU) | Linear bearing LM8UU |
Cylindrical and ring magnets.
vitamins/magnets.scad Object definitions.
vitamins/magnet.scad Implementation.
tests/magnets.scad Code for this example.
| Function | Description |
|---|---|
magnet_h(type) | Height |
magnet_id(type) | Inside diameter if a ring |
magnet_name(type) | Name |
magnet_od(type) | Outer diameter |
magnet_r(type) | Corner radius |
| Module | Description |
|---|---|
magnet(type) | Draw specified magnet |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | magnet(MAG484) | Magnet, 6.35mm diameter, 6.35mm high, 3.175mm bore |
| 1 | magnet(MAG8x4x4p2) | Magnet, 8mm diameter, 4mm high, 4.2mm bore |
| 1 | magnet(MAG5x8) | Magnet, 8mm diameter, 5mm high |
| 1 | magnet(MAGRE6x2p5) | Radial encoder magnet, 6mm diameter, 2.5mm high |
UK 13A sockets at the moment.
vitamins/mains_sockets.scad Object definitions.
vitamins/mains_socket.scad Implementation.
tests/mains_sockets.scad Code for this example.
| Function | Description |
|---|---|
mains_socket_corner(type) | Corner radius |
mains_socket_counterbore(type) | Screw counterbore |
mains_socket_depth(type) | Depth at the base |
mains_socket_height(type) | Height |
mains_socket_offset(type) | Offset of the socket from the centre |
mains_socket_pitch(type) | Screw hole pitch |
mains_socket_t(type) | Plastic thickness |
mains_socket_top_d(type) | Depth at the top, might be tapered |
mains_socket_top_w(type) | Width at the top, might be tapered |
mains_socket_width(type) | Width at the base |
| Function | Description |
|---|---|
mains_socket_screw(type) | Screw type |
| Module | Description |
|---|---|
mains_socket(type) | Draw specified 13A socket |
mains_socket_earth_position(type) | Position of earth terminal for DiBond panel |
mains_socket_hole_positions(type) | Position children at the screw holes |
mains_socket_holes(type, h = 0, earth = true, small = false) | Panel cutout |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | mains_socket(Contactum) | Mains socket 13A |
| 1 | mains_socket(PMS9143A) | Mains socket 13A |
| 1 | mains_socket(MKLOGIC) | Mains socket 13A, switched |
Used for limit switches. Currently only the button type is supported as the lever and roller types are less accurate.
The origin of the switch is in the center of the body. microswitch_button_pos() is the offset to tip of the button at its operating point.
The switch is drawn with the button at the nominal operation point. This actual trigger point can be plus or minus microswitch_op_tol(type).
When the button is released it comes out by a maximum of microswitch_fp_max(type) from the nominal operating point.
vitamins/microswitches.scad Object definitions.
vitamins/microswitch.scad Implementation.
tests/microswitches.scad Code for this example.
| Function | Description |
|---|---|
microswitch_body_clr(type) | Body colour |
microswitch_button_clr(type) | Button colour |
microswitch_button_pos(type) | Button position at operating point |
microswitch_button_t(type) | Button thickness |
microswitch_button_w(type) | Button width |
microswitch_fp_max(type) | Free position maximum |
microswitch_hole_d(type) | Screw hole diameter |
microswitch_holes(type) | Hole positions |
microswitch_leg(type) | Leg types |
microswitch_legs(type) | Leg positions |
microswitch_length(type) | Body length |
microswitch_op_tol(type) | Operating position +/- tolerance |
microswitch_radius(type) | Body corner radius |
microswitch_thickness(type) | Body thickness |
microswitch_width(type) | Body width |
| Function | Description |
|---|---|
microswitch_lower_extent(type) | How far legs extend downwards |
microswitch_right_extent(type) | How far legs extend right |
microswitch_size(type) | Body size |
| Module | Description |
|---|---|
microswitch(type) | Draw specified microswitch |
microswitch_hole_positions(type) | Place children at the hole positions |
microswitch_wire_positions(type, skip = undef) | Place children at the leg hole positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | microswitch(small_microswitch) | Microswitch DM1-00P-110-3 |
| 1 | microswitch(medium_microswitch) | Microswitch SS-01 or SS-5GL |
| 1 | microswitch(large_microswitch) | Microswitch Saia G3 low force |
Microview OLED display with on board AVR by geekammo / Sparkfun.
microview() generates the model. microview(true) makes an object to cut out a panel aperture for it.
Uses STL files copyright geekammo and licenced with MIT license, see microview/LICENSE.txt.
vitamins/microview.scad Implementation.
tests/microview.scad Code for this example.
| Module | Description |
|---|---|
microview(cutout = false) | Draw microview or generate a panel cutout for it |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | microview() | Microview OLED display |
Random screw down modules. Currently just DROK buck converters.
vitamins/modules.scad Object definitions.
vitamins/module.scad Implementation.
tests/modules.scad Code for this example.
| Function | Description |
|---|---|
mod_height(type) | Body height |
mod_hole_r(type) | Screw hole radius |
mod_holes(type) | Screw hole positions |
mod_length(type) | Body length |
mod_part(type) | Description |
mod_screw(type) | Screw type |
mod_screw_z(type) | Thickness of screw lug |
mod_width(type) | Body width |
| Module | Description |
|---|---|
mod(type) | Draw specified module |
mod_screw_positions(type) | Position children at the screw positions |
module_assembly(type, thickness) | Module with its fasteners in place |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | mod(drok_buck) | Drok buck converter |
| 2 | nut(M4_nut, nyloc = true) | Nut M4 x 3.2mm nyloc |
| 2 | screw(M4_dome_screw, 12) | Screw M4 dome x 12mm |
| 4 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
Default is steel but can be drawn as brass or nylon. A utility for making nut traps included.
If a nut is given a child then it gets placed on its top surface.
The following diagram shows you the parameters for drawing a sliding_t_nut:

vitamins/nuts.scad Object definitions.
vitamins/nut.scad Implementation.
tests/nuts.scad Code for this example.
| Function | Description |
|---|---|
nut_dome(type) | Dome height and max thread depth if a domed acorn nut |
nut_pitch(type) | Pitch if not standard metric course thread |
nut_radius(type) | Radius across the corners |
nut_size(type) | Diameter of the corresponding screw |
nut_square_size(type) | Diameter of the corresponding screw |
nut_square_thickness(type) | Thickness of the square nut |
nut_square_width(type) | Width of the square nut |
nut_trap_depth(type) | Depth of nut trap |
nut_washer(type) | Corresponding washer |
nut_weld_base_r(type) | Weld nut base radius |
nut_weld_base_t(type) | Weld nut base thickness |
| Function | Description |
|---|---|
nut_dome_height(type) | Height of the domed version |
nut_flat_radius(type) | Radius across the flats |
nut_thickness(type, nyloc = false) | Thickness of plain or nyloc version |
nut_thread_depth(type) | Max thread depth in domed version |
nut_trap_flat_radius(nut, horizontal = false) | Radius across the flats of a nut trap |
nut_trap_radius(nut, horizontal = false) | Radius across the corners of a nut trap |
t_nut_tab(type) | Sliding t-nut T dimensions |
| Module | Description |
|---|---|
nut(type, nyloc = false, brass = false, nylon = false, dome = false) | Draw specified nut |
nut_and_washer(type, nyloc) | Draw nut with corresponding washer |
nut_square(type, brass = false, nylon = false) | Draw specified square nut |
nut_trap(screw, nut, depth = 0, horizontal = false, supported = false, h = 200) | Make a nut trap |
sliding_ball_t_nut(size, w, h, r) | Draw a sliding ball t nut |
sliding_t_nut(type) | Draw a sliding T nut, T nut with a spring loaded ball or a hammer nut. |
weld_nut(type) | draw a weld nut |
wingnut(type) | Draw a wingnut |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | nut(M2_nut) | Nut M2 x 1.6mm |
| 1 | nut(M2_nut, nyloc = true) | Nut M2 x 1.6mm nyloc |
| 1 | nut(M2p5_nut) | Nut M2.5 x 2.2mm |
| 1 | nut(M2p5_nut, nyloc = true) | Nut M2.5 x 2.2mm nyloc |
| 1 | nut(M2p5_nut, nylon = true) | Nut M2.5 x 2.2mm nylon |
| 1 | sliding_t_nut(M3_hammer_nut) | Nut M3 hammer |
| 1 | sliding_t_nut(M3_sliding_t_nut) | Nut M3 sliding T |
| 1 | nut(M3_nut) | Nut M3 x 2.4mm |
| 1 | nut(M3_nut, brass = true) | Nut M3 x 2.4mm brass |
| 1 | nut(M3_nut, dome = true) | Nut M3 x 2.4mm domed |
| 1 | nut(M3_nut, nyloc = true) | Nut M3 x 2.4mm nyloc |
| 1 | nut(M3nS_thin_nut) | Nut M3nS 5.5 x 1.8mm |
| 1 | sliding_t_nut(M4_hammer_nut) | Nut M4 hammer |
| 1 | sliding_t_nut(M4_sliding_t_nut) | Nut M4 sliding T |
| 1 | nut(M4_nut) | Nut M4 x 3.2mm |
| 1 | nut(M4_nut, dome = true) | Nut M4 x 3.2mm domed |
| 1 | nut(M4_nut, nyloc = true) | Nut M4 x 3.2mm nyloc |
| 1 | nut(M4nS_thin_nut) | Nut M4nS 7 x 2.2mm |
| 1 | sliding_t_nut(M5_sliding_t_nut) | Nut M5 sliding T |
| 1 | nut(M5_nut) | Nut M5 x 4mm |
| 1 | nut(M5_nut, dome = true) | Nut M5 x 4mm domed |
| 1 | nut(M5_nut, nyloc = true) | Nut M5 x 4mm nyloc |
| 1 | nut(M5nS_thin_nut) | Nut M5nS 8 x 2.7mm |
| 1 | sliding_t_nut(M6_sliding_t_nut) | Nut M6 hammer |
| 1 | nut(M6_half_nut) | Nut M6 x 3mm |
| 1 | nut(M6_nut) | Nut M6 x 5mm |
| 1 | nut(M6_nut, dome = true) | Nut M6 x 5mm domed |
| 1 | nut(M6_nut, nyloc = true) | Nut M6 x 5mm nyloc |
| 1 | nut(M6nS_thin_nut) | Nut M6nS 10 x 3.2mm |
| 1 | sliding_t_nut(M8_sliding_ball_t_nut) | Nut M8 sliding T with spring loaded ball |
| 1 | nut(M8_nut) | Nut M8 x 6.5mm |
| 1 | nut(M8_nut, dome = true) | Nut M8 x 6.5mm domed |
| 1 | nut(M8_nut, nyloc = true) | Nut M8 x 6.5mm nyloc |
| 1 | nut(M8nS_thin_nut) | Nut M8nS 13 x 4mm |
| 1 | washer(M6_washer) | Washer M6 x 12.5mm x 1.5mm |
| 1 | weld nut(M4_weld_nut) | Weld Nut M4 |
| 1 | weld nut(M6_weld_nut) | Weld Nut M6 |
| 1 | wingnut(M4_wingnut) | Wingnut M4 |
Nitrile rubber O-rings.
Just a black torus specified by internal diameter, id and minor_d plus a BOM entry.
Can be shown stretched by specifying the actual_id.
vitamins/o_ring.scad Implementation.
tests/o_ring.scad Code for this example.
| Module | Description |
|---|---|
O_ring(id, minor_d, actual_id = 0) | Draw O-ring with specified internal diameter and minor diameter. actual_id can be used to stretch it around something. |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | O_ring(2.5, 1.6) | O-ring nitrile 2.5mm x 1.6mm |
Nicodrone OpenGrab V3 electro-permanent magnet, see https://kb.zubax.com/display/MAINKB/OpenGrab+EPM+v3.
A permanent magnet that can be magnetized and de-magnetized electronically.
vitamins/opengrab.scad Implementation.
tests/opengrab.scad Code for this example.
| Function | Description |
|---|---|
opengrab_depth() | Module height |
opengrab_pcb() | The PCB |
opengrab_pcb_z() | PCB offset from the front |
opengrab_screw_depth() | Max screw depth in pillars |
opengrab_target_thickness() | Target sheet thickness |
opengrab_width() | Module width |
| Module | Description |
|---|---|
opengrab() | Draw OpenGrab module |
opengrab_hole_positions() | Position children at the screw positions |
opengrab_side_hole_positions() | Position children at the two 4mm hole |
opengrab_target() | Draw OpenGrab target |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | opengrab() | OpenGrab V3 electro permanent magnet |
| 1 | opengrab_target() | OpenGrab silicon steel target plate |
Panel mounted digital meter modules
Notes on the DSN_VC288:
vitamins/panel_meters.scad Object definitions.
vitamins/panel_meter.scad Implementation.
tests/panel_meters.scad Code for this example.
| Function | Description |
|---|---|
pmeter_aperture(type) | Aperture length, width and bevel |
pmeter_bevel(type) | Bezel bevel inset and start height or a radius |
pmeter_bezel(type) | Bezel size |
pmeter_bezel_r(type) | Bezel radius |
pmeter_button_colour(type) | Button colour |
pmeter_button_pos(type) | Button position |
pmeter_button_r(type) | Button radius |
pmeter_button_size(type) | Button size |
pmeter_buttons(type) | List of buttons |
pmeter_inner_ap(type) | Inner aperture |
pmeter_inner_ap_o(type) | Inner aperture offset |
pmeter_pcb(type) | Optional PCB for open types |
pmeter_pcb_h(type) | Component height from the front |
pmeter_pcb_z(type) | Distance of PCB from the back |
pmeter_size(type) | Body size including bezel height |
pmeter_tab(type) | Tab size |
pmeter_tab_z(type) | Tab vertical position |
pmeter_thickness(type) | Wall thickness if not closed |
| Function | Description |
|---|---|
pmeter_depth(type) | Depth below bezel |
| Module | Description |
|---|---|
panel_meter(type) | Draw panel mounted LCD meter module |
panel_meter_button(type) | Draw panel meter button |
panel_meter_cutout(type, h = 0) | Make panel cutout |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | panel_meter(DSN_VC288) | DSN-VC288 DC 100V 10A Voltmeter ammeter |
| 1 | panel_meter(PZEM001) | Peacefair PZEM-001 AC digital multi-function meter |
| 1 | panel_meter(PZEM021) | Peacefair PZEM-021 AC digital multi-function meter |
| 1 | panel_meter(DSP5005) | Ruideng DSP5005 Power supply module |
PCBs and perfboard with optional components. The shape can be a rectangle with optionally rounded corners or a polygon for odd shapes like Arduino.
vitamins/pcb.scad Implementation.
tests/PCB.scad Code for this example.
| Function | Description |
|---|---|
ff_back(type) | Flat flex back section size |
ff_latch(type) | Flat flex latch size |
ff_mid(type) | Flat flex middle section size |
ff_slot(type) | Flat flex slot size |
hdmi_depth(type) | Front to back depth |
hdmi_height(type) | Outside height above the PCB |
hdmi_height1(type) | Inside height at the sides |
hdmi_height2(type) | Inside height in the middle |
hdmi_thickness(type) | Wall thickness of the metal |
hdmi_width1(type) | Inside width at the top |
hdmi_width2(type) | Inside width at the bottom |
pcb_accessories(type) | List of accessories to go on the BOM, SD cards, USB cables, etc. |
pcb_colour(type) | Colour of the substrate |
pcb_components(type) | List of components |
pcb_grid(type) | Grid origin if a perfboard |
pcb_hole_d(type) | Mounting hole diameter |
pcb_holes(type) | List of hole positions |
pcb_land_d(type) | Pad around mounting hole |
pcb_length(type) | Length |
pcb_name(type) | Description |
pcb_parts_on_bom(type) | True if the parts should be separate BOM items |
pcb_polygon(type) | Optional outline polygon for odd shaped boards |
pcb_radius(type) | Corner radius |
pcb_thickness(type) | Thickness |
pcb_width(type) | Width |
| Function | Description |
|---|---|
pcb(name, desc, size, corner_r = 0, hole_d = 0, land_d = 0, colour = "green", parts_on_bom = false, holes = [], components = [], accessories = [], grid = undef, polygon = undef, screw = undef) | Constructor |
pcb_component(type, name, index = 0) | Return the component specified by name and index |
pcb_component_position(type, name, index = 0) | Return x y position of specified component |
pcb_coord(type, p) | Convert offsets from the edge to coordinates relative to the centre |
pcb_grid_pos(type, x, y, z = 0, i = 0) | Returns a pcb grid position |
pcb_screw(type, cap = hs_cap) | Mounting screw type |
pcb_size(type) | Length, width and thickness in a vector |
| Module | Description |
|---|---|
barrel_jack(cutout = false) | Draw barrel power jack |
block(size, colour, makes_cutout, cutouts, r = 0, rtop = 0) | Draw a coloured cube to represent a random PCB component |
buzzer(height, diameter, colour) | Draw PCB buzzer with specified height, diameter and colour |
chip(length, width, thickness, colour, cutout = false) | Draw a coloured cube to represent a chip, or other rectangular component, or cylinder if width is zero |
flat_flex(type, cutout = false) | Draw flat flexistrip connector as used on RPI0 |
flex(cutout = false) | Draw flexistrip connector |
hdmi(type, cutout = false) | Draw HDMI socket |
jack(cutout = false) | Draw 3.5mm jack |
molex_254(ways, right_angle = 0, skip = undef) | Draw molex KK header, set right_angle to 1 for normal right angle version or -1 for inverted right angle version. |
molex_254_housing(ways) | Draw a Molex KK housing |
molex_usb_Ax1(cutout) | Draw Molex USB A connector suitable for perf board |
molex_usb_Ax2(cutout) | Draw Molex dual USB A connector suitable for perf board |
pcb(type) | Draw specified PCB |
pcb_assembly(type, height, thickness) | Draw PCB assembly with spaces and fasteners in place |
pcb_base(type, height, thickness, wall = 2) | Generate STL for a base with PCB spacers |
pcb_component(comp, cutouts = false, angle = undef) | Draw pcb component from description |
pcb_component_position(type, name) | Position child at the specified component position |
pcb_components(type, cutouts = false, angle = undef) | Draw list of PCB components on the PCB |
pcb_cutouts(type, angle = undef) | Make cut outs to clear components on a PCB |
pcb_grid(type, x, y, z = 0, i = 0) | Positions children at specified grid position |
pcb_grid_components(type, components, cutouts = false, angle = undef) | Draw list of components on the PCB grid for perf board |
pcb_screw_positions(type) | Positions children at the mounting hole positions |
pcb_spacer(screw, height, wall = 1.8, taper = 0) | Generate STL for PCB spacer |
rj45(cutout = false) | Draw RJ45 Ethernet connector |
standoff(h, d, h2, d2) | Draw a standoff |
terminal_35(ways, colour = "blue") | Draw 3.5mm terminal block |
trimpot10(vertical, cutout = false) | Draw a ten turn trimpot |
uSD(size, cutout = false) | Draw uSD socket |
usb_Ax1(cutout = false) | Draw USB type A single socket |
usb_Ax2(cutout = false) | Draw USB type A dual socket |
usb_B(cutout = false) | Draw USB B connector |
usb_C(cutout = false) | Draw USB C connector |
usb_miniA(cutout = false) | Draw USB mini A connector |
usb_uA(cutout = false) | Draw USB micro A connector |
usb_vAx1(cutout = false) | Draw a vertical USB type A single socket |
vero_pin(cropped = false) | Draw a vero pin |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | potentiometer(BTT_encoder) | BTT_encoder |
| 1 | box_header(2p54header, 4, 2) | Box header 4 x 2 |
| 1 | box_header(2p54header, 4, 2, right_angle = true) | Box header 4 x 2 right angle |
| 1 | rd_disc(10mm_disc, "1nF Y2") | Ceramic capacitor, 10mm_disc 1nF Y2 |
| 1 | rd_disc(6p4mm_disc, "100n") | Ceramic capacitor, 6p4mm_disc 100n |
| 1 | rd_cm_choke(ATX_CM_CHOKE ,"3.5mH") | Common mode choke 3.5mH |
| 1 | rd_xtal(ACT1100, "40MHz") | Crystal ACT1100 40MHz |
| 1 | rd_xtal(ACT1700, "80MHz") | Crystal ACT1700 80MHz |
| 1 | rd_xtal(C_002RX, "60KHz") | Crystal C_002RX 60KHz |
| 1 | rd_xtal(HC49, "4MHz") | Crystal HC49 4MHz |
| 1 | rd_xtal(HC49_4H, "10MHz") | Crystal HC49_4H 10MHz |
| 1 | d_plug(DCONN9, pcb = true) | D-type 9 way PCB mount plug |
| 1 | dil_socket(12, 15.24) | DIL socket 24 x 0.6" |
| 1 | smd_diode(DO214AC, "SS34") | DO214AC package SS34 |
| 2 | ax_diode(DO_41, "1N4007") | Diode 1N4007 |
| 2 | ax_diode(DO_35, "1N4148") | Diode 1N4148 |
| 1 | rd_electrolytic(ECAP8x12, "220uF35V") | Electolytic capacitor ECAP8x12 220uF35V |
| 1 | hdmi(hdmi_full) | HDMI socket |
| 1 | pdip(24, 27C32, w = 15.24) | IC 27C32 PDIP24 |
| 1 | pdip(8, NE555) | IC NE555 PDIP8 |
| 1 | idc_transition(2p54header, 5) | IDC transition header 5 x 2 |
| 1 | smd_inductor(IND2525 ,"4R7") | IND2525 package 4R7 |
| 1 | jst_xh_header(jst_ph_header, 2) | JST PH connector 2 way |
| 1 | jst_xh_header(jst_xh_header, 2) | JST XH connector 2 way |
| 1 | jst_xh_header(jst_zh_header, 2) | JST ZH connector 2 way |
| 1 | potentiometer(KY_040_encoder) | KY_040_encoder |
| 1 | led(LED10mm, "yellow") | LED 10 mm yellow |
| 1 | led(LED3mm) | LED 3 mm red |
| 1 | led(LED5mm, "orange") | LED 5 mm orange |
| 1 | led(LED8mm, "blue") | LED 8 mm blue |
| 1 | microswitch(small_microswitch) | Microswitch DM1-00P-110-3 |
| 1 | hdmi(hdmi_mini) | Mini HDMI socket |
| 1 | molex_254(2) | Molex KK header 2 way |
| 1 | molex_254(2, right_angle = 1) | Molex KK header 2 way right angle |
| 1 | molex_254(2, right_angle = -1) | Molex KK header 2 way right angle |
| 1 | pin_header(2p54header, 4, 1) | Pin header 4 x 1 |
| 1 | pin_header(2p54header, 5, 1) | Pin header 5 x 1 |
| 1 | pin_header(2p54header, 5, 1, right_angle = true) | Pin header 5 x 1 right_angle |
| 1 | pin_socket(2p54header, 4, 1) | Pin socket 4 x 1 |
| 1 | pin_socket(2p54header, 6, 1) | Pin socket 6 x 1 |
| 2 | pin_socket(2p54header, 8, 1) | Pin socket 8 x 1 |
| 1 | rd_coil(IND16x10 ,"4.7uH") | Radial inductor 16x10 4.7uH |
| 1 | rd_transistor(TO92, "78L05") | Regulator TO92 78L05 |
| 1 | rd_module(HF33F, "012-HSL-3F") | Relay HF33F / 012-HSL-3F |
| 1 | ax_res(res1_2, 10, tol = 10) | Resistor 10 Ohms 10% 0.5W |
| 1 | ax_res(res1_4, 100, tol = 2) | Resistor 100 Ohms 2% 0.25W |
| 1 | ax_res(res1_8, 1000) | Resistor 1000 Ohms 5% 0.125W |
| 1 | ax_res(res1_4, 10000) | Resistor 10000 Ohms 5% 0.25W |
| 1 | ax_res(res1_2, 100000) | Resistor 100000 Ohms 5% 0.5W |
| 1 | ax_res(res1_8, 1e+6, tol = 1) | Resistor 1e+6 Ohms 1% 0.125W |
| 1 | smd_led(LED0603, "orange") | SMD LED 0603 orange |
| 1 | smd_led(LED0805, "red") | SMD LED 0805 red |
| 1 | smd_led(LED1206, "blue") | SMD LED 1306 blue |
| 1 | smd_tant(TANT_A, value = "105e") | SMD Tantalum capacitor package A ,1uF, 2.5V |
| 1 | smd_tant(TANT_B, value = "106A") | SMD Tantalum capacitor package B ,10uF, 10V |
| 1 | smd_tant(TANT_C, value = "107C") | SMD Tantalum capacitor package C ,100uF, 16V |
| 1 | smd_capacitor(CAP0402, value = "10nF") | SMD capacitor 0402 10nF |
| 1 | smd_capacitor(CAP0502, value = "10nF") | SMD capacitor 0502 10nF |
| 1 | smd_capacitor(CAP0603, value = "10nF") | SMD capacitor 0603 10nF |
| 1 | smd_capacitor(CAP0805, value = "100nF") | SMD capacitor 0805 100nF |
| 1 | smd_capacitor(CAP1206, value = "1uF") | SMD capacitor 1206 1uF |
| 1 | smd_qfp(QFP50P1200X1200X160_64N, "ATSAM4S4BA") | SMD chip: ATSAM4S4BA, package : QFP50P1200X1200X160_64N |
| 1 | smd_resistor(L2012C, 1u) | SMD choke 0805 1u |
| 1 | smd_coax(U_FL_R_SMT_1) | SMD coax connector type: U_FL_R_SMT_1 |
| 1 | smd_250V_fuse(OMT250, "2A 250V") | SMD fuse: OMT250 2A 250V |
| 1 | smd_resistor(RES0402, 1) | SMD resistor 0402 1 0.0625W |
| 1 | smd_resistor(RES0502, 10) | SMD resistor 0502 10 0.05W |
| 1 | smd_resistor(RES0603, 100) | SMD resistor 0603 100 0.1W |
| 1 | smd_resistor(RES0805, 1K) | SMD resistor 0805 1K 0.125W |
| 1 | smd_resistor(RES1206, 1M) | SMD resistor 1206 1M 0.25W |
| 1 | smd_soic(SOIC14, "74HC00") | SOIC14 package 74HC00 |
| 1 | smd_soic(SOIC16, "ICL323") | SOIC16 package ICL323 |
| 1 | smd_soic(SOIC18, "PIC18F88") | SOIC18 package PIC18F88 |
| 1 | smd_soic(SOIC8, "M34063") | SOIC8 package M34063 |
| 1 | smd_sot(SOT223, "LM117") | SOT223 package LM117 |
| 1 | smd_sot(SOT23, "2N7000") | SOT23 package 2N7000 |
| 1 | square_button(button_4p5mm) | Square button 4.5mm |
| 1 | square_button(button_6mm) | Square button 6mm |
| 1 | smd_pot(TC33X1, "10K") | TC33X1 package 10K |
| 1 | pcb(TMC2130) | TMC2130 |
| 1 | green_terminal(gt_5p08, 2) | Terminal block 2 way 0.2" |
| 2 | green_terminal(gt_6p35, 2) | Terminal block 2 way 0.25" |
| 1 | green_terminal(gt_5x17, 2) | Terminal block 2 way 5mm |
| 2 | green_terminal(gt_2p54, 3) | Terminal block 3 way 0.1" |
| 1 | terminal_35(3) | Terminal block 3 way 3.5mm |
| 1 | green_terminal(gt_5x11, 3) | Terminal block 3 way 5mm |
| 1 | green_terminal(gt_5x17, 3) | Terminal block 3 way 5mm |
| 2 | green_terminal(gt_3p5, 4) | Terminal block 4 way 3.5mm |
| 1 | terminal_35(4) | Terminal block 4 way 3.5mm |
| 1 | pcb(test_pcb) | Test PCB |
| 1 | rd_transistor(E_LINE, "ZTX853") | Transistor E_LINE ZTX853 |
| 1 | rd_disc(ERZV07D471, "471") | Varistor, ERZV07D471 471 |
| 2 | vero_pin() | Vero board pin |
| 1 | wire_link(0.8, 5.08, h = 10.16) | Wire link 0.8mm x 0.2" |
| 1 | wire_link(0.8, 10.16) | Wire link 0.8mm x 0.4" |
| 1 | wire_link(0.8, 10.16, h = 0.75, sleeve = [1.5, "red"]) | Wire link 0.8mm x 0.4" with red sleeving |
| 1 | wire_link(0.8, 0, h = 5) | Wire link 0.8mm x 8mm |
| 1 | rd_boxc(BOXC18x5x11, "X2 rated film capacitor", "0.1uF 250V" ) | X2 rated film capacitor 0.1uF 250V |
| 1 | rd_boxc(BOXC18x10x16, "X2 rated film capacitor", "0.47uF 250V" ) | X2 rated film capacitor 0.47uF 250V |
PCBs and perfboard with optional components. The shape can be a rectangle with optionally rounded corners or a polygon for odd shapes like Arduino.
vitamins/pcbs.scad Object definitions.
vitamins/pcb.scad Implementation.
tests/PCBs.scad Code for this example.
| Function | Description |
|---|---|
ff_back(type) | Flat flex back section size |
ff_latch(type) | Flat flex latch size |
ff_mid(type) | Flat flex middle section size |
ff_slot(type) | Flat flex slot size |
hdmi_depth(type) | Front to back depth |
hdmi_height(type) | Outside height above the PCB |
hdmi_height1(type) | Inside height at the sides |
hdmi_height2(type) | Inside height in the middle |
hdmi_thickness(type) | Wall thickness of the metal |
hdmi_width1(type) | Inside width at the top |
hdmi_width2(type) | Inside width at the bottom |
pcb_accessories(type) | List of accessories to go on the BOM, SD cards, USB cables, etc. |
pcb_colour(type) | Colour of the substrate |
pcb_components(type) | List of components |
pcb_grid(type) | Grid origin if a perfboard |
pcb_hole_d(type) | Mounting hole diameter |
pcb_holes(type) | List of hole positions |
pcb_land_d(type) | Pad around mounting hole |
pcb_length(type) | Length |
pcb_name(type) | Description |
pcb_parts_on_bom(type) | True if the parts should be separate BOM items |
pcb_polygon(type) | Optional outline polygon for odd shaped boards |
pcb_radius(type) | Corner radius |
pcb_thickness(type) | Thickness |
pcb_width(type) | Width |
| Function | Description |
|---|---|
pcb(name, desc, size, corner_r = 0, hole_d = 0, land_d = 0, colour = "green", parts_on_bom = false, holes = [], components = [], accessories = [], grid = undef, polygon = undef, screw = undef) | Constructor |
pcb_component(type, name, index = 0) | Return the component specified by name and index |
pcb_component_position(type, name, index = 0) | Return x y position of specified component |
pcb_coord(type, p) | Convert offsets from the edge to coordinates relative to the centre |
pcb_grid_pos(type, x, y, z = 0, i = 0) | Returns a pcb grid position |
pcb_screw(type, cap = hs_cap) | Mounting screw type |
pcb_size(type) | Length, width and thickness in a vector |
| Module | Description |
|---|---|
barrel_jack(cutout = false) | Draw barrel power jack |
block(size, colour, makes_cutout, cutouts, r = 0, rtop = 0) | Draw a coloured cube to represent a random PCB component |
buzzer(height, diameter, colour) | Draw PCB buzzer with specified height, diameter and colour |
chip(length, width, thickness, colour, cutout = false) | Draw a coloured cube to represent a chip, or other rectangular component, or cylinder if width is zero |
flat_flex(type, cutout = false) | Draw flat flexistrip connector as used on RPI0 |
flex(cutout = false) | Draw flexistrip connector |
hdmi(type, cutout = false) | Draw HDMI socket |
jack(cutout = false) | Draw 3.5mm jack |
molex_254(ways, right_angle = 0, skip = undef) | Draw molex KK header, set right_angle to 1 for normal right angle version or -1 for inverted right angle version. |
molex_254_housing(ways) | Draw a Molex KK housing |
molex_usb_Ax1(cutout) | Draw Molex USB A connector suitable for perf board |
molex_usb_Ax2(cutout) | Draw Molex dual USB A connector suitable for perf board |
pcb(type) | Draw specified PCB |
pcb_assembly(type, height, thickness) | Draw PCB assembly with spaces and fasteners in place |
pcb_base(type, height, thickness, wall = 2) | Generate STL for a base with PCB spacers |
pcb_component(comp, cutouts = false, angle = undef) | Draw pcb component from description |
pcb_component_position(type, name) | Position child at the specified component position |
pcb_components(type, cutouts = false, angle = undef) | Draw list of PCB components on the PCB |
pcb_cutouts(type, angle = undef) | Make cut outs to clear components on a PCB |
pcb_grid(type, x, y, z = 0, i = 0) | Positions children at specified grid position |
pcb_grid_components(type, components, cutouts = false, angle = undef) | Draw list of components on the PCB grid for perf board |
pcb_screw_positions(type) | Positions children at the mounting hole positions |
pcb_spacer(screw, height, wall = 1.8, taper = 0) | Generate STL for PCB spacer |
rj45(cutout = false) | Draw RJ45 Ethernet connector |
standoff(h, d, h2, d2) | Draw a standoff |
terminal_35(ways, colour = "blue") | Draw 3.5mm terminal block |
trimpot10(vertical, cutout = false) | Draw a ten turn trimpot |
uSD(size, cutout = false) | Draw uSD socket |
usb_Ax1(cutout = false) | Draw USB type A single socket |
usb_Ax2(cutout = false) | Draw USB type A dual socket |
usb_B(cutout = false) | Draw USB B connector |
usb_C(cutout = false) | Draw USB C connector |
usb_miniA(cutout = false) | Draw USB mini A connector |
usb_uA(cutout = false) | Draw USB micro A connector |
usb_vAx1(cutout = false) | Draw a vertical USB type A single socket |
vero_pin(cropped = false) | Draw a vero pin |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | pcb(Feather405) | Adafruit Feather 405 |
| 1 | pcb(ArduinoLeonardo) | Arduino Leonardo |
| 1 | pcb(ArduinoNano) | Arduino Nano |
| 1 | pcb(ArduinoUno3) | Arduino Uno R3 |
| 1 | pcb(BTT_RELAY_V1_2) | BigTreeTech Relay Module v1.2 |
| 1 | pcb(BTT_SKR_E3_TURBO) | BigTreeTech SKR E3 Turbo |
| 1 | pcb(BTT_SKR_MINI_E3_V2_0) | BigTreeTech SKR Mini E3 v2.0 |
| 1 | pcb(BTT_SKR_V1_4_TURBO) | BigTreeTech SKR v1.4 Turbo |
| 1 | pcb(BlackPill) | Black Pill |
| 1 | Cat 5 patch cable 300mm | |
| 1 | d_plug(DCONN15, pcb = true) | D-type 15 way PCB mount plug - not shown |
| 1 | pcb(DuetE) | Duet 2 Ethernet electronics |
| 1 | pcb(Duex2) | Duex2 expansion board - not shown |
| 1 | pcb(Duex5) | Duex5 expansion board |
| 1 | pcb(ESP_01) | ESP-01 |
| 1 | pcb(ESP_01M) | ESP-01M WiFi module (ESP8285) |
| 1 | pcb(ESP_12F) | ESP-12F ESP8266 WiFi module |
| 1 | pcb(ESP_201) | ESP-201 ESP8266 WiFi module |
| 1 | pcb(ESP32_DOIT_V1) | ESP32 DOIT DEV KIT V1 |
| 1 | pcb(EnviroPlus) | Enviro+ |
| 1 | pcb(ExtruderPCB) | Extruder connection PCB - not shown |
| 1 | pcb(HW803_1WAY_RELAY) | HW-803 5V 1 way relay module |
| 1 | pcb(I2C_LCD_Backpack) | I2C / SPI character LCD backpack |
| 1 | pcb(KY_040) | KY-040 rotart encoder breakout |
| 1 | pcb(Keyes5p1) | Keyes5.1 Arduino Uno expansion board - not shown |
| 1 | pcb(L9110S) | L9110S 2-Channel motor driver module |
| 1 | pcb(LIPO_fuel_gauge) | LIPO fuel gauge |
| 1 | pcb(MP1584EN) | MP1584EN 3A buck converter |
| 1 | pcb(MT3608) | MT3608 boost converter module |
| 1 | pcb(MELLOW_FLY_D5) | Mellow FLY D5 |
| 1 | pcb(Melzi) | Melzi electronics - not shown |
| 6 | Micro SD card | |
| 1 | Micro SD card - not shown | |
| 1 | pcb(RCWL-0516) | Microwave Radar Sensor |
| 1 | molex_254(2) | Molex KK header 2 way - not shown |
| 1 | molex_254(3) | Molex KK header 3 way - not shown |
| 20 | nut(M2_nut, nyloc = true) | Nut M2 x 1.6mm nyloc |
| 38 | nut(M2p5_nut, nyloc = true) | Nut M2.5 x 2.2mm nyloc |
| 52 | nut(M3_nut, nyloc = true) | Nut M3 x 2.4mm nyloc |
| 8 | nut(M4_nut, nyloc = true) | Nut M4 x 3.2mm nyloc |
| 1 | pcb(OPZ2) | Orange Pi Zero 2 |
| 1 | pcb(PI_IO) | PI_IO V2 - not shown |
| 1 | pcb(PSU12V1A) | PSU 12V 1A - not shown |
| 1 | pcb(PanelDue_v3) | Panel Due v3.0a LCD Display interface |
| 1 | pcb(PERF60x40) | Perfboard 60 x 40mm |
| 1 | pcb(PERF70x30) | Perfboard 70 x 30mm |
| 1 | pcb(PERF70x50) | Perfboard 70 x 50mm |
| 1 | pcb(PERF70x51) | Perfboard 70 x 51mm |
| 1 | pcb(PERF74x51) | Perfboard 74 x 51mm |
| 1 | pcb(PERF80x20) | Perfboard 80 x 20mm |
| 1 | pin_socket(2p54header, 13, 2, right_angle = true) | Pin socket 13 x 2 right_angle - not shown |
| 1 | pcb(RAMPSEndstop) | RAMPS Endstop Switch |
| 1 | pcb(RPI3) | Raspberry Pi 3 |
| 1 | pcb(RPI3A) | Raspberry Pi 3 A+ |
| 1 | pcb(RPI4) | Raspberry Pi 4 |
| 1 | pcb(RPI_Pico) | Raspberry Pi Pico |
| 1 | pcb(RPI0) | Raspberry Pi Zero |
| 8 | screw(M2_cap_screw, 16) | Screw M2 cap x 16mm |
| 8 | screw(M2_cap_screw, 20) | Screw M2 cap x 20mm |
| 4 | screw(M2_cap_screw, 25) | Screw M2 cap x 25mm |
| 2 | screw(M2p5_cap_screw, 20) | Screw M2.5 cap x 20mm |
| 8 | screw(M2p5_cap_screw, 30) | Screw M2.5 cap x 30mm |
| 4 | screw(M2p5_cap_screw, 35) | Screw M2.5 cap x 35mm |
| 8 | screw(M2p5_cap_screw, 40) | Screw M2.5 cap x 40mm |
| 4 | screw(M2p5_dome_screw, 25) | Screw M2.5 dome x 25mm |
| 4 | screw(M2p5_pan_screw, 20) | Screw M2.5 pan x 20mm |
| 4 | screw(M2p5_pan_screw, 30) | Screw M2.5 pan x 30mm |
| 4 | screw(M2p5_pan_screw, 35) | Screw M2.5 pan x 35mm |
| 18 | screw(M3_cap_screw, 16) | Screw M3 cap x 16mm |
| 18 | screw(M3_cap_screw, 20) | Screw M3 cap x 20mm |
| 5 | screw(M3_cap_screw, 25) | Screw M3 cap x 25mm |
| 11 | screw(M3_cap_screw, 35) | Screw M3 cap x 35mm |
| 8 | screw(M4_cap_screw, 25) | Screw M4 cap x 25mm |
| 1 | pcb(XIAO) | Seeeduino XIAO |
| 1 | pcb(9DOF_stick) | Sparkfun 9 degrees of freedom IMU |
| 1 | pcb(TP4056) | TP4056 Li-lon Battery charger module |
| 3 | terminal_35(2) | Terminal block 2 way 3.5mm - not shown |
| 2 | green_terminal(gt_2p54, 4) | Terminal block 4 way 0.1" - not shown |
| 1 | USB A to Mini B lead - not shown | |
| 1 | pcb(tiny_buck) | Ultra Small 3A buck regulator |
| 1 | pcb(WD2002SJ) | WD2002SJ Buck Boost DC-DC converter |
| 20 | washer(M2_washer) | Washer M2 x 5mm x 0.3mm |
| 38 | washer(M2p5_washer) | Washer M2.5 x 5.9mm x 0.5mm |
| 52 | washer(M3_washer) | Washer M3 x 7mm x 0.5mm |
| 8 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
| 1 | pcb(ZC_A0591) | ZC-A0591 ULN2003 driver PCB |
| Qty | Filename |
|---|---|
| 4 | pcb_spacer20100.stl |
| 4 | pcb_spacer20160.stl |
| 4 | pcb_spacer2070.stl |
| 4 | pcb_spacer2080.stl |
| 4 | pcb_spacer2090.stl |
| 2 | pcb_spacer25110.stl |
| 4 | pcb_spacer25150.stl |
| 4 | pcb_spacer25190.stl |
| 4 | pcb_spacer25200.stl |
| 4 | pcb_spacer25210_2.stl |
| 4 | pcb_spacer25220_2.stl |
| 4 | pcb_spacer25260.stl |
| 4 | pcb_spacer25270.stl |
| 4 | pcb_spacer25280.stl |
| 4 | pcb_spacer2580.stl |
| 1 | pcb_spacer30130.stl |
| 4 | pcb_spacer30140.stl |
| 4 | pcb_spacer30230.stl |
| 4 | pcb_spacer30240.stl |
| 3 | pcb_spacer30250.stl |
| 10 | pcb_spacer3050.stl |
| 8 | pcb_spacer3060.stl |
| 9 | pcb_spacer3070.stl |
| 5 | pcb_spacer3080.stl |
| 4 | pcb_spacer3090.stl |
| 4 | pcb_spacer40100.stl |
| 4 | pcb_spacer40110.stl |
Photo interrupter modules popular in robot kits and from China.
vitamins/photo_interrupters.scad Object definitions.
vitamins/photo_interrupter.scad Implementation.
tests/photo_interrupters.scad Code for this example.
| Function | Description |
|---|---|
pi_base_height(type) | Height of the base |
pi_base_length(type) | Length of the base |
pi_base_width(type) | Width of the base |
pi_color(type) | Color of photo interrupter |
pi_gap_height(type) | Height of the gap where the light can be interrupted |
pi_gap_width(type) | Width of the gap |
pi_hole_diameter(type) | Diameter of the mounting holes |
pi_pcb(type) | Parameter for the support PCB, created with pi_pcb |
pi_stem_width(type) | Width of the stems |
| Module | Description |
|---|---|
photo_interrupter(type) | Draw the photo interrupter, with PCB |
pi_cutout(type) | Shape to subtract for fitting a photo interrupter |
pi_hole_locations(type) | Locations of photo interrupter mounting holes |
pi_pcb(type) | Draw the support PCB |
pi_pcb_hole_locations(pcb) | Locations of the PCB holes |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | photo_interrupter(PH1) | PH1 Photo interrupter |
Threaded pillars. Each end can be male or female.
vitamins/pillars.scad Object definitions.
vitamins/pillar.scad Implementation.
tests/pillars.scad Code for this example.
| Function | Description |
|---|---|
pillar_bot_thread(type) | Bottom thread length, + for male, - for female |
pillar_chamfered(type) | True if pillar is chamfered |
pillar_height(type) | Body height |
pillar_i_colour(type) | Colour of the inner part |
pillar_id(type) | Inner diameter of metal part |
pillar_ifn(type) | Inner number of sides, 6 for hex, 0 for smooth cylinder |
pillar_name(type) | Name of part |
pillar_o_colour(type) | Colour of the outer part |
pillar_od(type) | Outer diameter of body |
pillar_ofn(type) | Outer number of sides, 6 for hex, 0 for smooth cylinder |
pillar_thread(type) | Thread diameter |
pillar_top_thread(type) | Top thread length, + for male, - for female |
| Module | Description |
|---|---|
pillar(type) | Draw specified pillar |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | pillar(M3x13_hex_pillar) | Pillar hex M/F M3x13 |
| 1 | pillar(M3x20_hex_pillar) | Pillar hex M/F M3x20 |
| 1 | pillar(M3x6_hex_pillar) | Pillar hex M/F M3x6 |
| 1 | pillar(M3x10_nylon_hex_pillar) | Pillar hex nylon M/F M3x10 |
| 1 | pillar(M3x20_nylon_hex_pillar) | Pillar hex nylon M/F M3x20 |
| 1 | pillar(M2x16_brass_pillar) | Pillar nurled F/M M2x16 |
| 1 | pillar(M3x20_nylon_pillar) | Pillar nylon M/F M3x20 |
| 1 | pillar(M4x17_nylon_pillar) | Pillar nylon M/F M4x20 |
KP pillow block bearings
vitamins/pillow_blocks.scad Object definitions.
vitamins/pillow_block.scad Implementation.
tests/pillow_blocks.scad Code for this example.
| Function | Description |
|---|---|
kp_base_height(type) | Height of base containing the bolts |
kp_diameter(type) | Rod hole diameter |
kp_hole_offset(type) | Rod hole offset |
kp_screw_separation(type) | Separation of bolts in the base |
| Function | Description |
|---|---|
kp_size(type) | Size of bracket |
| Module | Description |
|---|---|
kp_pillow_block(type) | Draw the KP pillow block |
kp_pillow_block_assembly(type, part_thickness = 2, screw_type = M5_cap_screw, nut_type = undef) | Assembly with fasteners in place |
kp_pillow_block_hole_positions(type) | Place children at hole positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | kp_pillow_block(KP000) | KP000 pillow block |
| 1 | kp_pillow_block(KP001) | KP001 pillow block |
| 1 | kp_pillow_block(KP08_15) | KP08_15 pillow block |
| 1 | kp_pillow_block(KP08_18) | KP08_18 pillow block |
| 2 | sliding_t_nut(M4_hammer_nut) | Nut M4 hammer |
| 2 | sliding_t_nut(M4_sliding_t_nut) | Nut M4 sliding T |
| 2 | sliding_t_nut(M5_sliding_t_nut) | Nut M5 sliding T |
| 2 | nut(M5_nut, nyloc = undef) | Nut M5 x 4mm |
| 4 | screw(M4_cap_screw, 10) | Screw M4 cap x 10mm |
| 4 | screw(M5_cap_screw, 12) | Screw M5 cap x 12mm |
| 4 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
| 6 | washer(M5_washer) | Washer M5 x 10mm x 1mm |
Pin headers and sockets, etc.
vitamins/pin_headers.scad Object definitions.
vitamins/pin_header.scad Implementation.
tests/pin_headers.scad Code for this example.
| Function | Description |
|---|---|
hdr_base_colour(type) | Header insulator colour |
hdr_box_size(type) | Box header outside dimensions |
hdr_box_wall(type) | Box header wall thickness |
hdr_pin_below(type) | Header pin length underneath |
hdr_pin_colour(type) | Header pin colour |
hdr_pin_length(type) | Header pin length |
hdr_pin_width(type) | Header pin size |
hdr_pitch(type) | Header pitch |
hdr_ra_box_offset(type) | Offset between back of the box and the pins |
hdr_ra_height(type) | Height of right angle connector |
hdr_socket_depth(type) | Socket depth for female housing |
hdr_y_offset(type) | Y offset of pins from center of the box |
| Module | Description |
|---|---|
box_header(type, cols = 1, rows = 1, smt = false, cutout = false, right_angle = false) | Draw box header |
idc_transition(type, cols = 5, skip = [], cutout = false) | Draw IDC transition header |
jst_xh_header(type, pin_count, right_angle = false, colour = false, pin_colour = false, smt = false) | Draw JST XH, PH or ZH connector |
pin(type, length = undef, colour = undef) | Draw a header pin |
pin_header(type, cols = 1, rows = 1, smt = false, right_angle = false, cutout = false, colour) | Draw pin header |
pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, smt = false, cutout = false, colour) | Draw pin socket |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | box_header(2p54header, 10, 2) | Box header 10 x 2 |
| 1 | box_header(2p54header, 10, 2, right_angle = true) | Box header 10 x 2 right angle |
| 1 | box_header(2p54header, 8, 1) | Box header 8 x 1 |
| 1 | box_header(2p54header, 8, 1, right_angle = true) | Box header 8 x 1 right angle |
| 1 | idc_transition(2p54header, 10) | IDC transition header 10 x 2 |
| 1 | jst_xh_header(jst_ph_header, 2) | JST PH connector 2 way |
| 1 | jst_xh_header(jst_ph_header, 2, right_angle = true) | JST PH connector 2 way right_angle |
| 1 | jst_xh_header(jst_ph_header, 5) | JST PH connector 5 way |
| 1 | jst_xh_header(jst_ph_header, 5, right_angle = true) | JST PH connector 5 way right_angle |
| 1 | jst_xh_header(jst_xh_header, 2) | JST XH connector 2 way |
| 1 | jst_xh_header(jst_xh_header, 2, right_angle = true) | JST XH connector 2 way right_angle |
| 1 | jst_xh_header(jst_xh_header, 5) | JST XH connector 5 way |
| 1 | jst_xh_header(jst_xh_header, 5, right_angle = true) | JST XH connector 5 way right_angle |
| 1 | jst_xh_header(jst_zh_header, 2) | JST ZH connector 2 way |
| 1 | jst_xh_header(jst_zh_header, 2, right_angle = true) | JST ZH connector 2 way right_angle |
| 1 | jst_xh_header(jst_zh_header, 5) | JST ZH connector 5 way |
| 1 | jst_xh_header(jst_zh_header, 5, right_angle = true) | JST ZH connector 5 way right_angle |
| 1 | pin_header(2p54header, 10, 2) | Pin header 10 x 2 |
| 1 | pin_header(2p54header, 3, 1, right_angle = true) | Pin header 3 x 1 right_angle |
| 1 | pin_header(2p54header, 3, 2, right_angle = true) | Pin header 3 x 2 right_angle |
| 1 | pin_header(2p54header, 3, 3, right_angle = true) | Pin header 3 x 3 right_angle |
| 1 | pin_header(2p54header, 8, 1) | Pin header 8 x 1 |
| 1 | pin_socket(2p54header, 10, 2) | Pin socket 10 x 2 |
| 1 | pin_socket(2p54header, 3, 1, right_angle = true) | Pin socket 3 x 1 right_angle |
| 1 | pin_socket(2p54header, 3, 2, right_angle = true) | Pin socket 3 x 2 right_angle |
| 1 | pin_socket(2p54header, 3, 3, right_angle = true) | Pin socket 3 x 3 right_angle |
| 1 | pin_socket(2p54header, 8, 1) | Pin socket 8 x 1 |
Potentiometers and rotary encoders
vitamins/potentiometers.scad Object definitions.
vitamins/potentiometer.scad Implementation.
tests/potentiometers.scad Code for this example.
| Function | Description |
|---|---|
pot_body(type) | Body diameter or width & depth, height and corner radius |
pot_boss_d(type) | Boss diameter |
pot_boss_h(type) | Boss height |
pot_face(type) | Faceplate rib width, plate depth and plate height |
pot_gangs(type) | Number of gangs for mult-gang pot |
pot_neck(type) | Diameter and length of the shaft neck |
pot_nut(type) | Across flat diameter and thickness of the nut |
pot_shaft(type) | Diameter, flat diameter, length and flat/slot length and colour. If flat diameter is less than the radius then it is a slot width |
pot_spigot(type) | Spigot width, length and height above the boss |
pot_spigot_x(type) | Spigot offset from the shaft centre |
pot_thread_d(type) | Nomininal thread diameter |
pot_thread_h(type) | Height of threaded part |
pot_thread_p(type) | Thread pitch |
pot_wafer(type) | Width, diameter and thickness of the track wafer plus true if curved |
pot_washer(type) | Outside diameter and thickness of the washer |
| Function | Description |
|---|---|
pot_size(type) | Get pot body dimensions |
pot_z(type, washer = true) | Ideal distance behind panel surface to get the nut and washer on comfortably |
| Module | Description |
|---|---|
pot_nut(type, washer = true) | Draw the nut for a potentiometer and possibly a washer |
potentiometer(type, thickness = 3, shaft_length = undef, value = false) | Draw a potentiometer with nut spaced by specified thickness |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | potentiometer(BTT_encoder) | BTT_encoder |
| 1 | potentiometer(KY_040_encoder) | KY_040_encoder |
| 1 | potentiometer(imperial_pot) | Potentiometer imperial_pot |
| 1 | potentiometer(imperial_pot_x2) | Potentiometer imperial_pot_x2 |
| 1 | potentiometer(metric_pot) | Potentiometer metric_pot |
Power supplies. Can be a simple cube or can be defined by a list of six faces, each with thickness, holes, cutouts, etc.
Face order is bottom, top, left, right, front, back.
vitamins/psus.scad Object definitions.
vitamins/psu.scad Implementation.
tests/PSUs.scad Code for this example.
| Function | Description |
|---|---|
atx_psu(type) | True if an ATX style PSU |
psu_accessories(type) | Accessories to add to BOM, e.g. mains lead |
psu_face_cutout(type) | Panel cutout to accommodate this face, e.g. for ATX |
psu_face_cutouts(type) | List of polygons to remove |
psu_face_fan(type) | Fan x,y position and type |
psu_face_grill(type) | Is this face a grill |
psu_face_holes(type) | List of screw hole positions |
psu_face_iec(type) | IEC connector x,y, rotation and type |
psu_face_switch(type) | Rocker switch x,y, rotation and type |
psu_face_thickness(type) | The thickness |
psu_face_vents(type) | Vents array position x,y, rotation, size and corner radius |
psu_faces(type) | List of face descriptions |
psu_height(type) | Height |
psu_left_bay(type) | Bay for terminals |
psu_length(type) | Length |
psu_name(type) | The part name |
psu_pcb(type) | The PCB |
psu_right_bay(type) | Bay for heatsink |
psu_screw(type) | Screw type |
psu_screw_hole_radius(type) | Clearance hole for screw, bigger than normal on ATX |
psu_terminals(type) | How many terminals and the y offset from the back |
psu_width(type) | Width |
| Function | Description |
|---|---|
psu_face_transform(type, face) | Returns a transformation matrix to get to the specified face |
psu_size(type) | Size |
| Module | Description |
|---|---|
atx_psu_cutout(type, face = f_front) | Cut out for the rear of an ATX, which is actually f_front! |
psu(type) | Draw a power supply |
psu_screw_positions(type, face = undef) | Position children at the screw positions on the preferred mounting face, which can be overridden. |

| Qty | Module call | BOM entry |
|---|---|---|
| 2 | IEC mains lead | |
| 1 | psu(ATX500) | PSU ATX500 |
| 1 | psu(ATX300) | PSU FSP300-60GHX |
| 1 | psu(KY240W) | PSU KY-240W-12-L - not shown |
| 1 | psu(NG_CB_200W_24V) | PSU NIUGUY CB-200W-24V |
| 1 | psu(NG_CB_500W_24V) | PSU NIUGUY CB-500W-24V |
| 1 | psu(PD_150_12) | PSU PD-150-12 |
| 1 | psu(S_250_48) | PSU S-250-48 |
| 1 | psu(S_300_12) | PSU S-300-12 |
| 9 | screw(No632_pan_screw, 8) | Screw 6-32 pan x 8mm |
| 8 | screw(M3_pan_screw, 8) | Screw M3 pan x 8mm |
| 4 | screw(M4_cap_screw, 8) | Screw M4 cap x 8mm |
| 8 | washer(M3_washer) | Washer M3 x 7mm x 0.5mm |
| 13 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
Timing belt pulleys, both toothed and plain with internal bearings for idlers.
vitamins/pulleys.scad Object definitions.
vitamins/pulley.scad Implementation.
tests/pulleys.scad Code for this example.
| Function | Description |
|---|---|
pulley_belt(type) | Belt type |
pulley_bore(type) | Bore diameter for shaft |
pulley_flange_dia(type) | Flange diameter |
pulley_flange_thickness(type) | Flange thickness |
pulley_hub_dia(type) | Hub diameter |
pulley_hub_length(type) | Hub length |
pulley_od(type) | Outer diameter |
pulley_screw(type) | Grub screw type |
pulley_screw_length(type) | Grub screw length |
pulley_screw_z(type) | Grub screw position |
pulley_screws(type) | Number of grub screws |
pulley_teeth(type) | Number of teeth |
pulley_type(type) | Part description |
pulley_width(type) | Width of teeth / belt channel |
| Function | Description |
|---|---|
pulley_extent(type) | Largest diameter |
pulley_height(type) | Total height of pulley |
pulley_ir(type) | Inside radius of the teeth |
pulley_offset(type) | Offset of the belt path centre |
pulley_pr(type, belt = undef) | Pitch radius, belt only needed for non-standard belt over smooth pulleys |
| Module | Description |
|---|---|
pulley(type, colour = silver) | Draw a pulley, any children are placed above. |
pulley_assembly(type, colour = silver) | Draw a pulley with its grub screws in place |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | pulley(GT2x16_pulley_9) | Pulley GT2 16 teeth |
| 1 | pulley(GT2x16_pulley) | Pulley GT2 16 teeth |
| 1 | pulley(GT2x20_pulley_9) | Pulley GT2 20 teeth |
| 1 | pulley(GT2x80_pulley) | Pulley GT2 80 teeth |
| 1 | pulley(GT2x16_toothed_idler) | Pulley GT2 idler 16 teeth |
| 1 | pulley(GT2x16_toothed_idler_9) | Pulley GT2 idler 16 teeth |
| 1 | pulley(GT2x20_toothed_idler) | Pulley GT2 idler 20 teeth |
| 1 | pulley(GT2x20_toothed_idler_9) | Pulley GT2 idler 20 teeth |
| 1 | pulley(GT2x20_plain_idler) | Pulley GT2 idler smooth 12mm |
| 1 | pulley(GT2x16_plain_idler) | Pulley GT2 idler smooth 9.63mm |
| 1 | pulley(GT2x16x7_plain_idler) | Pulley GT2 idler smooth 9.63mm |
| 1 | pulley(GT2x20ob_pulley) | Pulley GT2OB 20 teeth |
| 1 | pulley(GT2x12_pulley) | Pulley GT2RD 12 teeth |
| 1 | pulley(GT2x20um_pulley) | Pulley GT2UM 20 teeth |
| 1 | pulley(T2p5x16_pulley) | Pulley T2.5 16 teeth |
| 1 | pulley(T5x10_pulley) | Pulley T5 10 teeth |
| 1 | screw(M3_grub_screw, 3) | Screw M3 grub x 3mm |
| 2 | screw(M3_grub_screw, 4.5) | Screw M3 grub x 4.5mm |
| 2 | screw(M3_grub_screw, 4) | Screw M3 grub x 4mm |
| 6 | screw(M3_grub_screw, 6) | Screw M3 grub x 6mm |
| 3 | screw(M4_grub_screw, 6) | Screw M4 grub x 6mm |
| 2 | screw(M5_grub_screw, 6) | Screw M5 grub x 6mm |
Radial components for PCBs.
vitamins/radials.scad Object definitions.
vitamins/radial.scad Implementation.
tests/radials.scad Code for this example.
| Function | Description |
|---|---|
rd_boxc_colours(type) | Case colour and resin fill colour |
rd_boxc_leads(type) | Lead pitch, diameter and length |
rd_boxc_size(type) | Overall size and corner radius |
rd_boxc_skirt(type) | Skirt slot, thickness, height |
rd_boxc_z(type) | Height of inner base above PCB. |
rd_cm_choke_core(type) | Core OD, ID, width, corner radius |
rd_cm_choke_csep(type) | Central separator thickness in slot, total thickness, height |
rd_cm_choke_seam(type) | Overlapping semicircular seams to join the two halves of the core width and thickness |
rd_cm_choke_slot(type) | Slot to hold central separator width, height, thickness |
rd_cm_choke_wire(type) | Wire positions, length and diameter |
rd_coil_colour(type) | Core colour |
rd_coil_size(type) | OD, ID, height, coil height |
rd_coil_turns(type) | Number of turns |
rd_coil_wire(type) | Wire pitch, diameter and length |
rd_disc_colours(type) | Colours of body and text |
rd_disc_kind(type) | Capacitor, etc |
rd_disc_lead_d(type) | Lead diameter and sleeve diameter |
rd_disc_pitch(type) | Lead pitch X & Y |
rd_disc_size(type) | Diameter, thickness and height |
rd_electrolytic_colours(type) | Colour of jacket and stripe |
rd_electrolytic_crimp(type) | Width and height of crimp |
rd_electrolytic_lead_d(type) | Lead diameter |
rd_electrolytic_pitch(type) | Lead pitch |
rd_electrolytic_radius(type) | Corner radius |
rd_electrolytic_size(type) | Diameter, crimp diameter, height |
rd_module_colour(type) | Colour |
rd_module_kind(type) | Relay, PSU, etc. |
rd_module_pin_posns(type) | list of pin positions |
rd_module_pin_size(type) | Pin size |
rd_module_radius(type) | Corner radius |
rd_module_size(type) | Size |
rd_transistor_colours(type) | Body colour and text colour |
rd_transistor_lead(type) | Lead diameter or width and depth |
rd_transistor_lead_posns(type) | List of lead xy coordinates |
rd_transistor_size(type) | Width / diameter, depth / flat and height |
rd_xtal_flange(type) | Crystal flange width and thickness |
rd_xtal_lead_d(type) | Crystal lead diameter |
rd_xtal_pitch(type) | Crystal lead pitch |
rd_xtal_size(type) | Crystal length, width and height and optional corner radius |
| Module | Description |
|---|---|
rd_box_cap(type, kind, value) | Draw radial boxed film capacitor |
rd_cm_choke(type, value) | Draw specified common mode choke. |
rd_coil(type, value, pitch = undef) | Draw the specified vertical coil |
rd_disc(type, value, pitch = undef, z = 0, tail = 3) | Draw a radial disc component |
rd_electrolytic(type, value, pitch = undef, z = 0, tail = 3) | Draw a radial electrolytic capcacitor |
rd_module(type, value) | Draw a PCB mounted potted module, e.g. PSU or relay |
rd_transistor(type, value, kind = "Transistor", lead_positions = undef, z = 5, tail = 3) | Draw a radial lead transistor |
rd_xtal(type, value, z = 0, pitch = undef, tail = 3) | Draw a crystal |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | rd_disc(10mm_disc, "1nF Y2") | Ceramic capacitor, 10mm_disc 1nF Y2 |
| 1 | rd_disc(6p4mm_disc, "10nF") | Ceramic capacitor, 6p4mm_disc 10nF |
| 1 | rd_cm_choke(ATX_CM_CHOKE ,"3.5mH") | Common mode choke 3.5mH |
| 1 | rd_xtal(ACT1100, "ACT1100") | Crystal ACT1100 ACT1100 |
| 1 | rd_xtal(ACT1700, "ACT1700") | Crystal ACT1700 ACT1700 |
| 1 | rd_xtal(C_002RX, "C_002RX") | Crystal C_002RX C_002RX |
| 1 | rd_xtal(HC49, "HC49") | Crystal HC49 HC49 |
| 1 | rd_xtal(HC49_4H, "HC49_4H") | Crystal HC49_4H HC49_4H |
| 1 | rd_electrolytic(ECAP8x12, "220uF35V") | Electolytic capacitor ECAP8x12 220uF35V |
| 1 | rd_module(LDE10_20B, "12V 900ma") | PSU LDE10_20B / 12V 900ma |
| 1 | rd_module(VCE03, "12V 250ma") | PSU VCE03 / 12V 250ma |
| 2 | pcb(PERF70x50) | Perfboard 70 x 50mm |
| 1 | rd_coil(IND16x10 ,"4.7uH") | Radial inductor 16x10 4.7uH |
| 1 | rd_module(HF33F, "012-HSL3F") | Relay HF33F / 012-HSL3F |
| 1 | rd_transistor(E_LINE, "ZTX853") | Transistor E_LINE ZTX853 |
| 1 | rd_transistor(TO92, "BC337") | Transistor TO92 BC337 |
| 1 | rd_disc(ERZV07D471, "470V") | Varistor, ERZV07D471 470V |
| 1 | rd_boxc(BOXC18x5x11, "X2 rated film capacitor", "0.1uF 250V" ) | X2 rated film capacitor 0.1uF 250V |
| 1 | rd_boxc(BOXC18x10x16, "X2 rated film capacitor", "0.47uF 250V" ) | X2 rated film capacitor 0.47uF 250V |
Linear rails with carriages.
vitamins/rails.scad Object definitions.
vitamins/rail.scad Implementation.
tests/rails.scad Code for this example.
| Function | Description |
|---|---|
carriage_block_length(type) | Length of the metal part |
carriage_clearance(type) | Gap under the carriage |
carriage_height(type) | Height of carriage |
carriage_length(type) | Overall length |
carriage_pitch_x(type) | Screw hole x pitch |
carriage_pitch_y(type) | Screw hole y pitch |
carriage_rail(type) | Rail type |
carriage_screw(type) | Carriage screw type |
carriage_width(type) | Width of carriage |
rail_bore(type) | Counter bore diameter for screw head |
rail_bore_depth(type) | Counter bore depth |
rail_end(type) | Minimum distance screw can be from the end |
rail_end_screw(type) | Screw used for ends only (Countersink used for better location) |
rail_groove_offset(type) | Offset of centre of groove from top of rail |
rail_groove_width(type) | Groove width |
rail_height(type) | Height of rail section |
rail_hole(type) | Screw hole diameter |
rail_pitch(type) | Distance between screws |
rail_screw(type) | Screw type |
rail_width(type) | Width of rail section |
| Function | Description |
|---|---|
carriage_screw_depth(type) | Carriage thread depth |
carriage_size(type) | Size of carriage |
carriage_travel(type, rail_length) | How far the carriage can travel on a given length rail |
rail_holes(type, length) | Number of holes in a rail given its length |
rail_screw_height(type, screw) | Position screw taking into account countersink into counterbored hole |
| Module | Description |
|---|---|
carriage(type, end_colour = grey(20), wiper_colour = grey(20)) | Draw the specified carriage |
carriage_hole_positions(type) | Position children over screw holes |
rail(type, length, colour = grey(90), use_polycircles = false) | Draw the specified rail |
rail_assembly(carriage, length, pos, carriage_end_colour = grey(20), carriage_wiper_colour = grey(20)) | Rail and carriage assembly |
rail_hole_positions(type, length, first = 0, screws = 100, both_ends = true) | Position children over screw holes |
rail_screws(type, length, thickness, screws = 100, index_screws = undef) | Place screws in the rail |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | rail(HGH15CA, 200) | Linear rail HGH15CA x 200mm |
| 1 | rail(HGH20CA, 200) | Linear rail HGH20CA x 200mm |
| 1 | rail(MGN12, 200) | Linear rail MGN12 x 200mm |
| 1 | rail(MGN15, 200) | Linear rail MGN15 x 200mm |
| 1 | rail(MGN5, 200) | Linear rail MGN5 x 200mm |
| 1 | rail(MGN7, 200) | Linear rail MGN7 x 200mm |
| 1 | rail(MGN9, 200) | Linear rail MGN9 x 200mm |
| 1 | rail(SSR15, 200) | Linear rail SSR15 x 200mm |
| 1 | carriage(HGH15CA_carriage) | Linear rail carriage HGH15CA |
| 1 | carriage(HGH20CA_carriage) | Linear rail carriage HGH20CA |
| 1 | carriage(MGN12C_carriage) | Linear rail carriage MGN12C |
| 1 | carriage(MGN12H_carriage) | Linear rail carriage MGN12H |
| 1 | carriage(MGN15C_carriage) | Linear rail carriage MGN15C |
| 1 | carriage(MGN5C_carriage) | Linear rail carriage MGN5C |
| 1 | carriage(MGN7C_carriage) | Linear rail carriage MGN7C |
| 1 | carriage(MGN7H_carriage) | Linear rail carriage MGN7H |
| 1 | carriage(MGN9C_carriage) | Linear rail carriage MGN9C |
| 1 | carriage(MGN9H_carriage) | Linear rail carriage MGN9H |
| 1 | carriage(SSR15_carriage) | Linear rail carriage SSR15 |
| 26 | nut(M2_nut, nyloc = true) | Nut M2 x 1.6mm nyloc |
| 23 | nut(M3_nut, nyloc = true) | Nut M3 x 2.4mm nyloc |
| 7 | nut(M4_nut, nyloc = true) | Nut M4 x 3.2mm nyloc |
| 3 | nut(M5_nut, nyloc = true) | Nut M5 x 4mm nyloc |
| 11 | screw(M2_cap_screw, 10) | Screw M2 cap x 10mm |
| 15 | screw(M2_cs_cap_screw, 10) | Screw M2 cs cap x 10mm |
| 8 | screw(M3_cap_screw, 10) | Screw M3 cap x 10mm |
| 6 | screw(M3_cap_screw, 12) | Screw M3 cap x 12mm |
| 3 | screw(M3_cap_screw, 16) | Screw M3 cap x 16mm |
| 2 | screw(M3_cs_cap_screw, 12) | Screw M3 cs cap x 12mm |
| 4 | screw(M3_cs_cap_screw, 16) | Screw M3 cs cap x 16mm |
| 2 | screw(M4_cap_screw, 16) | Screw M4 cap x 16mm |
| 2 | screw(M4_cap_screw, 20) | Screw M4 cap x 20mm |
| 2 | screw(M4_cs_cap_screw, 20) | Screw M4 cs cap x 20mm |
| 2 | screw(M4_cs_cap_screw, 25) | Screw M4 cs cap x 25mm |
| 2 | screw(M5_cap_screw, 20) | Screw M5 cap x 20mm |
| 2 | screw(M5_cs_cap_screw, 25) | Screw M5 cs cap x 25mm |
| 26 | washer(M2_washer) | Washer M2 x 5mm x 0.3mm |
| 23 | washer(M3_washer) | Washer M3 x 7mm x 0.5mm |
| 7 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
| 3 | washer(M5_washer) | Washer M5 x 10mm x 1mm |
Ring terminals and earth assemblies for DiBond panels.
vitamins/ring_terminals.scad Object definitions.
vitamins/ring_terminal.scad Implementation.
tests/ring_terminals.scad Code for this example.
| Function | Description |
|---|---|
ringterm_crimp_length(type) | If non-zero the length of the crimp tube |
ringterm_hole(type) | Wire hole diameter |
ringterm_id(type) | Inside diameter |
ringterm_length(type) | Length of the tail including the ring |
ringterm_od(type) | Outside diameter |
ringterm_screw(type) | Screw type |
ringterm_thickness(type) | Metal thickness |
ringterm_width(type) | Width of the tail |
| Function | Description |
|---|---|
ringterm_extent(type) | Space to leave |
| Module | Description |
|---|---|
ring_terminal(type) | Draw specified ring terminal |
ring_terminal_assembly(type, thickness, top = false) | Earthing assembly for DiBond twin skins |
ring_terminal_hole(type, h = 0) | Drill hole for the screw |

| Qty | Module call | BOM entry |
|---|---|---|
| 3 | nut(M3_nut, nyloc = true) | Nut M3 x 2.4mm nyloc |
| 1 | ring_terminal(M3_ringterm) | Ring terminal 3mm |
| 1 | ring_terminal(M3_ringterm_cs) | Ring terminal 3mm |
| 1 | ring_terminal(M3_ringterm_crimp) | Ring terminal crimp 3mm |
| 1 | screw(M3_cap_screw, 10) | Screw M3 cap x 10mm |
| 2 | screw(M3_dome_screw, 10) | Screw M3 dome x 10mm |
| 6 | star_washer(M3_washer) | Washer star M3 x 0.5mm |
Rocker switch. Also used for neon indicator in the same form factor.
vitamins/rockers.scad Object definitions.
vitamins/rocker.scad Implementation.
tests/rockers.scad Code for this example.
| Function | Description |
|---|---|
rocker_bezel(type) | Bezel width |
rocker_button(type) | How far the button extends from the bezel |
rocker_depth(type) | Body depth |
rocker_flange_h(type) | Flange height |
rocker_flange_t(type) | Flange thickness |
rocker_flange_w(type) | Flange width |
rocker_height(type) | Body height |
rocker_part(type) | Part description |
rocker_pivot(type) | Pivot distance from the back of the flange |
rocker_slot_h(type) | Panel slot height |
rocker_slot_w(type) | Panel slot width |
rocker_spades(type) | Spade types and positions |
rocker_width(type) | Body width |
| Function | Description |
|---|---|
rocker_size(type) | Width, height, and depth in a vector |
rocker_slot(type) | Rocker slot in a vector |
| Module | Description |
|---|---|
rocker(type, colour) | Draw the specified rocker switch |
rocker_hole(type, h = 0, rounded = true) | Make a hole to accept a rocker switch, by default 2D, set h for 3D |

| Qty | Module call | BOM entry |
|---|---|---|
| 2 | rocker(neon_indicator) | Neon Indicator H8630FBNAL |
| 2 | rocker(micro_rocker) | Rocker Switch 10x15 |
| 2 | rocker(small_rocker) | Rocker Switch PRASA1-16F-BB0BW |
Steel rods and studding with chamfered ends.
These items are symmetrical, so by default the origin is in the centre but it can be changed to the bottom.
vitamins/rod.scad Implementation.
tests/rod.scad Code for this example.
| Module | Description |
|---|---|
leadscrew(d , l, lead, starts, center = true) | Draw a leadscrew with specified diameter, length, lead and number of starts |
rod(d , l, center = true) | Draw a smooth rod with specified diameter and length |
studding(d , l, center = true) | Draw a threaded rod with specified diameter and length |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | leadscrew(10, 80, 8, 4) | Leadscrew 10 x 80mm, 8mm lead, 4 starts |
| 1 | leadscrew(12, 80, 12, 4) | Leadscrew 12 x 80mm, 12mm lead, 4 starts |
| 1 | leadscrew(16, 80, 16, 4) | Leadscrew 16 x 80mm, 16mm lead, 4 starts |
| 1 | leadscrew(6, 80, 2, 1) | Leadscrew 6 x 80mm, 2mm lead, 1 starts |
| 1 | leadscrew(8, 80, 8, 4) | Leadscrew 8 x 80mm, 8mm lead, 4 starts |
| 1 | rod(10, 80) | Smooth rod 10mm x 80mm |
| 1 | rod(12, 80) | Smooth rod 12mm x 80mm |
| 1 | rod(16, 80) | Smooth rod 16mm x 80mm |
| 1 | rod(3, 80) | Smooth rod 3mm x 80mm |
| 1 | rod(4, 80) | Smooth rod 4mm x 80mm |
| 1 | rod(5, 80) | Smooth rod 5mm x 80mm |
| 1 | rod(6, 80) | Smooth rod 6mm x 80mm |
| 1 | rod(8, 80) | Smooth rod 8mm x 80mm |
| 1 | studding(10, 80) | Threaded rod M10 x 80mm |
| 1 | studding(12, 80) | Threaded rod M12 x 80mm |
| 1 | studding(16, 80) | Threaded rod M16 x 80mm |
| 1 | studding(3, 80) | Threaded rod M3 x 80mm |
| 1 | studding(4, 80) | Threaded rod M4 x 80mm |
| 1 | studding(5, 80) | Threaded rod M5 x 80mm |
| 1 | studding(6, 80) | Threaded rod M6 x 80mm |
| 1 | studding(8, 80) | Threaded rod M8 x 80mm |
A rod end, sometimes called a spherical bearing or rod-end eye, is a component used in mechanical systems to create a flexible connection between two parts.
vitamins/rod_ends.scad Object definitions.
vitamins/rod_end.scad Implementation.
tests/rod_ends.scad Code for this example.
| Function | Description |
|---|---|
rod_end_bearing_bore(type) | radius of the bore hole in the bearing |
rod_end_bearing_od(type) | Outer diameter of the bearing |
rod_end_bearing_rim(type) | Outer rim thickness guesstimate |
rod_end_bearing_shield_colour(type) | Shield colour, "silver" for metal |
rod_end_bearing_width(type) | Width |
rod_end_bore_width(type) | Width |
rod_end_overall_length(type) | overall length of the rod end |
rod_end_screw_length(type) | length of the screw from eye center, not the bore |
rod_end_screw_radius(type) | radius of the screw end, not the bore |
rod_end_sphere_radius(type) | radius of the rod end sphere |
rod_end_sphere_seg_width(type) | the width of the pivoting part, effectively a (sphere - sphereCaps - center bore) |
rod_end_thread_length(type) | length of the threads |
| Module | Description |
|---|---|
rod_end_bearing(type) | Draw a rod end bearing |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | Rod End Bearing(RE_m5_bearing, 33) | Rod End Bearing 5 x 33mm |
SBR rails
The rails are drawn from the center of the rod.
sbr_rail_center_height(type) can be used to determine where the bottom of the rail is.
vitamins/sbr_rails.scad Object definitions.
vitamins/sbr_rail.scad Implementation.
tests/SBR_rails.scad Code for this example.
| Function | Description |
|---|---|
sbr_rail_base_width(type) | Width of the rail base |
sbr_rail_carriage(type) | Carriage to use with this rail |
sbr_rail_center_height(type) | Height of the center above the bottom of the rail |
sbr_rail_diameter(type) | Diameter of the rod |
sbr_rail_screw(type) | Screw to fasten this rail |
| Module | Description |
|---|---|
sbr_rail(type , l) | Draw an SBR rail |
sbr_screw_locations(type, l) | Linear locations of screws |
sbr_screw_positions(type, l) | Screw positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | sbr_rail(16, 200) | SBR16 rail, length 200mm |
| 1 | sbr_bearing_block(SBR16UU) | SBR16UU bearing block |
| 4 | screw(M5_cap_screw, 12) | Screw M5 cap x 12mm |
| 4 | screw(M5_cap_screw, 18) | Screw M5 cap x 18mm |
Machine screws and wood screws with various head styles.
For an explanation of screw_polysink() see https://hydraraptor.blogspot.com/2020/12/sinkholes.html.
vitamins/screws.scad Object definitions.
vitamins/screw.scad Implementation.
tests/screws.scad Code for this example.
| Function | Description |
|---|---|
screw_clearance_radius(type) | Clearance hole radius |
screw_head_height(type) | Head height |
screw_head_radius(type) | Head radius |
screw_head_type(type) | Head style hs_cap, hs_pan, hs_cs, hs_hex, hs_grub, hs_cs_cap, hs_dome |
screw_max_thread(type) | Maximum thread length |
screw_nut(type) | Default nut |
screw_pilot_hole(type) | Pilot hole radius for wood screws, tap radius for machine screws |
screw_radius(type) | Nominal radius |
screw_socket_af(type) | Socket across flats |
screw_socket_depth(type) | Socket or slot depth |
screw_thread_diameter(type) | Thread diameter, if different from nominal diameter |
screw_washer(type) | Default washer |
| Function | Description |
|---|---|
screw_angle(type, length, nut_distance) | How much to rotate the screw to align it with a nut at the specified distance from the head |
screw_boss_diameter(type) | Boss big enough for nut trap and washer |
screw_head_depth(type, d = 0) | How far a counter sink head will go into a straight hole diameter d |
screw_insert(screw, short = false, i = 0) | Find insert to fit specified screw, defaults to longest but can specify the shortest |
screw_length(screw, thickness, washers, insert = false, nyloc = false, nut = false, longer = false) | Returns the length of the longest or shortest screw that will got through thickness and washers and possibly an insert, nut or nyloc |
screw_longer_than(x) | Returns the length of the shortest screw length longer or equal to x |
screw_nut_radius(type) | Radius of matching nut |
screw_polysink_r(type, z) | Countersink hole profile corrected for rounded staircase extrusions. |
screw_shorter_than(x) | Returns the length of the longest screw shorter than or equal to x |
screw_thread_radius(type) | Thread radius |
| Module | Description |
|---|---|
screw(type, length, hob_point = 0, nylon = false) | Draw specified screw, optionally hobbed or nylon |
screw_and_washer(type, length, star = false, penny = false) | Screw with a washer which can be standard or penny and an optional star washer on top |
screw_countersink(type, drilled = true) | Countersink shape |
screw_keyhole(type, h = 0) | Make keyhole slot to accept and retain screw head |
screw_polysink(type, h = 100, alt = false, sink = 0) | A countersink hole made from stacked polyholes for printed parts, default is flush, sink can be used to recess the head |
screw_tearsink(type) | Countersink shape for horizontal holes |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | screw(No632_pan_screw, 30) | Screw 6-32 pan x 30mm |
| 1 | screw(M2_cap_screw, 10) | Screw M2 cap x 10mm |
| 1 | screw(M2_cs_cap_screw, 10) | Screw M2 cs cap x 10mm |
| 1 | screw(M2_dome_screw, 10) | Screw M2 dome x 10mm |
| 1 | screw(M2p5_cap_screw, 10) | Screw M2.5 cap x 10mm |
| 1 | screw(M2p5_dome_screw, 10) | Screw M2.5 dome x 10mm |
| 1 | screw(M2p5_pan_screw, 10) | Screw M2.5 pan x 10mm |
| 1 | screw(M3_cap_screw, 10) | Screw M3 cap x 10mm |
| 1 | screw(M3_cs_cap_screw, 10) | Screw M3 cs cap x 10mm |
| 1 | screw(M3_dome_screw, 10) | Screw M3 dome x 10mm |
| 1 | screw(M3_grub_screw, 6) | Screw M3 grub x 6mm |
| 1 | screw(M3_hex_screw, 10) | Screw M3 hex x 10mm |
| 1 | screw(M3_low_cap_screw, 10) | Screw M3 low cap x 10mm |
| 1 | screw(M3_pan_screw, 10) | Screw M3 pan x 10mm |
| 1 | screw(M3_shoulder_screw, 12) | Screw M3 shoulder x 12mm |
| 1 | screw(M4_cap_screw, 25) | Screw M4 cap x 25mm |
| 1 | screw(M4_cs_cap_screw, 25) | Screw M4 cs cap x 25mm |
| 1 | screw(M4_dome_screw, 25) | Screw M4 dome x 25mm |
| 1 | screw(M4_grub_screw, 8) | Screw M4 grub x 8mm |
| 1 | screw(M4_hex_screw, 30) | Screw M4 hex x 30mm |
| 1 | screw(M4_pan_screw, 30) | Screw M4 pan x 30mm |
| 1 | screw(M4_shoulder_screw, 16) | Screw M4 shoulder x 16mm |
| 1 | screw(M5_cap_screw, 30) | Screw M5 cap x 30mm |
| 1 | screw(M5_cs_cap_screw, 30) | Screw M5 cs cap x 30mm |
| 1 | screw(M5_dome_screw, 30) | Screw M5 dome x 30mm |
| 1 | screw(M5_grub_screw, 10) | Screw M5 grub x 10mm |
| 1 | screw(M5_hex_screw, 30) | Screw M5 hex x 30mm |
| 1 | screw(M5_pan_screw, 30) | Screw M5 pan x 30mm |
| 1 | screw(M6_cap_screw, 30) | Screw M6 cap x 30mm |
| 1 | screw(M6_cs_cap_screw, 30) | Screw M6 cs cap x 30mm |
| 1 | screw(M6_dome_screw, 30) | Screw M6 dome x 30mm |
| 1 | screw(M6_grub_screw, 12) | Screw M6 grub x 12mm |
| 1 | screw(M6_hex_screw, 30) | Screw M6 hex x 30mm |
| 1 | screw(M6_pan_screw, 30) | Screw M6 pan x 30mm |
| 1 | screw(M8_cap_screw, 35) | Screw M8 cap x 35mm |
| 1 | screw(M8_cs_cap_screw, 35) | Screw M8 cs cap x 35mm |
| 1 | screw(M8_dome_screw, 35) | Screw M8 dome x 35mm |
| 1 | screw(M8_hex_screw, 30) | Screw M8 hex x 30mm |
| 1 | screw(No2_screw, 10) | Screw No2 pan wood x 10mm |
| 1 | screw(No4_screw, 10) | Screw No4 pan wood x 10mm |
| 1 | screw(No6_cs_screw, 30) | Screw No6 cs wood x 30mm |
| 1 | screw(No6_screw, 30) | Screw No6 pan wood x 30mm |
| 1 | screw(No8_cs_screw, 30) | Screw No8 cs wood x 30mm |
| 1 | screw(No8_screw, 30) | Screw No8 pan wood x 30mm |
| Qty | Filename |
|---|---|
| 1 | polysink.stl |
Sealing strip from B&Q used to seal around the door of 3D printers.
vitamins/sealing_strip.scad Implementation.
tests/sealing_strip.scad Code for this example.
| Module | Description |
|---|---|
sealing_strip(length) | Draw specified length of sealing strip |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | sealing_strip(100) | Sealing strip 10mm x 4mm x 100mm |
BLDC servos for CNC machines
vitamins/servo_motors.scad Object definitions.
vitamins/servo_motor.scad Implementation.
tests/servo_motors.scad Code for this example.
| Function | Description |
|---|---|
faceplate_boss_size(type) | Centre boss outer d, inner d and height |
faceplate_hole_dia(type) | Screw hole size |
faceplate_hole_pitch(type) | Screw hole pitch |
faceplate_thickness(type) | Thickness of the faceplate |
faceplate_width(type) | Width of faceplate |
servo_motor_cap(type) | Diameter height and corner radius of encoder cover |
servo_motor_faceplate(type) | Face plate type |
servo_motor_length(type) | Total length from the faceplate |
servo_motor_shaft(type) | Shaft type |
shaft_diameter(type) | Shaft diameter |
shaft_key_size(type) | None |
shaft_length(type) | Shaft length |
shaft_type(type) | String to indicate the shaft type |
| Function | Description |
|---|---|
servo_motor_width(type) | Width of the motor body |
| Module | Description |
|---|---|
faceplate_screw_positions(type) | Position children at faceplate screw positions |
motor_faceplate(type) | Draw specified motor faceplate |
motor_shaft(type) | Draw the specified motor shaft |
servo_motor(type) | Draw the specified servo |
servo_screw_positions(type) | Position children at screw positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | servo_motor(Lichuan_M01330_80ST) | Servo Lichuan LCMT07L02NB-80M01330B 80ST mount 80 x 123mm |
| 1 | servo_motor(Lichuan_M02430_80ST) | Servo Lichuan LCMT07L02NB-80M02430B 80ST mount 80 x 150mm |
| 1 | servo_motor(Lichuan_M03530_80ST) | Servo Lichuan LCMT07L02NB-80M03530B 80ST mount 80 x 178mm |
| 1 | servo_motor(Lichuan_M04030_80ST) | Servo Lichuan LCMT07L02NB-80M04030B 80ST mount 80 x 190mm |
Shaft couplings
vitamins/shaft_couplings.scad Object definitions.
vitamins/shaft_coupling.scad Implementation.
tests/shaft_couplings.scad Code for this example.
| Function | Description |
|---|---|
sc_diameter(type) | Coupling outer diameter |
sc_diameter1(type) | Diameter of smaller shaft |
sc_diameter2(type) | Diameter of larger shaft |
sc_flexible(type) | Flexible coupling |
sc_length(type) | Coupling length |
| Module | Description |
|---|---|
shaft_coupling(type, colour = "silver") | Draw the shaft coupling |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | shaft_coupling(SC_5x8_rigid) | Shaft coupling SC_5x8_rigid |
| 1 | shaft_coupling(SC_6x8_flex) | Shaft coupling SC_6x8_flex |
Sheet materials. Rectangular with optional rounded corners. Negative radii make a chamfer.
The "Soft" parameter can be used to determine if the sheet material needs machine screws or wood screws, e.g.:
The "Colour" parameter is a quad-array: [R, G, B, Alpha], or can be a named colour, see OpenSCAD_User_Manual.
For speed sheets should be modelled in 2D by subtracting holes from 2D templates made by sheet_2D() and then extruded to 3D with render_2D_sheet().
Note that modules that drill holes will return a 2D object if h is set to 0 to facilitate this.
If 3D features are needed, for example countersinks, then sheets can be modelled in 3D using sheet() and then coloured with render_sheet().
When woven sheets (e.g. carbon fibre) are rendered it is necessary to specify the dimensions again to render_sheet() or render_2D_sheet().
vitamins/sheets.scad Object definitions.
vitamins/sheet.scad Implementation.
tests/sheets.scad Code for this example.
| Function | Description |
|---|---|
sheet_colour(type) | Colour |
sheet_colour2(type) | Second colour for a woven sheet |
sheet_is_soft(type) | Is soft enough for wood screws |
sheet_thickness(type) | Thickness |
sheet_warp(type) | Woven sheet warp |
sheet_weft(type) | Woven sheet weft |
| Function | Description |
|---|---|
sheet_is_woven(type) | Is a woven sheet, eg carbon fiber |
| Module | Description |
|---|---|
render_2D_sheet(type, colour = false, colour2 = false, w = undef, d = undef) | Extrude a 2D sheet template and give it the correct colour |
render_sheet(type, colour = false, colour2 = false, w = undef, d = undef) | Render a sheet in the correct colour after holes have been subtracted |
sheet(type, w, d, corners = [0, 0, 0, 0]) | Draw specified sheet |
sheet_2D(type, w, d, corners = [0, 0, 0, 0]) | 2D sheet template with specified size and optionally rounded corners |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | sheet(FoilTape, 30, 30, 2) | Aluminium foil tape 30mm x 30mm x 0.05mm |
| 1 | sheet(AL1_6, 30, 30, 2) | Aluminium tooling plate 30mm x 30mm x 1.6mm |
| 1 | sheet(AL2, 30, 30, 2) | Aluminium tooling plate 30mm x 30mm x 2mm |
| 1 | sheet(AL3, 30, 30, 2) | Aluminium tooling plate 30mm x 30mm x 3mm |
| 1 | sheet(AL6, 30, 30, 2) | Aluminium tooling plate 30mm x 30mm x 6mm |
| 1 | sheet(AL8, 30, 30, 2) | Aluminium tooling plate 30mm x 30mm x 8mm |
| 1 | sheet(Spring08, 30, 30, 2) | Bi-metal saw blade 30mm x 30mm x 0.8mm |
| 1 | sheet(Cardboard, 30, 30, 2) | Corrugated cardboard 30mm x 30mm x 5mm |
| 1 | sheet(Foam20, 30, 30, 2) | Foam sponge 30mm x 30mm x 20mm |
| 1 | sheet(Sellotape, 30, 30, 2) | Sellotape tape 30mm x 30mm x 0.05mm |
| 1 | sheet(DiBond, 30, 30, 2) | Sheet DiBond 30mm x 30mm x 3mm |
| 1 | sheet(DiBond6, 30, 30, 2) | Sheet DiBond 30mm x 30mm x 6mm |
| 1 | sheet(MDF10, 30, 30, 2) | Sheet MDF 30mm x 30mm x 10mm |
| 1 | sheet(MDF12, 30, 30, 2) | Sheet MDF 30mm x 30mm x 12mm |
| 1 | sheet(MDF19, 30, 30, 2) | Sheet MDF 30mm x 30mm x 19mm |
| 1 | sheet(MDF22, 30, 30, 2) | Sheet MDF 30mm x 30mm x 22mm |
| 1 | sheet(MDF3, 30, 30, 2) | Sheet MDF 30mm x 30mm x 3mm |
| 1 | sheet(MDF6, 30, 30, 2) | Sheet MDF 30mm x 30mm x 6mm |
| 1 | sheet(PMMA1p25, 30, 30, 2) | Sheet acrylic 30mm x 30mm x 1.25mm |
| 1 | sheet(PMMA10, 30, 30, 2) | Sheet acrylic 30mm x 30mm x 10mm |
| 1 | sheet(PMMA2, 30, 30, 2) | Sheet acrylic 30mm x 30mm x 2mm |
| 1 | sheet(PMMA3, 30, 30, 2) | Sheet acrylic 30mm x 30mm x 3mm |
| 1 | sheet(PMMA6, 30, 30, 2) | Sheet acrylic 30mm x 30mm x 6mm |
| 1 | sheet(PMMA8, 30, 30, 2) | Sheet acrylic 30mm x 30mm x 8mm |
| 1 | sheet(CF1, 30, 30, 2) | Sheet carbon fiber 30mm x 30mm x 1mm |
| 1 | sheet(CF2, 30, 30, 2) | Sheet carbon fiber 30mm x 30mm x 2mm |
| 1 | sheet(CF3, 30, 30, 2) | Sheet carbon fiber 30mm x 30mm x 3mm |
| 1 | sheet(glass2, 30, 30, 2) | Sheet glass 30mm x 30mm x 2mm |
| 1 | sheet(Steel06, 30, 30, 2) | Sheet mild steel 30mm x 30mm x 0.6mm |
| 1 | sheet(Silicone3, 30, 30, 2) | Sheet silicone 30mm x 30mm x 3mm |
SK shaft support brackets
vitamins/sk_brackets.scad Object definitions.
vitamins/sk_bracket.scad Implementation.
tests/SK_brackets.scad Code for this example.
| Function | Description |
|---|---|
sk_base_height(type) | Height of base containing the screws |
sk_diameter(type) | Rod hole diameter |
sk_hole_offset(type) | Rod hole offset |
sk_screw_separation(type) | Separation of screws in the base |
| Function | Description |
|---|---|
sk_size(type) | Size of bracket |
| Module | Description |
|---|---|
sk_bracket(type) | SK shaft support bracket |
sk_bracket_assembly(type, part_thickness = 2, screw_type = M5_cap_screw, nut_type = undef, max_screw_depth = 6) | Assembly with fasteners in place |
sk_bracket_hole_positions(type) | Place children at hole positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 2 | extrusion(E2020, 20, cornerHole = true) | Extrusion E2020 x 20mm |
| 2 | extrusion(E3030, 20, cornerHole = true) | Extrusion E3030 x 20mm |
| 2 | sliding_t_nut(M4_hammer_nut) | Nut M4 hammer |
| 2 | sliding_t_nut(M4_sliding_t_nut) | Nut M4 sliding T |
| 2 | sliding_t_nut(M5_sliding_t_nut) | Nut M5 sliding T |
| 2 | nut(M5_nut, nyloc = undef) | Nut M5 x 4mm |
| 1 | sk_bracket(SK10) | SK10 shaft support bracket |
| 1 | sk_bracket(SK12) | SK12 shaft support bracket |
| 1 | sk_bracket(SK16) | SK16 shaft support bracket |
| 1 | sk_bracket(SK8) | SK8 shaft support bracket |
| 2 | screw(M4_cap_screw, 12) | Screw M4 cap x 12mm |
| 2 | screw(M4_dome_screw, 12) | Screw M4 dome x 12mm |
| 4 | screw(M5_cap_screw, 16) | Screw M5 cap x 16mm |
| 4 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
| 6 | washer(M5_washer) | Washer M5 x 10mm x 1mm |
Surface mount components for PCBs.
Note that the value string for tantalum capacitors is the the capacitance in pico farads expressed as two digits plus an exponent plus a single letter voltage code. E.g. 475A is 4.7uF 10V on the parts list.
| Code | Voltage |
|---|---|
| e | 2.5 |
| G | 4 |
| J | 6.3 |
| A | 10 |
| C | 16 |
| D | 20 |
| E | 25 |
| V | 35 |
| H | 50 |
vitamins/smds.scad Object definitions.
vitamins/smd.scad Implementation.
tests/SMDs.scad Code for this example.
| Function | Description |
|---|---|
smd_250V_fuse_base(type) | Base length |
smd_250V_fuse_size(type) | Bounding box of the body |
smd_250V_fuse_step(type) | End cutout length, width and height |
smd_250V_fuse_z(type) | Height of body above the PCB surface |
smd_cap_end_cap(type) | End cap width |
smd_cap_size(type) | Body length, width |
smd_coax_base_r(type) | Corner radius of the base |
smd_coax_base_size(type) | Size of the insulating base |
smd_coax_groove(type) | Groove id, width and z |
smd_coax_lug_size(type) | lug size |
smd_coax_pin_d(type) | Central pin diameter |
smd_coax_tube(type) | OD, ID, height |
smd_contact_size(type) | contact size |
smd_diode_colour(type) | Body colour |
smd_diode_lead_z(type) | Top of lead frame from top |
smd_diode_leads(type) | Lead extent in x, width, thickness and gap |
smd_diode_size(type) | Body length, width and height |
smd_diode_z(type) | Height above PCB surface |
smd_inductor_colour(type) | Body colour |
smd_inductor_lead_z(type) | Top of lead frame from top |
smd_inductor_leads(type) | Lead extent in x, width, thickness and gap |
smd_inductor_size(type) | Body length, width and height |
smd_inductor_z(type) | Height above PCB surface |
smd_led_lens(type) | Lens length width and height |
smd_led_size(type) | Body length, width and height |
smd_pot_contacts(type) | Contacts width, depth, pitch and width, depth, gap for center contact |
smd_pot_cross(type) | Cross head slot for screwdriver |
smd_pot_flat(type) | Flat at the back of the wiper |
smd_pot_size(type) | Base length, width and height |
smd_pot_wiper(type) | Wiper diameter, offset, thickness, height, d1, d2, d3, d4 |
smd_qfp_body_size(type) | Size of the body |
smd_qfp_gullwing(type) | Gullwing S, L, R1, R2 |
smd_qfp_pin_size(type) | Pins dimensions |
smd_qfp_pins(type) | Number of pins |
smd_qfp_pitch(type) | Pin pitch |
smd_qfp_slant(type) | Angle of the slope |
smd_res_end_cap(type) | End cap width |
smd_res_power(type) | Power rating in Watts, 0 for choke |
smd_res_size(type) | Body length, width and height |
smd_soic_lead_pitch(type) | Lead pitch |
smd_soic_lead_size(type) | Lead width, foot depth, lead thickness |
smd_soic_lead_span(type) | Total span of leads |
smd_soic_lead_z(type) | Top of lead frame from top |
smd_soic_size(type) | Body length, width and height |
smd_soic_z(type) | Height above PCB surface |
smd_sot_lead_pitch(type) | Lead pitch |
smd_sot_lead_size(type) | Lead width, foot depth, lead thickness |
smd_sot_lead_span(type) | Total span of leads |
smd_sot_lead_z(type) | Top of lead frame from top |
smd_sot_size(type) | Body length, width and height |
smd_sot_tab_width(type) | The wide lead at the top |
smd_sot_z(type) | Height above PCB surface |
smd_tant_colours(type) | Colours of body and stripe |
smd_tant_lead_z(type) | Top of lead frame from top |
smd_tant_leads(type) | Lead extent in x, width, thickness and gap |
smd_tant_size(type) | Body length, width and height |
smd_tant_z(type) | Height above PCB surface |
| Function | Description |
|---|---|
smd_100th(x) | Convert dimension to 1/100" notation |
smd_led_height(type) | Total height |
smd_size(size) | Convert size to 1/100" notation |
| Module | Description |
|---|---|
smd_250V_fuse(type, value) | Draw an SMD mains fuse |
smd_capacitor(type, height, value = undef) | Draw an SMD capacitor with specified height |
smd_coax(type) | Draw an SMD coaxial connector |
smd_diode(type, value) | Draw an SMD diode |
smd_inductor(type, value) | Draw an SMD inductor |
smd_led(type, colour, cutout) | Draw an SMD LED with specified colour |
smd_pot(type, value) | Draw an SMD pot |
smd_qfp(type, value) | Draw and SMD QFP package |
smd_resistor(type, value) | Draw an SMD resistor with specified value |
smd_soic(type, value) | Draw an SMD SOIC |
smd_sot(type, value) | Draw an SMD transistor |
smd_tant(type, value) | Draw an SMD tantalum capacitor |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | smd_inductor(CDRH104 ,"10R") | CDRH104 package 10R |
| 1 | smd_diode(DO214AC, "SS34") | DO214AC package SS34 |
| 1 | smd_inductor(IND2525 ,"4R7") | IND2525 package 4R7 |
| 1 | smd_led(LED0603, "green") | SMD LED 0603 green |
| 1 | smd_led(LED0805, "blue") | SMD LED 0805 blue |
| 1 | smd_led(LED1206, "red") | SMD LED 1306 red |
| 1 | smd_tant(TANT_A, value = "105e") | SMD Tantalum capacitor package A ,1uF, 2.5V |
| 1 | smd_tant(TANT_B, value = "106J") | SMD Tantalum capacitor package B ,10uF, 6.3V |
| 1 | smd_tant(TANT_C, value = "107A") | SMD Tantalum capacitor package C ,100uF, 10V |
| 1 | smd_capacitor(CAP0402) | SMD capacitor 0402 |
| 1 | smd_capacitor(CAP0502) | SMD capacitor 0502 |
| 1 | smd_capacitor(CAP0603) | SMD capacitor 0603 |
| 1 | smd_capacitor(CAP0805) | SMD capacitor 0805 |
| 1 | smd_capacitor(CAP1206) | SMD capacitor 1206 |
| 1 | smd_capacitor(CAP1210) | SMD capacitor 1210 |
| 1 | smd_qfp(QFP50P1200X1200X160_64N, "ATSAM4S4BA") | SMD chip: ATSAM4S4BA, package : QFP50P1200X1200X160_64N |
| 1 | smd_resistor(L2012C, 10u) | SMD choke 0805 10u |
| 1 | smd_coax(U_FL_R_SMT_1) | SMD coax connector type: U_FL_R_SMT_1 |
| 1 | smd_250V_fuse(OMT250, "2A 250V") | SMD fuse: OMT250 2A 250V |
| 1 | smd_resistor(RES0402, 1R0) | SMD resistor 0402 1R0 0.0625W |
| 1 | smd_resistor(RES0502, 10) | SMD resistor 0502 10 0.05W |
| 1 | smd_resistor(RES0603, 100) | SMD resistor 0603 100 0.1W |
| 1 | smd_resistor(RES0805, 10M) | SMD resistor 0805 10M 0.125W |
| 1 | smd_resistor(RES1206, 100K) | SMD resistor 1206 100K 0.25W |
| 1 | smd_soic(SOIC14, "SOIC14") | SOIC14 package SOIC14 |
| 1 | smd_soic(SOIC16, "SOIC16") | SOIC16 package SOIC16 |
| 1 | smd_soic(SOIC18, "SOIC18") | SOIC18 package SOIC18 |
| 1 | smd_soic(SOIC8, "SOIC8") | SOIC8 package SOIC8 |
| 1 | smd_sot(SOT223, "FZT851") | SOT223 package FZT851 |
| 1 | smd_sot(SOT23, "2N7000") | SOT23 package 2N7000 |
| 1 | smd_soic(SOT23_6, "SOT23_6") | SOT23_6 package SOT23_6 |
| 1 | smd_pot(TC33X1, "10K") | TC33X1 package 10K |
| 1 | smd_soic(TSOT23_8, "TSOT23_8") | TSOT23_8 package TSOT23_8 |
Spade terminals used as parts of electrical components.
vitamins/spades.scad Object definitions.
vitamins/spade.scad Implementation.
tests/spades.scad Code for this example.
| Function | Description |
|---|---|
spade_hole(type) | Hole diameter |
spade_l(type) | Length of the narrow part |
spade_shank(type) | Shank width |
spade_t(type) | Thickness |
spade_w(type) | Width |
| Module | Description |
|---|---|
spade(type, height = 14) | Draw a spade of the specified type and total length. The shank length is adjusted to make the length. |

Truncated — view the full README on GitHub.
535 followers · starred Feb 2026
203 followers · starred Dec 2024
365 followers · starred Jan 2026
372 followers · starred Nov 2023
Library of parts modelled in OpenSCAD and a framework for making projects
OpenSCAD
1,652
1,637 commits
updated Sep 24, 2026
An ever expanding library of parts modelled in OpenSCAD useful for 3D printers and enclosures for electronics, etc.
It contains lots of vitamins (the RepRap term for non-printed parts), some general purpose printed parts and some utilities. There are also Python scripts to generate Bills of Materials (BOMs), STL files for all the printed parts, DXF files for CNC routed parts in a project and a manual containing assembly instructions and exploded views by scraping markdown embedded in OpenSCAD comments, see scripts.
A simple example project can be found here and more complex examples here.
For more examples of what it can make see the gallery.
The license is GNU General Public License v3.0, see COPYING.
See usage for requirements, installation instructions and a usage guide.
A list of changes classified as breaking, additions or fixes is maintained in CHANGELOG.md.
7 Segment displays.
Can be single digits stacked side by side or can be multiple digits in one unit. This is determined by the overall width compared to the width of a digit. Presence of a decimal point is determined by the number of pins. Its position is determined by a heuristic.
vitamins/7_segments.scad Object definitions.
vitamins/7_segment.scad Implementation.
tests/7_segments.scad Code for this example.
| Function | Description |
|---|---|
7_segment_digit_size(type) | Size of the actual digit and segment width and angle |
7_segment_pin_pitch(type) | x and y pin pitches and pin diameter |
7_segment_pins(type) | None |
7_segment_size(type) | Size of the body |
| Module | Description |
|---|---|
7_segment_digit(type, colour = grey(95), pin_length = 6.4) | Draw the specified 7 segment digit |
7_segment_digits(type, n, colour = grey(70), pin_length = 6.4, cutout = false) | Draw n digits side by side |

Wifi Antennas
vitamins/antennas.scad Object definitions.
vitamins/antenna.scad Implementation.
tests/antennas.scad Code for this example.
| Function | Description |
|---|---|
antenna_bot_d(type) | Diameter at the base |
antenna_gap(type) | Space for left panel, washers and nuts when screwed on fully. |
antenna_grip(type) | Grip d, h, h2 |
antenna_hinge(type) | Hinge post width, z value of the pin, pin diameter, width reduction and slot width |
antenna_length(type) | Total length |
antenna_rings(type) | List of ring z, thickness, depths |
antenna_split(type) | Split point |
antenna_straight(type) | Length of the straight part |
antenna_top_d(type) | Diameter at the top |
| Function | Description |
|---|---|
antenna_hole_r(type) | Panel hole radius |
antenna_nut(type) | The nut |
| Module | Description |
|---|---|
antenna(type, thickness, angle) | Draw a WiFi antenna |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | antenna(ESP201_antenna) | Antenna ESP201 |
| 1 | nut(ant_nut) | Nut M6.25 x 1.8mm |
| 1 | star_washer(ant_washer_washer) | Washer star M6.4 x 0.6mm |
Axial components for PCBs.
vitamins/axials.scad Object definitions.
vitamins/axial.scad Implementation.
tests/axials.scad Code for this example.
| Function | Description |
|---|---|
ax_diode_colour(type) | Body colour and stripe colour |
ax_diode_size(type) | Body length, diameter and corner radius |
ax_diode_wire(type) | Wire diameter |
ax_res_colour(type) | Body colour |
ax_res_diameter(type) | Body diameter |
ax_res_end_d(type) | End cap diameter |
ax_res_end_l(type) | End cap length |
ax_res_length(type) | Body length |
ax_res_wattage(type) | Power rating |
ax_res_wire(type) | Wire diameter |
| Module | Description |
|---|---|
ax_diode(type, value, pitch = 0) | Through hole axial diode. If pitch is zero the minimum is used. If below the minimum the resistor is placed vertical. |
ax_res(type, value, tol = 5, pitch = 0) | Through hole axial resistor. If pitch is zero the minimum is used. If below the minimum the resistor is placed vertical. |
wire_link(d, l, h = 1, tail = 3, sleeve = false) | Draw a wire jumper link. sleeve can be a list with the diameter and colour. If l is zero then a vertical wire is drawn. |

| Qty | Module call | BOM entry |
|---|---|---|
| 2 | ax_diode(DO_41, "1N4007") | Diode 1N4007 |
| 2 | ax_diode(DO_35, "1N4148") | Diode 1N4148 |
| 1 | pcb(PERF60x40) | Perfboard 60 x 40mm |
| 1 | ax_res(res1_8, 1000) | Resistor 1000 Ohms 5% 0.125W |
| 1 | ax_res(res1_8, 2200, tol = 1) | Resistor 2200 Ohms 1% 0.125W |
| 1 | ax_res(res1_4, 39000, tol = 1) | Resistor 39000 Ohms 1% 0.25W |
| 1 | ax_res(res1_4, 47000) | Resistor 47000 Ohms 5% 0.25W |
| 1 | ax_res(res1_2, 8200) | Resistor 8200 Ohms 5% 0.5W |
| 1 | ax_res(res1_2, 8250, tol = 1) | Resistor 8250 Ohms 1% 0.5W |
| 1 | wire_link(0.8, 7.62, h = 0.75, sleeve = [1.5, "red"]) | Wire link 0.8mm x 0.3" with red sleeving |
| 1 | wire_link(0.8, 10.16) | Wire link 0.8mm x 0.4" |
| 1 | wire_link(0.8, 0, h = 5) | Wire link 0.8mm x 8mm |
Simple model of ball bearings with seals, the colour of which can be specified. If silver they are assumed to be metal and the part number gets a ZZ suffix. Any other colour is assumed to be rubber and the suffix is -2RS.
If a ball bearing has a child it is placed on its top surface, the same as nuts and washers, etc.
Also single bearing balls are modelled as just a silver sphere and a BOM entry.
vitamins/ball_bearings.scad Object definitions.
vitamins/ball_bearing.scad Implementation.
tests/ball_bearings.scad Code for this example.
| Function | Description |
|---|---|
bb_bore(type) | Internal diameter |
bb_colour(type) | Shield colour, "silver" for metal |
bb_diameter(type) | External diameter |
bb_flange_diameter(type) | Flange diameter |
bb_flange_width(type) | Flange width |
bb_hub(type) | Inner rim thickness guesstimate |
bb_name(type) | Part code without shield type suffix |
bb_rim(type) | Outer rim thickness guesstimate |
bb_width(type) | Width |
| Module | Description |
|---|---|
ball_bearing(type) | Draw a ball bearing |
bearing_ball(dia) | Draw a steel bearing ball |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | ball_bearing(BB608) | Ball bearing 608-2RS 8mm x 22mm x 7mm |
| 1 | ball_bearing(BB6200) | Ball bearing 6200-2RS 10mm x 30mm x 9mm |
| 1 | ball_bearing(BB6201) | Ball bearing 6201-2RS 12mm x 32mm x 10mm |
| 1 | ball_bearing(BB624) | Ball bearing 624-2RS 4mm x 13mm x 5mm |
| 1 | ball_bearing(BB6808) | Ball bearing 6808-2RS 40mm x 52mm x 7mm |
| 1 | ball_bearing(BB686) | Ball bearing 686ZZ 6mm x 13mm x 5mm |
| 1 | ball_bearing(BB696) | Ball bearing 696ZZ 6mm x 16mm x 5mm |
| 1 | ball_bearing(BBF623) | Ball bearing F623-2RS 3mm x 10mm x 4mm |
| 1 | ball_bearing(BBF625) | Ball bearing F625ZZ 5mm x 16mm x 5mm |
| 1 | ball_bearing(BBF693) | Ball bearing F693ZZ 3mm x 8mm x 3mm |
| 1 | ball_bearing(BBF695) | Ball bearing F695ZZ 5mm x 13mm x 4mm |
| 1 | ball_bearing(BBMR63) | Ball bearing MR63ZZ 3mm x 6mm x 2.5mm |
| 1 | ball_bearing(BBMR83) | Ball bearing MR83ZZ 3mm x 8mm x 3mm |
| 1 | ball_bearing(BBMR85) | Ball bearing MR85ZZ 5mm x 8mm x 2.5mm |
| 1 | ball_bearing(BBMR93) | Ball bearing MR93ZZ 3mm x 9mm x 4mm |
| 1 | ball_bearing(BBMR95) | Ball bearing MR95ZZ 5mm x 9mm x 3mm |
| 1 | ball_bearing(BBSMR95) | Ball bearing SMR95ZZ 5mm x 9mm x 2.5mm |
| 8 | bearing_ball(3) | Steel ball 3mm |
Actually just single cells at the moment, shown here with mating contacts in place.
Note that the Lumintop LM34 has a built in charger with a USB socket and two LEDs.
The battery length includes its contacts and the origin is the centre of that length. As well as drawing the battery and contacts there are functions exposing enough information to make a battery box.
vitamins/batteries.scad Object definitions.
vitamins/battery.scad Implementation.
tests/batteries.scad Code for this example.
| Function | Description |
|---|---|
battery_colour(type) | Casing colour |
battery_contact(type) | Contact type |
battery_diameter(type) | Casing diameter |
battery_led_positions(type) | LED positions for Lumintop |
battery_length(type) | Total length including terminals |
battery_neg_dia(type) | Negative terminal diameter |
battery_pos_dia(type) | Positive terminal diameter |
battery_pos_height(type) | Positive terminal height above the casing |
battery_type(type) | Battery type |
battery_usb_offset(type) | USB connector offset from the top |
contact_height(type) | Height of the flat part |
contact_neg(type) | Negative spring height above the plate when compressed and the spring type |
contact_pos(type) | Positive contact dimple height and top and bottom internal diameter |
contact_tab_length(type) | Length of the tab |
contact_tab_width(type) | Width of the tab |
contact_thickness(type) | Thickness of the metal |
contact_width(type) | Width of the flat part |
| Module | Description |
|---|---|
battery(type) | Draw a battery |
battery_contact(type, pos = true) | Draw a positive or negative battery contact for specified battery |
battery_led_positions(type) | Position of the LEDs on a Lumintop |

| Qty | Module call | BOM entry |
|---|---|---|
| 10 | battery_contact(bcontact, false) | Battery negative contact |
| 10 | battery_contact(bcontact, true) | Battery positive contact |
| 1 | battery(A23CELL) | Cell A23 12v |
| 1 | battery(AACELL) | Cell AA |
| 1 | battery(AAACELL) | Cell AAA |
| 1 | battery(CCELL) | Cell C |
| 1 | battery(DCELL) | Cell D |
| 1 | battery(LUMINTOP) | Cell LUMINTOP 18650 LION with charger |
| 1 | battery(S25R18650) | Cell Samsung 25R 18650 LION |
| 1 | battery(L16340) | Li-Ion/LiFePo4 16340 3.2v |
| 1 | battery(L32700) | Li-Ion/LiFePo4 32700 3.2v |
| 1 | battery(L4680) | Li-Ion/LiFePo4 4680 3.2v |
SCSnUU and SCSnLUU bearing blocks
vitamins/bearing_blocks.scad Object definitions.
vitamins/bearing_block.scad Implementation.
tests/bearing_blocks.scad Code for this example.
| Function | Description |
|---|---|
sbr_bearing(type) | Linear bearing used |
sbr_circlip(type) | Circlip used |
sbr_hole_offset(type) | Offset of bearing hole from base of rail |
sbr_screw(type) | Screw type |
sbr_screw_separation_x(type) | Screw separation in X direction |
sbr_screw_separation_z(type) | Screw separation in Z direction |
sbr_side_height(type) | Height of side above rail |
sbr_spacer(type) | Spacer used in long bearings |
scs_bearing(type) | Linear bearing used |
scs_block_center_height(type) | Height of the center of the block |
scs_block_side_height(type) | Height of the side of the block, this determines the minimum screw length |
scs_circlip(type) | Circlip used |
scs_hole_offset(type) | Offset of bearing hole from base of block |
scs_screw(type) | Screw type |
scs_screw_separation_x(type) | Screw separation in X direction |
scs_screw_separation_z(type) | Screw separation in Z direction |
scs_spacer(type) | Spacer used in long bearings |
| Function | Description |
|---|---|
sbr_size(type) | Size of SBR bracket bounding block |
scs_size(type) | Size of scs bracket bounding block |
| Module | Description |
|---|---|
right_trapezoid(base, top, height, h = 0, center = true) | A right angled trapezoid with the 90° corner at the origin. 3D when h is nonzero, otherwise 2D |
sbr_bearing_block(type) | Draw the specified SBR bearing block |
sbr_bearing_block_assembly(type, part_thickness, screw_type) | Assembly with screws in place |
sbr_bearing_block_hole_positions(type) | Place children at hole positions |
scs_bearing_block(type) | Draw the specified SCS bearing block |
scs_bearing_block_assembly(type, part_thickness, screw_type, nut_type) | Assembly with screws and nuts in place |
scs_bearing_block_hole_positions(type) | Place children at hole positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 12 | nut(M4_nut) | Nut M4 x 3.2mm |
| 24 | nut(M5_nut) | Nut M5 x 4mm |
| 1 | sbr_bearing_block(SBR16UU) | SBR16UU bearing block |
| 1 | scs_bearing_block(SCS10LUU) | SCS10LUU bearing block |
| 1 | scs_bearing_block(SCS10UU) | SCS10UU bearing block |
| 1 | scs_bearing_block(SCS12LUU) | SCS12LUU bearing block |
| 1 | scs_bearing_block(SCS12UU) | SCS12UU bearing block |
| 1 | scs_bearing_block(SCS16LUU) | SCS16LUU bearing block |
| 1 | scs_bearing_block(SCS16UU) | SCS16UU bearing block |
| 1 | scs_bearing_block(SCS6UU) | SCS6UU bearing block |
| 1 | scs_bearing_block(SCS8LUU) | SCS8LUU bearing block |
| 1 | scs_bearing_block(SCS8UU) | SCS8UU bearing block |
| 4 | screw(M4_cap_screw, 25) | Screw M4 cap x 25mm |
| 8 | screw(M4_cap_screw, 30) | Screw M4 cap x 30mm |
| 4 | screw(M5_cap_screw, 16) | Screw M5 cap x 16mm |
| 16 | screw(M5_cap_screw, 35) | Screw M5 cap x 35mm |
| 8 | screw(M5_cap_screw, 45) | Screw M5 cap x 45mm |
| 12 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
| 24 | washer(M5_washer) | Washer M5 x 10mm x 1mm |
Models timing belt running in a path over toothed or smooth pulleys and calculates an accurate length. Only models 2D paths, belt may twist to support crossed belt core XY and other designs where the belt twists!
By default the path is a closed loop. An open loop can be specified by specifying open=true, and in that case the start and end points are not connected, leaving the loop open.
To get a 180 degree twist of the loop, you can use the twist argument. Twist can be a single number, and in that case the belt will twist after
the position with that number. Alternatively twist can be a list of boolean values with a boolean for each position; the belt will then twist after
the position that have a true value in the twist list. If the path is specified with pulley/idler types, then you can use auto_twist=true; in
that case the belt will automatically twist so the back of the belt always runs against idlers and the tooth side runs against pulleys. If you use
open=true then you might also use start_twist=true to let the belt start the part with the back side out.
The path must be specified as a list of positions. Each position should be either a vector with [x, y, pulley] or [x, y, r]. A pulley is a type from
pulleys.scad, and correct radius and angle will automatically be calculated. Alternatively a radius can be specified directly.
To make the back of the belt run against a smooth pulley on the outside of the loop specify a negative pitch radius. Alternatively you can just specify smooth pulleys in the path, and it will then happen automatically.
Individual teeth are not drawn, instead they are represented by a lighter colour.
vitamins/belts.scad Object definitions.
vitamins/belt.scad Implementation.
tests/belts.scad Code for this example.
| Function | Description |
|---|---|
belt_pitch(type) | Pitch in mm |
belt_pitch_height(type) | Offset of the pitch radius from the tips of the teeth |
belt_thickness(type) | Total thickness including teeth |
belt_tooth_height(type) | Tooth height |
belt_width(type) | Width in mm |
| Function | Description |
|---|---|
_belt_points_info(type, points, open, twist, auto_twist, start_twist) | Helper function that calculates [twist, istwisted, points, tangents, arcs] |
belt_length(type, points, open = false) | Compute belt length given path |
belt_pitch_to_back(type) | Offset of the back from the pitch radius |
belt_pulley_pr(type, pulley, twisted=false) | Pitch radius. Default it expects the belt tooth to be against a toothed pulley an the backside to be against a smooth pulley (an idler). If twisted is true, the the belt is the other way around. |
| Module | Description |
|---|---|
belt(type, points, belt_colour = grey(20), tooth_colour = grey(50), open = false, twist = undef, auto_twist = false, start_twist = false) | Draw a belt path given a set of points and pitch radii where the pulleys are. Closed loop unless open is specified |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | belt(GT2x12, [ ... ]) | Belt GT2 x 12mm x 128mm |
| 1 | belt(GT2x6, [ ... ]) | Belt GT2 x 6mm x 128mm |
| 1 | belt(GT2x6, [ ... ]) | Belt GT2 x 6mm x 584mm |
| 2 | belt(GT2x6, [ ... ]) | Belt GT2 x 6mm x 588mm |
| 1 | belt(GT2x9, [ ... ]) | Belt GT2 x 9mm x 128mm |
| 1 | belt(GT3x12, [ ... ]) | Belt GT3 x 12mm x 128mm |
| 1 | belt(GT3x6, [ ... ]) | Belt GT3 x 6mm x 128mm |
| 1 | belt(GT3x9, [ ... ]) | Belt GT3 x 9mm x 128mm |
| 1 | belt(T2p5x6, [ ... ]) | Belt T2.5 x 6mm x 130mm |
| 1 | belt(T5x10, [ ... ]) | Belt T5 x 10mm x 130mm |
| 1 | belt(T5x6, [ ... ]) | Belt T5 x 6mm x 130mm |
| 2 | insert(F1BM3) | Heatfit insert M3 x 5.8mm |
| 2 | pulley(GT2x16_toothed_idler) | Pulley GT2 idler 16 teeth |
| 4 | pulley(GT2x20_toothed_idler) | Pulley GT2 idler 20 teeth |
| 6 | pulley(GT2x16_plain_idler) | Pulley GT2 idler smooth 9.63mm |
| 3 | pulley(GT2x20ob_pulley) | Pulley GT2OB 20 teeth |
| 2 | screw(M3_cs_cap_screw, 20) | Screw M3 cs cap x 20mm |
| 6 | screw(M3_grub_screw, 6) | Screw M3 grub x 6mm |
Brushless DC electric motor
vitamins/bldc_motors.scad Object definitions.
vitamins/bldc_motor.scad Implementation.
tests/BLDC_motors.scad Code for this example.
| Function | Description |
|---|---|
BLDC_base_diameter(type) | Base diameter |
BLDC_base_height_1(type) | Base height 1 |
BLDC_base_height_2(type) | Base height 2 |
BLDC_base_hole_diameter(type) | Base hole diameter |
BLDC_base_holes(type) | Base holes |
BLDC_base_open(type) | Base open |
BLDC_bell_diameter(type) | Bell diameter |
BLDC_bell_height_1(type) | Bell height 1 |
BLDC_bell_height_2(type) | Bell height 2 |
BLDC_bell_hole_diameter(type) | Bell hole diameter |
BLDC_bell_holes(type) | Bell holes |
BLDC_bell_spokes(type) | Bell spoke count |
BLDC_body_colour(type) | Body colour |
BLDC_boss_diameter(type) | Boss diameter |
BLDC_boss_height(type) | Boss height |
BLDC_diameter(type) | Diameter of motor |
BLDC_height(type) | Height of motor including boss, if any, but excluding prop shaft |
BLDC_prop_shaft_diameter(type) | Diameter of unthreaded portion of prop shaft |
BLDC_prop_shaft_length(type) | Prop shaft length, including threaded section |
BLDC_prop_shaft_thread_diameter(type) | Diameter of threaded section of prop shaft |
BLDC_prop_shaft_thread_length(type) | Length of threaded section of prop shaft |
BLDC_shaft_diameter(type) | shaft diameter |
BLDC_shaft_length(type) | Total shaft length |
BLDC_shaft_offset(type) | shaft offset from base |
BLDC_side_colour(type) | Side colour |
BLDC_wire_diameter(type) | Wire diameter |
| Module | Description |
|---|---|
BLDC(type) | Draw specified BLDC motor |
BLDC_base_screw_positions(type, n = 4) | Positions children at the base screw holes |
BLDC_bell_screw_positions(type, n = 4) | Positions children at the bell screw holes |
BLDC_screw_positions(holes, n = 4) | Screw positions utility function |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | BLDC(BLDC0603) | Brushless DC motor BLDC0603 |
| 1 | BLDC(BLDC0802) | Brushless DC motor BLDC0802 |
| 1 | BLDC(BLDC1105) | Brushless DC motor BLDC1105 |
| 1 | BLDC(BLDC1306) | Brushless DC motor BLDC1306 |
| 1 | BLDC(BLDC1804) | Brushless DC motor BLDC1804 |
| 1 | BLDC(BLDC2205) | Brushless DC motor BLDC2205 |
| 1 | BLDC(BLDC2212) | Brushless DC motor BLDC2212 |
| 1 | BLDC(BLDC3548) | Brushless DC motor BLDC3548 |
| 1 | BLDC(BLDC4250) | Brushless DC motor BLDC4250 |
Models of radial blowers. Note that blower_exit() and blower_exit_offset() are for the inside of the exit for square blowers but the outside for spiral blowers.
vitamins/blowers.scad Object definitions.
vitamins/blower.scad Implementation.
tests/blowers.scad Code for this example.
| Function | Description |
|---|---|
blower_axis(type) | XY coordinates of the axle |
blower_base(type) | Thickness of the base |
blower_bore(type) | The air intake hole diameter |
blower_depth(type) | Height |
blower_exit(type) | The width of the exit port |
blower_hub(type) | Rotor hub diameter |
blower_hub_height(type) | Height of the rotor |
blower_length(type) | Length of enclosing rectangle |
blower_lug(type) | Height of the lugs |
blower_screw(type) | The type of screws needed |
blower_screw_hole(type) | Screw hole diameter |
blower_screw_holes(type) | List of XY coordinates of the screw holes |
blower_top(type) | Thickness of the top |
blower_wall(type) | Side wall thickness |
blower_wall_left(type) | Left side wall thickness |
blower_wall_right(type) | Right wall thickness (for square fans) |
blower_width(type) | Width of enclosing rectangle |
| Function | Description |
|---|---|
blower_casing_is_square(type) | True for square radial fans, false for spiral shape radial blowers |
blower_exit_offset(type) | Offset of exit's centre from the edge |
blower_size(type) | Size |
| Module | Description |
|---|---|
blower(type) | Draw specified blower |
blower_hole_positions(type) | Translate children to screw hole positions |
blower_square(type) | Draw a square blower |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | blower(PE4020) | Blower Pengda Technology 4020 |
| 1 | blower(RB5015) | Blower Runda RB5015 |
| 4 | screw(M2_cap_screw, 8) | Screw M2 cap x 8mm |
| 2 | screw(M2_cap_screw, 10) | Screw M2 cap x 10mm |
| 3 | screw(M3_cap_screw, 20) | Screw M3 cap x 20mm |
| 2 | screw(M4_cap_screw, 25) | Screw M4 cap x 25mm |
| 1 | blower(BL30x10) | Square radial fan 3010 |
| 1 | blower(BL40x10) | Square radial fan 4010 |
| 6 | washer(M2_washer) | Washer M2 x 5mm x 0.3mm |
| 3 | washer(M3_washer) | Washer M3 x 7mm x 0.5mm |
| 2 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
Box sections.
vitamins/box_sections.scad Object definitions.
vitamins/box_section.scad Implementation.
tests/box_sections.scad Code for this example.
| Function | Description |
|---|---|
box_section_colour(type) | Colour |
box_section_colour2(type) | Colour2, for woven box section |
box_section_fillet(type) | Fillet |
box_section_material(type) | Material description |
box_section_size(type) | Size |
box_section_thickness(type) | Wall thickness |
| Function | Description |
|---|---|
box_section_is_woven(type) | Box section is woven, eg carbon fiber |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | box_section(AL12x8x1, 100) | Aluminium rectangular box section 12mm x 8mm x 1mm, length 100mm |
| 1 | box_section(AL20x20x2, 80) | Aluminium rectangular box section 20mm x 20mm x 2mm, length 80mm |
| 1 | box_section(AL38p1x25p4x1p6, 60) | Aluminium rectangular box section 38.1mm x 25.4mm x 1.6mm, length 60mm |
| 1 | box_section(AL50p8x38p1x3, 40) | Aluminium rectangular box section 50.8mm x 38.1mm x 3.0mm, length 40mm |
| 1 | box_section(CF10x10x1, 100) | Carbon fiber rectangular box section 10mm x 10mm x 1mm, length 100mm |
Crude representation of a bulldog clip. The handle is not currently drawn but its length can be accessed to allow clearance. Used for holding glass on 3D printer beds but Swiss picture clips can be better.
vitamins/bulldogs.scad Object definitions.
vitamins/bulldog.scad Implementation.
tests/bulldogs.scad Code for this example.
| Function | Description |
|---|---|
bulldog_depth(type) | Depth from the back to the front of the tubes |
bulldog_handle_length(type) | Length that the handle protrudes from the back |
bulldog_height(type) | Height at the back |
bulldog_length(type) | Length along the profile |
bulldog_radius(type) | Outside radius of the back corners |
bulldog_thickness(type) | Thickness of the metal |
bulldog_tube(type) | Outside diameter of the tubes |
| Module | Description |
|---|---|
bulldog(type, open = 4) | Draw bulldog clip open by specified amount |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | bulldog(small_bulldog) | Bulldog clip 19mm |
| 1 | bulldog(large_bulldog) | Bulldog clip 25mm |
PCB mounted buttons. Can optionally have a coloured cap
vitamins/buttons.scad Object definitions.
vitamins/button.scad Implementation.
tests/buttons.scad Code for this example.
| Function | Description |
|---|---|
square_button_cap_d(type) | Diameter of the body of the cap |
square_button_cap_flange_d(type) | Diameter of the flange of the cap |
square_button_cap_flange_h(type) | Height of the cap flange |
square_button_cap_h(type) | Height of the cap including the stem |
square_button_cap_stem(type) | Length of the cap stem |
square_button_d(type) | Button diameter |
square_button_h(type) | Height of the button above the PCB |
square_button_height(type) | Height of the base |
square_button_ra_z(type) | Height of button centre above the PCB for right_angle version |
square_button_rivit(type) | Size of the corner rivets |
square_button_wall(type) | Offset of the metal part |
square_button_width(type) | Width and depth of the base |
| Module | Description |
|---|---|
square_button(type, colour = "yellow", right_angle = false) | Draw square button with specified cap colour if it has a cap |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | square_button(button_12mm, "yellow") | Square button 12mm with yellow cap |
| 1 | square_button(button_4p5mm) | Square button 4.5mm |
| 1 | square_button(button_6mm) | Square button 6mm |
| 1 | square_button(button_6mm_7) | Square button 6mm |
A strip of polypropylene used with ribbon cable to make a cable flexible in one direction only.
Modelled with a Bezier spline, which is not quite the same as a minimum energy curve but very close, especially near the extreme positions, where the model needs to be accurate.
When the sides are constrained then a circular model is more accurate.
vitamins/cable_strip.scad Implementation.
tests/cable_strips.scad Code for this example.
| Function | Description |
|---|---|
bezier_cable_length(depth, min_z, pos) | Calculate a length that will achieve the desired minimum z |
cable_strip_length(depth, travel, extra = 15) | Calculate circular cable strip length |
ribbon_clamp_slot(ways) | Width of the slot to accept a ribbon cable |
ribbon_clamp_slot_depth() | Depth of slot to accept a ribbon cable and a cable strip |
ribbon_ways(ways) | Allows ribbon clamps to accept multiple cables |
| Module | Description |
|---|---|
bezier_cable_strip(ways, depth, length, below, extra, pos = 0) | Draw a cable strip using a Bezier curve |
cable_strip(ways, depth, travel, extra = 15, pos = 0) | Draw a cable stripe with a semi circular fold |

| Qty | Module call | BOM entry |
|---|---|---|
| 3 | bezier_cable_strip(20, 50, 150, 100, 10) | Polypropylene strip 170mm x 26mm x 0.8mm |
| 3 | cable_strip(20, 25, 100, 30) | Polypropylene strip 189mm x 24mm x 0.8mm |
PCB cameras.
vitamins/cameras.scad Object definitions.
vitamins/camera.scad Implementation.
tests/cameras.scad Code for this example.
| Function | Description |
|---|---|
camera_connector_pos(type) | The flex connector block for the camera itself's position |
camera_connector_size(type) | The flex connector block for the camera itself's size |
camera_fov(type) | The field of view of the camera lens |
camera_lens(type) | Stack of lens parts, can be round, rectangular or rounded rectangular, with optional tapered aperture |
camera_lens_offset(type) | Offset of the lens center from the PCB centre |
camera_pcb(type) | The PCB part of the camera |
| Function | Description |
|---|---|
camera_lens_height(type) | The height of the lens stack |
| Module | Description |
|---|---|
camera(type, show_lens = true, fov_distance = 0, fov = undef) | Draw specified PCB camera |
camera_lens(type, offset = 0, show_lens = true) | Draw the lens stack, with optional offset for making a clearance hole |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | camera(ESP32_CAM) | ESP32-CAM Camera module |
| 1 | camera(rpi_camera_v1) | Raspberry Pi camera V1 |
| 1 | camera(rpi_camera_v2) | Raspberry Pi camera V2 |
| 1 | camera(rpi_camera) | Raspberry Pi focusable camera |
Circlips aka tapered retaining rings.
vitamins/circlips.scad Object definitions.
vitamins/circlip.scad Implementation.
tests/circlips.scad Code for this example.
| Function | Description |
|---|---|
circlip_a(type) | Size of the lugs |
circlip_b(type) | Widest part of the taper |
circlip_d1(type) | Nominal OD, i.e. diameter of tube |
circlip_d2(type) | Groove diameter, i.e. OD when installed |
circlip_d3(type) | Relaxed OD when not installed |
circlip_d5(type) | Plier hole diameter |
circlip_thickness(type) | Thickness |
| Function | Description |
|---|---|
circlip_closed_angle(type) | Closed angle |
| Module | Description |
|---|---|
internal_circlip(type, open = 0) | Draw specified internal circlip, open = 0, for nominal size installed, 1 for relaxed uninstalled, -1 for squeezed to install |

| Qty | Module call | BOM entry |
|---|---|---|
| 3 | circlip(circlip_12i) | Circlip internal 12mm |
| 3 | circlip(circlip_15i) | Circlip internal 15mm |
| 3 | circlip(circlip_19i) | Circlip internal 19mm |
| 3 | circlip(circlip_21i) | Circlip internal 21mm |
| 3 | circlip(circlip_28i) | Circlip internal 28mm |
| 3 | circlip(circlip_28iw) | Circlip internal 28mm (wide opening) |
Various electronic components used in hot ends and heated beds.
vitamins/components.scad Object definitions.
vitamins/component.scad Implementation.
tests/components.scad Code for this example.
| Function | Description |
|---|---|
al_clad_clearance(type) | Clearance from screw hole centre to the body |
al_clad_height(type) | Body height |
al_clad_hole(type) | Hole diameter |
al_clad_hpitch(type) | Lengthways pitch between screw holes |
al_clad_length(type) | Body length |
al_clad_tab(type) | Tab width |
al_clad_thickness(type) | Tab thickness |
al_clad_vpitch(type) | Widthways pitch between screw holes |
al_clad_width(type) | Width including tabs |
al_clad_wire_length(type) | Total length including wires |
resistor_colour(type) | Body colour |
resistor_diameter(type) | Body diameter |
resistor_hole(type) | Hole big enough to glue it into |
resistor_length(type) | Body length |
resistor_radial(type) | Radial gives bead thermistor style body |
resistor_sleeved(type) | Are the leads sleeved |
resistor_wire_diameter(type) | Wire diameter |
resistor_wire_length(type) | Wire length from body |
tc_body_height(type) | Plastic body height |
tc_body_inset(type) | How far metal is inset into the plastic body |
tc_body_length(type) | Plastic body length |
tc_body_width(type) | Plastic body width |
tc_hole_dia(type) | Screw hole diameter |
tc_hole_pitch(type) | Screw hole pitch |
tc_length(type) | Across the lugs |
tc_spade_height(type) | Terminal spade height measured from base |
tc_spade_pitch(type) | Terminal spade pitch |
tc_thickness(type) | Metal thickness |
tc_width(type) | Width of lugs |
| Function | Description |
|---|---|
TO220_lead_pos(i, l) | Position of ith lead end when length = l |
TO220_size() | Size of a TO220 |
TO220_thickness() | Thickness of the tab of a TO220 |
TO247_size() | Body dimensions of a T247, hole offset, lead height and lead wide length |
fack2spm_bezel_size() | FACK2SPM Bezel dimensions |
fack2spm_screw() | Screw type for FACK2SPM |
| Module | Description |
|---|---|
TO220(description, leads = 3, lead_length = 16) | Draw a TO220 package, use description to describe what it is |
TO247(description, lead_length = 20) | Draw a TO247 package, use description to describe what it is |
al_clad_resistor(type, value, leads = true) | Draw an aluminium clad resistor |
al_clad_resistor_assembly(type, value, sleeved = true, sleeving = HSHRNK32, sleeving_length = 15) | Draw aluminium clad resistor with optional sleaving, positions children at the screw positions |
al_clad_resistor_hole_positions(type) | Position children at the screw holes of an aluminium clad resistor |
al_clad_resistor_holes(type, h = 100) | Drill screw holes for an aluminium clad resistor |
fack2spm() | Draw a FACK2SPM Cat5E RJ45 shielded panel mount coupler |
fack2spm_hole_positions() | Place children at the FACK2SPM mounting hole positions |
fack2spm_holes(h = 0) | Cut the holes for a FACK2SPM |
multiwatt11(part_no, tail = 3) | Draw a MULTIWATT11 package |
panel_USBA() | Draw a panel mount USBA connector |
panel_USBA_hole_positions() | Place children at hole positions |
panel_USBA_holes(h = 100) | Make holes for USBA connector |
resistor(type) | Draw specified type of resistor |
sleeved_resistor(type, sleeving, bare = 5, heatshrink = false) | Draw a resistor with sleeved leads and option heatshrink |
thermal_cutout(type) | Draw specified thermal cutout |
thermal_cutout_hole_positions(type) | Place children at hole positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | TO220("Generic TO220 package") | Generic TO220 package |
| 1 | TO247("Generic TO247 package") | Generic TO247 package |
| 8 | tubing(HSHRNK32) | Heatshrink sleeving ID 3.2mm x 15mm |
| 1 | multiwatt11("L6203") | MULTIWATT11 L6203 |
| 1 | resistor(RWM04106R80J) | Resistor RWM04106R80J 6R8 3W vitreous enamel |
| 1 | resistor(RIE1212UB5C5R6) | Resistor UB5C 5R6F 5R6 3W vitreous enamel |
| 1 | al_clad_resistor(THS10, 4.7) | Resistor aluminium clad THS10 4.7 |
| 1 | al_clad_resistor(THS15, 4.7) | Resistor aluminium clad THS15 4.7 |
| 1 | al_clad_resistor(THS25, 4.7) | Resistor aluminium clad THS25 4.7 |
| 1 | al_clad_resistor(THS50, 4.7) | Resistor aluminium clad THS50 4.7 |
| 4 | screw(M2p5_pan_screw, 16) | Screw M2.5 pan x 16mm |
| 4 | screw(M3_pan_screw, 16) | Screw M3 pan x 16mm |
| 1 | panel_USBA() | Socket USB A panel mount |
| 1 | tuk_fack2spm() | TUK FACK2SPM Cat5E RJ45 shielded panel mount coupler |
| 1 | thermal_cutout(TC) | Thermal cutout TC |
| 1 | resistor(Epcos) | Thermistor Epcos B57560G104F 100K 1% |
| 1 | resistor(EpcosBlue) | Thermistor Epcos B57861S104F40 100K 1% |
| 1 | resistor(Honewell) | Thermistor Honeywell 135-104LAC-J01 100K 1% |
D-connectors. Can be any number of ways, male or female, solder buckets, PCB mount or IDC, with or without pillars.
vitamins/d_connectors.scad Object definitions.
vitamins/d_connector.scad Implementation.
tests/d_connectors.scad Code for this example.
| Function | Description |
|---|---|
d_flange_length(type) | Length of the flange |
d_flange_thickness(type) | Thickness of the flange |
d_flange_width(type) | Width of the flange |
d_front_height(type) | From the back of the flange to the front |
d_height(type) | From the front to the back of the metal part |
d_hole_pitch(type) | Mounting hole pitch |
d_lengths(type) | Lengths of the D for plug and socket |
d_ways(type) | Number of ways |
d_widths(type) | Widths of the D for plug and socket |
| Function | Description |
|---|---|
d_mate_distance(type) | Spacing when mated |
d_pcb_offset(type) | Height of the back of the flange above the PCB |
d_slot_length(type) | Slot to clear the back |
| Module | Description |
|---|---|
d_connector_holes(type) | Place children at the screw hole positions |
d_hole(type, h = 0, center = true, clearance = 0.2) | Make a hole to clear the back of d-connector |
d_pillar() | Draw a pillar for a D-connector |
d_plug(type, socket = false, pcb = false, idc = false) | Draw specified D plug, which can be IDC, PCB or plain solder bucket |
d_plug_D(length, width, rad) | D plug D shape |
d_socket(connector, pcb = false, idc = false) | Draw specified D socket, which can be IDC, PCB or plain solder bucket |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | d_plug(DCONN15, idc = true) | D-type 15 way IDC plug |
| 1 | d_socket(DCONN15, idc = true) | D-type 15 way IDC socket |
| 1 | d_plug(DCONN25, pcb = true) | D-type 25 way PCB mount plug |
| 1 | d_socket(DCONN25, pcb = true) | D-type 25 way PCB mount socket |
| 1 | d_plug(DCONN37) | D-type 37 way plug |
| 1 | d_socket(DCONN37) | D-type 37 way socket |
| 1 | d_plug(DCONN9) | D-type 9 way plug |
| 1 | d_socket(DCONN9) | D-type 9 way socket |
| 8 | d_pillar() | D-type connector pillar |
Dual inline IC packages and sockets
vitamins/dip.scad Implementation.
tests/DIP.scad Code for this example.
| Function | Description |
|---|---|
pdip_pin_W(type) | Pin shoulder width |
pdip_pin_h(type) | Pin height |
pdip_pin_n(type) | Pin neck |
pdip_pin_s(type) | Height above seating plane |
pdip_pin_t(type) | Pin thickness |
pdip_pin_w(type) | Pin width |
| Module | Description |
|---|---|
dip(n, part, size, w, pitch, pin) | Draw DIP package |
pdip(pins, part, socketed, w = inch(0.3), pitch = inch(0.1)) | Draw standard 0.1" PDIP IC package |
pdip_pin(type, l, end) | Draw a pin |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | dil_socket(14, 7.62) | DIL socket 28 x 0.3" |
| 1 | pdip(14, 74HC00) | IC 74HC00 PDIP14 |
| 1 | pdip(20, 74HC245) | IC 74HC245 PDIP20 |
| 1 | pdip(28, ATMEGA328) | IC ATMEGA328 PDIP28 |
| 1 | pdip(8, NE555) | IC NE555 PDIP8 |
| 1 | pdip(6, OPTO) | IC OPTO PDIP6 |
| 1 | pdip(16, ULN2003) | IC ULN2003 PDIP16 |
| 1 | pdip(18, ULN2803) | IC ULN2803 PDIP18 |
LCD displays.
vitamins/displays.scad Object definitions.
vitamins/display.scad Implementation.
tests/displays.scad Code for this example.
| Function | Description |
|---|---|
display_aperture(type) | Size of the aperture including its depth |
display_height(type) | Depth of the metal part |
display_pcb(type) | PCB mounted on the back |
display_pcb_offset(type) | 3D offset of the PCB centre |
display_ribbon(type) | Keep out region for ribbon cable |
display_thickness(type) | Height of the metal part |
display_threads(type) | Length that studs protrude from the PCB holes |
display_touch_screen(type) | Touch screen position and size |
display_width(type) | Width of the metal part |
| Function | Description |
|---|---|
display_depth(type) | Total thickness including touch screen and PCB |
display_ts_thickness(type) | Touch screen thickness or 0 |
| Module | Description |
|---|---|
display(type) | Draw specified display |
display_aperture(type, clearance, clear_pcb = false) | Make aperture cutout |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | display(BigTreeTech_TFT35v3_0) | BigTreeTech TFT35 v3.0 |
| 1 | display(HDMI5) | HDMI display 5" |
| 1 | display(TFT128x160) | LCD TFT ST7735 display 128x160 |
| 2 | display(LCD1602A) | LCD display 1602A |
| 1 | display(LCD2004A) | LCD display 2004A |
| 1 | display(LCDS7282B) | LCD display S-7282B |
| 1 | display(SSD1963_4p3) | LCD display SSD1963 4.3" |
Brackets for joining extrusions at a corner.
vitamins/extrusion_brackets.scad Object definitions.
vitamins/extrusion_bracket.scad Implementation.
tests/extrusion_brackets.scad Code for this example.
| Function | Description |
|---|---|
extrusion_corner_bracket_3D_inner_height(type) | The depth offset of the dip in the cuboid |
extrusion_corner_bracket_3D_inner_side_length(type) | The length of the dip in the cuboid sides |
extrusion_corner_bracket_3D_nut_dia(type) | The width of bottom part of the nut |
extrusion_corner_bracket_3D_nut_nyloc_thickness(type) | The total thickness of the nut |
extrusion_corner_bracket_3D_nut_screw(type) | The screw (most likely Mx_grub_screw from <NopSCADlib/vitamins/screws.scad>) |
extrusion_corner_bracket_3D_nut_screws_hor(type) | The positions of the screw holes on the horizontal arms, expressed in %/100 of the nut arm |
extrusion_corner_bracket_3D_nut_screws_ver(type) | The positions of the screw holes on the vertical arms, expressed in %/100 of the nut arm |
extrusion_corner_bracket_3D_nut_sx(type) | The length of the nuts |
extrusion_corner_bracket_3D_nut_thickness(type) | The thickness of the top part of the nut |
extrusion_corner_bracket_3D_nut_ty1(type) | The total width of the nut |
extrusion_corner_bracket_3D_nut_ty2(type) | The width of the top edge of the nut |
extrusion_corner_bracket_3D_outer_height(type) | The height of the cuboid |
extrusion_corner_bracket_3D_outer_side_length(type) | The length of the base cuboid sides |
extrusion_corner_bracket_base_thickness(type) | Thickness of base of bracket |
extrusion_corner_bracket_extrusion(type) | Default extrusion this bracket is for |
extrusion_corner_bracket_hole_offset(type) | Hole offset from corner |
extrusion_corner_bracket_side_thickness(type) | Thickness of side of bracket |
extrusion_corner_bracket_size(type) | Size of bracket |
extrusion_corner_bracket_tnut(type) | The sliding t-nut to use in the assembly |
extrusion_inner_corner_bracket_extrusion(type) | Default extrusion this bracket is for |
extrusion_inner_corner_bracket_screw_offsets(type) | Screw offsets from the ends |
extrusion_inner_corner_bracket_size(type) | Size of inner bracket |
extrusion_inner_corner_bracket_tnut(type) | The sliding t-nut it is based on |
| Function | Description |
|---|---|
extrusion_corner_bracket_3D_get_x_offset(type) | helper function to position the x beam |
extrusion_corner_bracket_3D_get_x_rot(type) | helper function to rotate the y beam |
extrusion_corner_bracket_3D_get_y_offset(type) | helper function to position the y beam |
extrusion_corner_bracket_3D_get_y_rot(type) | helper function to rotate the y beam |
| Module | Description |
|---|---|
extrusion_corner_bracket(type) | Corner bracket for extrusion |
extrusion_corner_bracket_3D(type, grub_screws = true) | draw the specified extrusion_corner_bracket_3D |
extrusion_corner_bracket_assembly(type, part_thickness = undef, screw_type = undef, nut_type = undef, max_screw_depth = undef, extrusion = undef) | Assembly with fasteners in place |
extrusion_inner_corner_bracket(type, grub_screws = true, backwards = false, extrusion = undef) | Inner corner bracket for extrusion |

| Qty | Module call | BOM entry |
|---|---|---|
| 3 | extrusion(E2020, 40, cornerHole = true) | Extrusion E2020 x 40mm |
| 2 | extrusion(E2020t, 20.5) | Extrusion E2020t x 20.5mm |
| 1 | extrusion(E2020t, 28) | Extrusion E2020t x 28mm |
| 2 | extrusion(E2020t, 39.5) | Extrusion E2020t x 39.5mm |
| 1 | extrusion(E2020t, 48) | Extrusion E2020t x 48mm |
| 3 | extrusion(E3030, 40, cornerHole = true) | Extrusion E3030 x 40mm |
| 3 | extrusion(E4040, 40, cornerHole = true) | Extrusion E4040 x 40mm |
| 1 | extrusion(E4040t, 27.4, cornerHole = true) | Extrusion E4040t x 27.4mm |
| 1 | extrusion(E4040t, 40, cornerHole = true) | Extrusion E4040t x 40mm |
| 1 | extrusion(E4040t, 60.4, cornerHole = true) | Extrusion E4040t x 60.4mm |
| 1 | extrusion(E4040t, 80, cornerHole = true) | Extrusion E4040t x 80mm |
| 2 | extrusion_corner_bracket(E20_corner_bracket) | Extrusion corner bracket 20mm for E2020t |
| 2 | extrusion_corner_bracket(E40_corner_bracket) | Extrusion corner bracket 35mm for E4040t |
| 2 | extrusion_corner_bracket_3D(extrusion_corner_bracket_3D_2020) | Extrusion corner bracket 3D mm for E2020 |
| 2 | extrusion_corner_bracket_3D(extrusion_corner_bracket_3D_3030) | Extrusion corner bracket 3D mm for E3030 |
| 2 | extrusion_corner_bracket_3D(extrusion_corner_bracket_3D_4040) | Extrusion corner bracket 3D mm for E4040 |
| 4 | extrusion_inner_corner_bracket(E20_inner_corner_bracket) | Extrusion inner corner bracket for E2020t |
| 2 | extrusion_inner_corner_bracket(E40_inner_corner_bracket) | Extrusion inner corner bracket for E4040t |
| 4 | sliding_t_nut(M4_sliding_t_nut) | Nut M4 sliding T |
| 4 | sliding_t_nut(M8_sliding_ball_t_nut) | Nut M8 sliding T with spring loaded ball |
| 4 | screw(M4_cap_screw, 8) | Screw M4 cap x 8mm |
| 12 | screw(M4_grub_screw, 5) | Screw M4 grub x 5mm |
| 20 | screw(M6_grub_screw, 6.2) | Screw M6 grub x 6.2mm |
| 20 | screw(M6_grub_screw, 9.5) | Screw M6 grub x 9.5mm |
| 4 | screw(M8_cap_screw, 12) | Screw M8 cap x 12mm |
| 4 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
| 4 | washer(M8_washer) | Washer M8 x 17mm x 1.6mm |
Aluminium extrusion.
vitamins/extrusions.scad Object definitions.
vitamins/extrusion.scad Implementation.
tests/extrusions.scad Code for this example.
| Function | Description |
|---|---|
extrusion_center_hole_wd(type) | Diameter of center hole if -ve or square side if +ve |
extrusion_center_square_wd(type) | Size of center square if +ve or tube diameter if -ve |
extrusion_channel_recess(type) | Channel recess width and depth or false in none |
extrusion_channel_width(type) | Channel width |
extrusion_channel_width_internal(type) | Internal channel width |
extrusion_corner_hole_wd(type) | Diameter of corner hole if -ve or square side if +ve |
extrusion_fillet(type) | Radius of corner fillet |
extrusion_height(type) | Height of extrusion |
extrusion_spar_thickness(type) | Spar thickness |
extrusion_tab_thickness(type) | Tab thickness |
extrusion_width(type) | Width of extrusion |
| Function | Description |
|---|---|
extrusion_center_hole(type) | Diameter of center hole or side if square |
extrusion_center_square(type) | Size of center square or tube |
extrusion_corner_hole(type) | Diameter of corner hole or side if square |
| Module | Description |
|---|---|
extrusion(type, length, center = true, cornerHole = true) | Draw the specified extrusion |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | extrusion(E1515, 80, cornerHole = true) | Extrusion E1515 x 80mm |
| 1 | extrusion(E2020, 80, cornerHole = true) | Extrusion E2020 x 80mm |
| 1 | extrusion(E2020t, 80, cornerHole = true) | Extrusion E2020t x 80mm |
| 1 | extrusion(E2040, 80, cornerHole = true) | Extrusion E2040 x 80mm |
| 1 | extrusion(E2060, 80, cornerHole = true) | Extrusion E2060 x 80mm |
| 1 | extrusion(E2080, 80, cornerHole = true) | Extrusion E2080 x 80mm |
| 1 | extrusion(E3030, 80, cornerHole = true) | Extrusion E3030 x 80mm |
| 1 | extrusion(E3060, 80, cornerHole = true) | Extrusion E3060 x 80mm |
| 1 | extrusion(E4040, 80, cornerHole = true) | Extrusion E4040 x 80mm |
| 1 | extrusion(E4040t, 80, cornerHole = true) | Extrusion E4040t x 80mm |
| 1 | extrusion(E4080, 80, cornerHole = true) | Extrusion E4080 x 80mm |
| 1 | extrusion(Makerbeam, 80, cornerHole = true) | Extrusion Makerbeam x 80mm |
| 1 | extrusion(MakerbeamXL, 80, cornerHole = true) | Extrusion MakerbeamXL x 80mm |
Axial fans.
Can draw three styles: solid, open frame and open frame with screw bosses.
vitamins/fans.scad Object definitions.
vitamins/fan.scad Implementation.
tests/fans.scad Code for this example.
| Function | Description |
|---|---|
fan_aperture(type) | Optional diameter for the aperture, which can be bigger than the bore it has flared corners. |
fan_blades(type) | The number of blades |
fan_bore(type) | Diameter of the hole for the blades |
fan_boss_d(type) | Diameter of the screw bosses |
fan_depth(type) | Depth of fan |
fan_hole_pitch(type) | Screw hole pitch |
fan_hub(type) | Diameter of the hub |
fan_outer_diameter(type) | Outside diameter of the frame |
fan_screw(type) | Screw type |
fan_thickness(type) | Thickness of the frame |
fan_width(type) | Width of square |
| Module | Description |
|---|---|
fan(type) | Draw specified fan, origin in the centre |
fan_assembly(type, thickness, include_fan = true, screw = false, full_depth = false) | Fan with its fasteners |
fan_hole_positions(type, z = undef) | Position children at the screw hole positions |
fan_holes(type, poly = false, screws = true, h = 100) | Make all the holes for the fan, or just the aperture if screws is false. Set poly true for poly_holes. |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | fan(fan120x25) | Fan 120mm x 25mm |
| 1 | fan(fan17x8) | Fan 17mm x 8mm |
| 1 | fan(fan25.4x10) | Fan 25.4mm x 10mm |
| 1 | fan(fan30x10) | Fan 30mm x 10mm |
| 1 | fan(fan40x11) | Fan 40mm x 11mm |
| 1 | fan(fan50x15) | Fan 50mm x 15mm |
| 1 | fan(fan60x15) | Fan 60mm x 15mm |
| 1 | fan(fan60x25) | Fan 60mm x 25mm |
| 1 | fan(fan70x15) | Fan 70mm x 15mm |
| 1 | fan(fan80x25) | Fan 80mm x 25mm |
| 1 | fan(fan80x38) | Fan 80mm x 38mm |
| 4 | nut(M2_nut, nyloc = true) | Nut M2 x 1.6mm nyloc |
| 4 | nut(M2p5_nut, nyloc = true) | Nut M2.5 x 2.2mm nyloc |
| 8 | nut(M3_nut, nyloc = true) | Nut M3 x 2.4mm nyloc |
| 28 | nut(M4_nut, nyloc = true) | Nut M4 x 3.2mm nyloc |
| 4 | screw(M2_cap_screw, 16) | Screw M2 cap x 16mm |
| 4 | screw(M2p5_pan_screw, 20) | Screw M2.5 pan x 20mm |
| 8 | screw(M3_dome_screw, 20) | Screw M3 dome x 20mm |
| 20 | screw(M4_dome_screw, 16) | Screw M4 dome x 16mm |
| 4 | screw(M4_dome_screw, 25) | Screw M4 dome x 25mm |
| 4 | screw(M4_dome_screw, 30) | Screw M4 dome x 30mm |
| 8 | washer(M2_washer) | Washer M2 x 5mm x 0.3mm |
| 8 | washer(M2p5_washer) | Washer M2.5 x 5.9mm x 0.5mm |
| 12 | washer(M3_washer) | Washer M3 x 7mm x 0.5mm |
| 32 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
Faston receptacles to mate with spade connectors
vitamins/fastons.scad Object definitions.
vitamins/faston.scad Implementation.
tests/fastons.scad Code for this example.
| Function | Description |
|---|---|
faston_d_bot(type) | Radius of bottom corners |
faston_d_top(type) | Radius of the clips |
faston_fillet_d(type) | Fillets at the transition |
faston_insul_crimp_d(type) | Outside diameter of the insulation crimp |
faston_insul_crimp_l(type) | Length of the insulation crimp |
faston_insul_crimp_o(type) | Offset of insulation crimp |
faston_insul_crimp_p(type) | Position of the tip of the insulation crimp |
faston_size(type) | Size of the receptacle part |
faston_t(type) | Thickness |
faston_wall_h(type) | Height of transition web wall |
faston_width(type) | Width of matching spade |
faston_wire_crimp_d(type) | Outside diameter of the wire crimp |
faston_wire_crimp_l(type) | Length of the wire crimp |
faston_wire_crimp_p(type) | Position of the tip of the wire crimp |
| Function | Description |
|---|---|
faston_insul_stop(type) | Position where insulation stops |
faston_length(type) | Total length of crimp |
| Module | Description |
|---|---|
faston(type, closed = false) | Draw specified faston |

| Qty | Module call | BOM entry |
|---|---|---|
| 4 | faston(5_160430_7) | Faston part no 5_160430_7 to fit 4.75mm spade |
20mm panel mount fuse holder.
vitamins/fuseholder.scad Implementation.
tests/fuseholder.scad Code for this example.
| Function | Description |
|---|---|
fuseholder_diameter() | Outside diameter of flange |
| Module | Description |
|---|---|
fuseholder(thickness) | Fuseholder with nut in place for specified panel thickness |
fuseholder_hole(h = 100) | Hole with flats for fuseholder |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | fuseholder(6) | Fuse holder 20mm |
DC motors with a gearbox
vitamins/gear_motors.scad Object definitions.
vitamins/gear_motor.scad Implementation.
tests/gear_motors.scad Code for this example.
| Function | Description |
|---|---|
gm_boss(type) | Motor boss diameter, corner radius, height and colour |
gm_box(type) | Size, corner radius, colour |
gm_holes(type) | List of hole positions |
gm_hub(type) | Motor hub diameter, height, corner rad |
gm_motor(type) | Motor position, diameter, height, corner rad and colour |
gm_motor_boss(type) | Motor mounting boss on gearbox |
gm_screw(type) | Screw type |
gm_screw_boss(type) | Screw boss diameter and height |
gm_screw_depth(type) | Screw hole depth |
gm_shaft(type) | Shaft diameter, flat width, length, flat length. |
gm_shaft_offset(type) | Offset of shaft from the centre of the gearbox |
gm_tags(type) | Tag size and pitch |
| Function | Description |
|---|---|
gm_box_width(type) | Gearbox width if rectangular or diameter if round |
gm_depth(type) | Motor total depth |
gm_motor_d(type) | Motor diameter |
gm_motor_pos(type) | Motor position relative to centre of the gearbox |
gm_shaft_flat_l(type) | Length of the shaft flat section |
gm_shaft_flat_w(type) | Shaft width across the flat |
gm_shaft_length(type) | Length of the shaft |
gm_shaft_pos(type) | Shaft position |
gm_shaft_r(type) | Shaft radius |
| Module | Description |
|---|---|
gear_motor(type, alpha = 1) | Draw specified gear motor, can be partially transparent to see what is behind it |

Geared tin can steppers
vitamins/geared_steppers.scad Object definitions.
vitamins/geared_stepper.scad Implementation.
tests/geared_steppers.scad Code for this example.
| Function | Description |
|---|---|
gs_boss_d(type) | Boss around the shaft diameter |
gs_boss_h(type) | Boss around the shaft height |
gs_bulge(type) | Plastic bulge width, depth, height, z offset |
gs_bulge2(type) | Plastic rear bulge width, depth, height |
gs_diameter(type) | Can diameter |
gs_flat_length(type) | Shaft flat length |
gs_height(type) | Can height |
gs_hole_d(type) | Screw hole diameter |
gs_lug_t(type) | Screw lug thickness |
gs_lug_w(type) | Screw lug width |
gs_motor(type) | Motor diameter and height if separate from gearbox |
gs_offset(type) | Offset of the shaft from the centre of the can |
gs_pitch(type) | Screw pitch |
gs_radius(type) | Top - or bottom + corner radius |
gs_shaft_d(type) | Shaft diameter |
gs_shaft_flat(type) | Shaft width across the flats |
gs_shaft_length(type) | Shaft length |
gs_wire_d(type) | Wire diameter |
gs_wires(type) | Wire colours and grouping |
| Module | Description |
|---|---|
geared_stepper(type, angle = 0) | Draw the specified geared stepper with optional shaft angle. |
geared_stepper_screw_positions(type) | Place children at the screw positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | geared_stepper(28BYJ_48) | Geared stepper - 28BYJ-48 5V |
| 1 | geared_stepper(35BYGHJ75) | Geared stepper - 35BYGHJ75 0.4A |
Parametric green terminal blocks
vitamins/green_terminals.scad Object definitions.
vitamins/green_terminal.scad Implementation.
tests/green_terminals.scad Code for this example.
| Function | Description |
|---|---|
gt_back_depth(type) | Back ledge depth |
gt_back_height(type) | Height at the back |
gt_box_h(type) | Height of the cable entry box |
gt_box_setback(type) | How far the contact box is set back from the front |
gt_box_w(type) | Width inside the cable entry box |
gt_depth(type) | Total front to back depth |
gt_front_depth(type) | Front ledge depth |
gt_front_height(type) | Height at the front |
gt_front_t(type) | Thickness of frame around the front aperture |
gt_height(type) | Height of the flat top |
gt_pitch(type) | Pitch between terminals |
gt_screw_r(type) | Screw head radius |
gt_top(type) | Depth at the top |
gt_tube_h(type) | Height of optional tubes around the screws |
gt_y_offset(type) | Offset of the pins from centre of the depth |
gt_y_offset2(type) | Offset of the pins from the screws |
| Module | Description |
|---|---|
green_terminal(type, ways, skip = [], colour = "lime") | Draw green terminal blocks, skip can be used to remove pins. |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | green_terminal(gt_5x17, 2) | Terminal block 2 way 5mm |
| 1 | green_terminal(gt_5x11, 3) | Terminal block 3 way 5mm |
| 1 | green_terminal(gt_6p35, 4) | Terminal block 4 way 0.25" |
| 1 | green_terminal(gt_5p08, 5) | Terminal block 5 way 0.2" |
| 1 | green_terminal(gt_3p5, 6) | Terminal block 6 way 3.5mm |
| 1 | green_terminal(gt_2p54, 7) | Terminal block 7 way 0.1" |
Hot end models. The E3D models were originally contributed to Mendel90 by Philippe LUC @philfifi
Needs updating as mostly obsolete versions.
vitamins/hot_ends.scad Object definitions.
vitamins/hot_end.scad Implementation.
tests/hot_ends.scad Code for this example.
| Function | Description |
|---|---|
hot_end_duct_height_fan(type) | Duct height at fan end |
hot_end_duct_height_nozzle(type) | Duct height at nozzle end |
hot_end_duct_offset(type) | Offset of circular duct centre from the nozzle |
hot_end_duct_radius(type) | Require radius to clear the heater block |
hot_end_groove(type) | Groove length |
hot_end_groove_dia(type) | Groove internal diameter |
hot_end_inset(type) | The length that goes into the mounting |
hot_end_insulator_colour(type) | Colour of the insulator |
hot_end_insulator_diameter(type) | Outside diameter |
hot_end_insulator_length(type) | Length of the insulator |
hot_end_part(type) | Description |
hot_end_style(type) | Basic type, jhead or e3d |
hot_end_total_length(type) | Length from nozzle tip to the top |
| Function | Description |
|---|---|
hot_end_length(type) | The amount the hot end extends below its mounting |
hot_end_need_cooling(type) | Has own fan so don't need cooling hole in the duct |
| Module | Description |
|---|---|
hot_end(type, filament, naked = false, resistor_wire_rotate = [0,0,0], bowden = false) | Draw specified hot end |

| Qty | Module call | BOM entry |
|---|---|---|
| 2 | tubing(HSHRNK16) | Heatshrink sleeving ID 1.6mm x 15mm - not shown |
| 4 | tubing(HSHRNK64, 60) | Heatshrink sleeving ID 6.4mm x 60mm |
| 1 | e3d_hot_end(E3Dv5, 3) | Hot end E3D V5 direct 3mm |
| 1 | e3d_hot_end(E3Dv6, 3) | Hot end E3D V6 direct 3mm |
| 1 | e3d_hot_end(E3D_clone, 3) | Hot end E3D clone aliexpress 3mm |
| 1 | jhead_hot_end(JHeadMk5, 3) | Hot end JHead MK5 3mm |
| 2 | tubing(PTFE07, 62) | PTFE sleeving OD 1.2mm ID 0.71mm x 62mm - not shown |
| 2 | tubing(PTFE20, 45) | PTFE sleeving OD 2.6mm ID 2mm x 45mm - not shown |
| 1 | resistor(RIE1212UB5C5R6) | Resistor UB5C 5R6F 5R6 3W vitreous enamel - not shown |
| 1 | Tape self amalgamating silicone 110mm x 25mm | |
| 1 | resistor(Epcos) | Thermistor Epcos B57560G104F 100K 1% - not shown |
| 2 | Wire Red PTFE 16/0.2mm strands, length 170mm | |
| 4 | ziptie(small_ziptie) | Ziptie 2.5mm x 100mm min length |
Parametric PVC HT water pipes commonly found in hardware stores around germany. Great for building weather proof cases for IoT things.
vitamins/ht_pipes.scad Object definitions.
vitamins/ht_pipe.scad Implementation.
tests/HT_pipes.scad Code for this example.
| Function | Description |
|---|---|
pipe_length(type) | Pipe length |
pipe_od(type) | Outside diameter |
pipe_td(type) | T-Pipe diameter |
pipe_wall(type) | Wall thickness |
| Module | Description |
|---|---|
ht_cap(type) | Draw specified cap |
ht_pipe(type) | Draw specified pipe |
ht_tpipe(type) | Draw specified T-pipe |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | ht_cap(HT_110_cap) | PVC Waterpipe - HT 110 cap |
| 1 | ht_pipe(HT_110_pipe_1000) | PVC Waterpipe - HT 110 pipe 1000 mm |
| 1 | ht_pipe(HT_110_pipe_150) | PVC Waterpipe - HT 110 pipe 150 mm |
| 1 | ht_pipe(HT_110_pipe_1500) | PVC Waterpipe - HT 110 pipe 1500 mm |
| 1 | ht_pipe(HT_110_pipe_2000) | PVC Waterpipe - HT 110 pipe 2000 mm |
| 1 | ht_pipe(HT_110_pipe_250) | PVC Waterpipe - HT 110 pipe 250 mm |
| 1 | ht_pipe(HT_110_pipe_500) | PVC Waterpipe - HT 110 pipe 500 mm |
| 1 | ht_cap(HT_125_cap) | PVC Waterpipe - HT 125 cap |
| 1 | ht_pipe(HT_125_pipe_1000) | PVC Waterpipe - HT 125 pipe 1000 mm |
| 1 | ht_pipe(HT_125_pipe_150) | PVC Waterpipe - HT 125 pipe 150 mm |
| 1 | ht_pipe(HT_125_pipe_1500) | PVC Waterpipe - HT 125 pipe 1500 mm |
| 1 | ht_pipe(HT_125_pipe_2000) | PVC Waterpipe - HT 125 pipe 2000 mm |
| 1 | ht_pipe(HT_125_pipe_250) | PVC Waterpipe - HT 125 pipe 250 mm |
| 1 | ht_pipe(HT_125_pipe_500) | PVC Waterpipe - HT 125 pipe 500 mm |
| 1 | ht_cap(HT_160_cap) | PVC Waterpipe - HT 160 cap |
| 1 | ht_pipe(HT_160_pipe_1000) | PVC Waterpipe - HT 160 pipe 1000 mm |
| 1 | ht_pipe(HT_160_pipe_150) | PVC Waterpipe - HT 160 pipe 150 mm |
| 1 | ht_pipe(HT_160_pipe_1500) | PVC Waterpipe - HT 160 pipe 1500 mm |
| 1 | ht_pipe(HT_160_pipe_2000) | PVC Waterpipe - HT 160 pipe 2000 mm |
| 1 | ht_pipe(HT_160_pipe_250) | PVC Waterpipe - HT 160 pipe 250 mm |
| 1 | ht_pipe(HT_160_pipe_500) | PVC Waterpipe - HT 160 pipe 500 mm |
| 1 | ht_cap(HT_32_cap) | PVC Waterpipe - HT 32 cap |
| 1 | ht_pipe(HT_32_pipe_1000) | PVC Waterpipe - HT 32 pipe 1000 mm |
| 1 | ht_pipe(HT_32_pipe_150) | PVC Waterpipe - HT 32 pipe 150 mm |
| 1 | ht_pipe(HT_32_pipe_1500) | PVC Waterpipe - HT 32 pipe 1500 mm |
| 1 | ht_pipe(HT_32_pipe_2000) | PVC Waterpipe - HT 32 pipe 2000 mm |
| 1 | ht_pipe(HT_32_pipe_250) | PVC Waterpipe - HT 32 pipe 250 mm |
| 1 | ht_pipe(HT_32_pipe_500) | PVC Waterpipe - HT 32 pipe 500 mm |
| 1 | ht_cap(HT_40_cap) | PVC Waterpipe - HT 40 cap |
| 1 | ht_pipe(HT_40_pipe_1000) | PVC Waterpipe - HT 40 pipe 1000 mm |
| 1 | ht_pipe(HT_40_pipe_150) | PVC Waterpipe - HT 40 pipe 150 mm |
| 1 | ht_pipe(HT_40_pipe_1500) | PVC Waterpipe - HT 40 pipe 1500 mm |
| 1 | ht_pipe(HT_40_pipe_2000) | PVC Waterpipe - HT 40 pipe 2000 mm |
| 1 | ht_pipe(HT_40_pipe_250) | PVC Waterpipe - HT 40 pipe 250 mm |
| 1 | ht_pipe(HT_40_pipe_500) | PVC Waterpipe - HT 40 pipe 500 mm |
| 1 | ht_tpipe(HT_50_tpipe) | PVC Waterpipe - HT 50 T pipe |
| 1 | ht_cap(HT_50_cap) | PVC Waterpipe - HT 50 cap |
| 1 | ht_pipe(HT_50_pipe_1000) | PVC Waterpipe - HT 50 pipe 1000 mm |
| 1 | ht_pipe(HT_50_pipe_150) | PVC Waterpipe - HT 50 pipe 150 mm |
| 1 | ht_pipe(HT_50_pipe_1500) | PVC Waterpipe - HT 50 pipe 1500 mm |
| 1 | ht_pipe(HT_50_pipe_2000) | PVC Waterpipe - HT 50 pipe 2000 mm |
| 1 | ht_pipe(HT_50_pipe_250) | PVC Waterpipe - HT 50 pipe 250 mm |
| 1 | ht_pipe(HT_50_pipe_500) | PVC Waterpipe - HT 50 pipe 500 mm |
| 1 | ht_tpipe(HT_50_40_tpipe) | PVC Waterpipe - HT 50/40 T pipe |
| 1 | ht_cap(HT_75_cap) | PVC Waterpipe - HT 75 cap |
| 1 | ht_pipe(HT_75_pipe_1000) | PVC Waterpipe - HT 75 pipe 1000 mm |
| 1 | ht_pipe(HT_75_pipe_150) | PVC Waterpipe - HT 75 pipe 150 mm |
| 1 | ht_pipe(HT_75_pipe_1500) | PVC Waterpipe - HT 75 pipe 1500 mm |
| 1 | ht_pipe(HT_75_pipe_2000) | PVC Waterpipe - HT 75 pipe 2000 mm |
| 1 | ht_pipe(HT_75_pipe_250) | PVC Waterpipe - HT 75 pipe 250 mm |
| 1 | ht_pipe(HT_75_pipe_500) | PVC Waterpipe - HT 75 pipe 500 mm |
| 1 | ht_cap(HT_90_cap) | PVC Waterpipe - HT 90 cap |
| 1 | ht_pipe(HT_90_pipe_1000) | PVC Waterpipe - HT 90 pipe 1000 mm |
| 1 | ht_pipe(HT_90_pipe_150) | PVC Waterpipe - HT 90 pipe 150 mm |
| 1 | ht_pipe(HT_90_pipe_1500) | PVC Waterpipe - HT 90 pipe 1500 mm |
| 1 | ht_pipe(HT_90_pipe_2000) | PVC Waterpipe - HT 90 pipe 2000 mm |
| 1 | ht_pipe(HT_90_pipe_250) | PVC Waterpipe - HT 90 pipe 250 mm |
| 1 | ht_pipe(HT_90_pipe_500) | PVC Waterpipe - HT 90 pipe 500 mm |
Mini LCD Celsius Digital Thermometer Hygrometer Temperature Humidity Meter Gauge on eBay
vitamins/hygrometer.scad Implementation.
tests/hygrometer.scad Code for this example.
| Function | Description |
|---|---|
hygrometer_or() | The outside radius of a hygrometer |
| Module | Description |
|---|---|
hygrometer() | Draw a hygrometer |
hygrometer_hole(h = 0) | Drill the hole for a hygrometer |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | hygrometer() | Mini LCD Digital Thermometer / Hygrometer |
IEC mains inlets and outlet.
vitamins/iecs.scad Object definitions.
vitamins/iec.scad Implementation.
tests/IECs.scad Code for this example.
| Function | Description |
|---|---|
iec_bezel_h(type) | Bezel height |
iec_bezel_r(type) | Bezel corner radius |
iec_bezel_t(type) | Bezel thickness |
iec_bezel_w(type) | Bezel width |
iec_body_h(type) | Body height |
iec_body_r(type) | Body corner radius |
iec_body_w(type) | Body width |
iec_body_w2(type) | Body width at the narrow part |
iec_can(type) | If it has a can then the width, height, thickness and total width of the metal flange |
iec_depth(type) | Depth of the body below the flange |
iec_flange_h(type) | Flange height |
iec_flange_r(type) | Flange corner radius |
iec_flange_t(type) | Flange thickness |
iec_flange_w(type) | Flange width not including the lugs |
iec_male(type) | True for an outlet |
iec_part(type) | Description |
iec_pitch(type) | Screw hole pitch |
iec_screw(type) | Screw type |
iec_spades(type) | Spade type |
iec_width(type) | Widest part including the lugs |
| Function | Description |
|---|---|
iec_insert_screw_length() | Screw length used for inserts |
| Module | Description |
|---|---|
iec(type) | Draw specified IEC connector |
iec_assembly(type, thickness) | Assembly with fasteners given panel thickness |
iec_holes(type, h = 100, poly = false, horizontal = false, insert = false) | Drill the required panel holes |
iec_inserts(type) | Place the inserts |
iec_screw_positions(type) | Position children at the screw holes |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | iec(IEC_fused_inlet) | IEC fused inlet JR-101-1F |
| 1 | iec(IEC_fused_inlet2) | IEC fused inlet old |
| 1 | iec(IEC_inlet) | IEC inlet |
| 1 | iec(IEC_yunpen) | IEC inlet filtered |
| 1 | iec(IEC_inlet_atx) | IEC inlet for ATX |
| 1 | iec(IEC_outlet) | IEC outlet RS 811-7193 |
| 1 | iec(IEC_inlet_atx2) | IEC pressfit inlet for ATX |
| 1 | iec(IEC_320_C14_switched_fused_inlet) | IEC320 C14 switched fused inlet module |
| 14 | nut(M3_nut, nyloc = true) | Nut M3 x 2.4mm nyloc |
| 4 | screw(M3_cs_cap_screw, 10) | Screw M3 cs cap x 10mm |
| 10 | screw(M3_cs_cap_screw, 12) | Screw M3 cs cap x 12mm |
| 14 | washer(M3_washer) | Washer M3 x 7mm x 0.5mm |
Heatfit threaded inserts. Can be pushed into thermoplastics using a soldering iron with a conical bit set to 200°C.
vitamins/inserts.scad Object definitions.
vitamins/insert.scad Implementation.
tests/inserts.scad Code for this example.
| Function | Description |
|---|---|
insert_barrel_d(type) | Diameter of the main barrel |
insert_hole_radius(type) | Radius of the required hole in the plastic |
insert_length(type) | Length |
insert_outer_d(type) | Outer diameter at the top |
insert_ring1_h(type) | Height of the top and middle rings |
insert_ring2_d(type) | Diameter of the middle ring |
insert_ring3_d(type) | Diameter of the bottom ring |
insert_screw_diameter(type) | Screw size |
threaded_insert_chamfer(type) | Size of the chamfer for threaded inserts |
threaded_insert_pitch(type) | Pitch of the outer thread for threaded inserts |
| Function | Description |
|---|---|
insert_boss_radius(type, wall) | Compute the outer radius of an insert boss |
insert_hole_length(type) | Length of the insert rounded to layer height |
insert_nose_length(type, d) | The length before the second ring. |
| Module | Description |
|---|---|
insert(type) | Draw specified insert |
insert_boss(type, z, wall = 2 * extrusion_width) | Make a boss to take an insert |
insert_hole(type, counterbore = 0, horizontal = false) | Make a hole to take an insert, counterbore is the extra length for the screw |
insert_lug(insert, wall, counter_bore = 0, extension = 0, corner_r = 0, flying = true) | Make a flying insert lug, see ssr_shroud |
threaded_insert(type) | Draw specified threaded insert, for use in wood |

| Qty | Module call | BOM entry |
|---|---|---|
| 2 | insert(F1BM2) | Heatfit insert M2 x 4mm |
| 1 | insert(CNCKM2p5) | Heatfit insert M2.5 x 4mm |
| 1 | insert(F1BM2p5) | Heatfit insert M2.5 x 5.8mm |
| 1 | insert(CNCKM3) | Heatfit insert M3 x 3mm |
| 1 | insert(F1BM3) | Heatfit insert M3 x 5.8mm |
| 1 | insert(CNCKM4) | Heatfit insert M4 x 4mm |
| 1 | insert(F1BM4) | Heatfit insert M4 x 8.2mm |
| 2 | insert(CNCKM5) | Heatfit insert M5 x 5.8mm |
| 1 | threaded_insert(M10x25) | Threaded insert M10 x 25mm |
| 1 | threaded_insert(M12x30) | Threaded insert M12 x 30mm |
| 1 | threaded_insert(M16x30) | Threaded insert M16 x 30mm |
| 1 | threaded_insert(M3x8) | Threaded insert M3 x 8mm |
| 1 | threaded_insert(M4x10) | Threaded insert M4 x 10mm |
| 1 | threaded_insert(M5x12) | Threaded insert M5 x 12mm |
| 1 | threaded_insert(M6x15) | Threaded insert M6 x 15mm |
| 1 | threaded_insert(M8x18) | Threaded insert M8 x 18mm |
4mm jack sockets and binding posts. Each has a colour for the BOM entry and an optional alternative colour for display. E.g. a "brown" socket for mains live needs to be displayed as "sienna" to look realistic.
vitamins/jack.scad Implementation.
tests/jack.scad Code for this example.
| Function | Description |
|---|---|
jack_4mm_flange_radius() | 4mm jack socket flange radius |
jack_4mm_hole_radius() | Panel hole radius for 4mm jack |
jack_4mm_plastic_flange_radius() | 4mm plastic jack socket flange radius |
jack_4mm_shielded_hole_radius() | Panel hole radius for 4mm shielded jack |
jack_4mm_shielded_nut_radius() | Largest diameter of 4mm shielded jack |
post_4mm_diameter() | Outer diameter of 4mm binding post |
power_jack_radius() | Power jack socket flange radius |
| Module | Description |
|---|---|
jack_4mm(colour, thickness, display_colour = false) | Draw a 4mm jack socket with nut positioned for specified panel thickness |
jack_4mm_plastic(colour, thickness, display_colour = false) | Draw a 4mm plastic jack socket with nut positioned for specified panel thickness |
jack_4mm_shielded(colour, thickness, display_colour = false) | Draw a 4mm shielded jack |
post_4mm(colour, thickness, display_colour = false) | Draw a 4mm binding post |
post_4mm_hole(h = 100, poly = false) | Drill hole for 4mm binding post |
power_jack(thickness) | Draw a power jack socket with nut positioned for specified panel thickness |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | post_4mm("red", 3) | 4mm jack binding post red |
| 1 | jack_4mm("blue", 3, "royalblue") | 4mm jack socket blue |
| 1 | jack_4mm_plastic("[0.2, 0.2, 0.2]", 3, [0.2, 0.2, 0.2]) | 4mm plastic jack socket [0.2, 0.2, 0.2] |
| 1 | jack_4mm_shielded("brown", 3, "sienna") | 4mm shielded jack socket brown |
| 1 | power_jack() | Power jack socket |
Light dependent resistors.
Larger ones seem to have both a higher dark resistance and a lower bright light resistance.
vitamins/ldrs.scad Object definitions.
vitamins/ldr.scad Implementation.
tests/LDRs.scad Code for this example.
| Function | Description |
|---|---|
ldr_active(type) | The active width |
ldr_description(type) | Description |
ldr_diameter(type) | The diameter of the round bit |
ldr_lead_d(type) | The lead diameter |
ldr_pitch(type) | Pitch between the leads |
ldr_thickness(type) | Thickness |
ldr_width(type) | Across the flats |
| Module | Description |
|---|---|
LDR(type, lead_length = 3) | Draw an LDR, can specify the lead length |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | ldr(large_ldr) | Light dependent resistor - large |
| 1 | ldr(small_ldr) | Light dependent resistor - small |
Nuts for leadscrews.
vitamins/leadnuts.scad Object definitions.
vitamins/leadnut.scad Implementation.
tests/leadnuts.scad Code for this example.
| Function | Description |
|---|---|
leadnut_bore(type) | Thread size |
leadnut_colour(type) | The colour |
leadnut_flange_dia(type) | Flange diameter |
leadnut_flange_offset(type) | Offset of the flange from the top |
leadnut_flange_t(type) | Flange thickness |
leadnut_flat(type) | Flat section width |
leadnut_height(type) | Total height |
leadnut_hole_dia(type) | The diameter of the screw holes |
leadnut_hole_pitch(type) | The radial pitch of the screw holes |
leadnut_holes(type) | The number of screw holes |
leadnut_lead(type) | Screw lead |
leadnut_od(type) | Outer diameter of the shank |
leadnut_pitch(type) | Screw pitch |
leadnut_screw(type) | The type of the fixing screws |
leadnuthousing_height(type) | Height of housing |
leadnuthousing_hole_pos(type) | Offset from center for nut hole |
leadnuthousing_length(type) | Length of housing |
leadnuthousing_mount_screw(type) | Mounting screw |
leadnuthousing_mount_screw_len(type) | Mounting screw length |
leadnuthousing_nut(type) | Nut type this is suitable for |
leadnuthousing_nut_screw_length(type) | Length of mounting screw for nut |
leadnuthousing_screw_dist_l(type) | Distance between mounting holes length |
leadnuthousing_screw_dist_w(type) | Distance between mounting holes width |
leadnuthousing_width(type) | Width of housing |
| Function | Description |
|---|---|
leadnut_shank(type) | The length of the shank below the flange |
| Module | Description |
|---|---|
leadnut(type) | Draw specified leadnut |
leadnut_screw_positions(type) | Position children at the screw holes |
leadnuthousing(type) | Nut housing, to connect a lead nut to another object |
leadnuthousing_nut_position(type) | The position of the nut may be off-center, use this to get the position |
leadnuthousing_nut_screw_positions(type) | get screw positions to mount the nut to the nut housing |
leadnuthousing_screw_positions(type) | Get screw positions to mount the leadnut housing |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | nuthousing(LNHT8x2) | Lead Screw Nut Housing T8 |
| 2 | leadnut(LSN8x2) | Leadscrew nut 8 x 2 |
| 1 | leadnut(LSN8x8) | Leadscrew nut 8 x 8 RobotDigg |
| 1 | leadnut(SFU1610) | Leadscrew nut for SFU1610 |
| 4 | screw(M3_cap_screw, 15) | Screw M3 cap x 15mm |
LED voltmeter and ammeter modules available from China and a printed bezel that allows the voltmeter to be mounted into a CNC cut panel. The meter is held in the bezel by melting the stakes with a soldering iron set to 200°C. The bezel is fixed in the panel with hot glue.
The 7 SEGMENT.TTF font from the docs directory needs to be installed to get realistic digits.
vitamins/led_meters.scad Object definitions.
vitamins/led_meter.scad Implementation.
tests/LED_meters.scad Code for this example.
| Function | Description |
|---|---|
meter_hole_pitch(type) | Lug hole pitch |
meter_hole_radius(type) | Lug hole radius |
meter_lug_offset(type) | Lug position, 0 = center, +1 = top |
meter_lug_size(type) | Lug length and width |
meter_offset(type) | Display position, 0 = center, +1 = top |
meter_pcb_size(type) | PCB size excluding lugs |
meter_shunt(type) | Ammeter shunt wire |
meter_size(type) | Size of display |
| Function | Description |
|---|---|
meter_bezel_length(type) | Printed bezel length |
meter_bezel_rad(type) | Printed bezel corner radius |
meter_bezel_wall(type) | Printed bezel wall thickness |
meter_bezel_width(type) | Printed bezel width |
meter_shunt_y(type) | Shunt y coordinate |
| Module | Description |
|---|---|
meter(type, colour = "red", value = "888", display_colour = false) | Draw a meter with optional colour and display value |
meter_assembly(type, colour = "red", value = "888", display_colour = false) | Meter assembled into the bezel |
meter_bezel(type) | Generate the STL for the meter bezel |
meter_bezel_hole(type, h = 100) | Make a hole to fit the meter Bezel |
meter_hole_positions(type) | Position children over the holes |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | meter(led_ameter, colour = "blue") | LED ammeter blue |
| 1 | meter(led_meter, colour = "blue") | LED voltmeter blue |
| 1 | meter(led_meter) | LED voltmeter red |
| Qty | Filename |
|---|---|
| 1 | meter_bezel.stl |
Standard domed through hole LEDs. Can specify colour and lead length.
vitamins/leds.scad Object definitions.
vitamins/led.scad Implementation.
tests/LEDs.scad Code for this example.
| Function | Description |
|---|---|
led_diameter(type) | Body diameter |
led_height(type) | Body height |
led_lead_t(type) | Lead thickness |
led_pitch(type) | Lead pitch |
led_rim_dia(type) | Rim diameter |
led_rim_t(type) | Rim height |
| Function | Description |
|---|---|
led_hole_radius(type) | Radius of panel hole to accept LED |
led_radius(type) | Radius |
| Module | Description |
|---|---|
led(type, colour = "red", lead = 5, right_angle = 0) | Draw specified LED with desired colour and lead length |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | led(LED10mm, "orange") | LED 10 mm orange |
| 1 | led(LED3mm, "green") | LED 3 mm green |
| 1 | led(LED5mm, "blue") | LED 5 mm blue |
| 1 | led(LED8mm) | LED 8 mm red |
| 1 | led(LED5x2mm, "green") | LED [5, 2] mm green |
LED strip lights that can be cut to size.
The definitions are for the full length but they can be cut to size by specifying how many segments,
which can by calculated using light_strip_segments(type, max_length).
The light_strip_clip() module makes a clip to go around the light that can be incorporated into a printed bracket to hold it.
vitamins/light_strips.scad Object definitions.
vitamins/light_strip.scad Implementation.
tests/light_strips.scad Code for this example.
| Function | Description |
|---|---|
light_strip_aperture(type) | Inside width |
light_strip_depth(type) | Outside depth |
light_strip_grouped(type) | Number of LEDs in each group |
light_strip_leds(type) | Total number of LEDs |
light_strip_length(type) | Un-cut length |
light_strip_pcb_thickness(type) | PCB thickness |
light_strip_thickness(type) | Metal thickness |
light_strip_width(type) | Outside width |
| Function | Description |
|---|---|
light_strip_clip_depth(light) | Depth of the clip |
light_strip_clip_length(light) | Outside length of clip |
light_strip_clip_slot(light) | Clip slot size |
light_strip_clip_wall() | Clip wall thickness |
light_strip_clip_width(light) | Outside width of clip |
light_strip_cut_length(type, segs) | Calculate cut length given segments |
light_strip_segments(type, max_length) | Calculate the maximum number of segments that fit in max_length |
| Module | Description |
|---|---|
light_strip(type, segs = undef) | Draw specified light strip, segs can be used to limit the length |
light_strip_clip(light) | Make a clip to go over the strip to be incorporated into a bracket |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | light_strip(Rigid5050, 6) | Light strip rigid SMD5050 low profile x 250mm (6 segments) |
| 1 | light_strip(RIGID5050, 6) | Light strip rigid SMD5050 x 250mm (6 segments) |
LMnUU linear bearings.
vitamins/linear_bearings.scad Object definitions.
vitamins/linear_bearing.scad Implementation.
tests/linear_bearings.scad Code for this example.
| Function | Description |
|---|---|
bearing_dia(type) | Outside diameter |
bearing_groove_dia(type) | Groove diameter |
bearing_groove_length(type) | Groove length |
bearing_groove_spacing(type) | Spacing between grooves, outer to outer, ie includes the grooves themselves |
bearing_length(type) | Total length |
bearing_rod_dia(type) | Internal diameter |
open_bearing_width(type) | For open bearings, the width of the opening at the rod |
| Function | Description |
|---|---|
bearing_radius(type) | Outside radius |
open_bearing_theta(type) | For open bearings, the angle of the opening |
| Module | Description |
|---|---|
linear_bearing(type) | Draw specified linear bearing |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | linear_bearing(LM10LUU) | Linear bearing LM10LUU |
| 1 | linear_bearing(LM10UU) | Linear bearing LM10UU |
| 1 | linear_bearing(LM12LUU) | Linear bearing LM12LUU |
| 1 | linear_bearing(LM12UU) | Linear bearing LM12UU |
| 1 | linear_bearing(LM16LUU) | Linear bearing LM16LUU |
| 1 | linear_bearing(LM16UU) | Linear bearing LM16UU |
| 1 | linear_bearing(LM16UUOP) | Linear bearing LM16UUOP |
| 1 | linear_bearing(LM3LUU) | Linear bearing LM3LUU |
| 1 | linear_bearing(LM3UU) | Linear bearing LM3UU |
| 1 | linear_bearing(LM4LUU) | Linear bearing LM4LUU |
| 1 | linear_bearing(LM4UU) | Linear bearing LM4UU |
| 1 | linear_bearing(LM5LUU) | Linear bearing LM5LUU |
| 1 | linear_bearing(LM5UU) | Linear bearing LM5UU |
| 1 | linear_bearing(LM6LUU) | Linear bearing LM6LUU |
| 1 | linear_bearing(LM6UU) | Linear bearing LM6UU |
| 1 | linear_bearing(LM8LUU) | Linear bearing LM8LUU |
| 1 | linear_bearing(LM8UU) | Linear bearing LM8UU |
Cylindrical and ring magnets.
vitamins/magnets.scad Object definitions.
vitamins/magnet.scad Implementation.
tests/magnets.scad Code for this example.
| Function | Description |
|---|---|
magnet_h(type) | Height |
magnet_id(type) | Inside diameter if a ring |
magnet_name(type) | Name |
magnet_od(type) | Outer diameter |
magnet_r(type) | Corner radius |
| Module | Description |
|---|---|
magnet(type) | Draw specified magnet |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | magnet(MAG484) | Magnet, 6.35mm diameter, 6.35mm high, 3.175mm bore |
| 1 | magnet(MAG8x4x4p2) | Magnet, 8mm diameter, 4mm high, 4.2mm bore |
| 1 | magnet(MAG5x8) | Magnet, 8mm diameter, 5mm high |
| 1 | magnet(MAGRE6x2p5) | Radial encoder magnet, 6mm diameter, 2.5mm high |
UK 13A sockets at the moment.
vitamins/mains_sockets.scad Object definitions.
vitamins/mains_socket.scad Implementation.
tests/mains_sockets.scad Code for this example.
| Function | Description |
|---|---|
mains_socket_corner(type) | Corner radius |
mains_socket_counterbore(type) | Screw counterbore |
mains_socket_depth(type) | Depth at the base |
mains_socket_height(type) | Height |
mains_socket_offset(type) | Offset of the socket from the centre |
mains_socket_pitch(type) | Screw hole pitch |
mains_socket_t(type) | Plastic thickness |
mains_socket_top_d(type) | Depth at the top, might be tapered |
mains_socket_top_w(type) | Width at the top, might be tapered |
mains_socket_width(type) | Width at the base |
| Function | Description |
|---|---|
mains_socket_screw(type) | Screw type |
| Module | Description |
|---|---|
mains_socket(type) | Draw specified 13A socket |
mains_socket_earth_position(type) | Position of earth terminal for DiBond panel |
mains_socket_hole_positions(type) | Position children at the screw holes |
mains_socket_holes(type, h = 0, earth = true, small = false) | Panel cutout |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | mains_socket(Contactum) | Mains socket 13A |
| 1 | mains_socket(PMS9143A) | Mains socket 13A |
| 1 | mains_socket(MKLOGIC) | Mains socket 13A, switched |
Used for limit switches. Currently only the button type is supported as the lever and roller types are less accurate.
The origin of the switch is in the center of the body. microswitch_button_pos() is the offset to tip of the button at its operating point.
The switch is drawn with the button at the nominal operation point. This actual trigger point can be plus or minus microswitch_op_tol(type).
When the button is released it comes out by a maximum of microswitch_fp_max(type) from the nominal operating point.
vitamins/microswitches.scad Object definitions.
vitamins/microswitch.scad Implementation.
tests/microswitches.scad Code for this example.
| Function | Description |
|---|---|
microswitch_body_clr(type) | Body colour |
microswitch_button_clr(type) | Button colour |
microswitch_button_pos(type) | Button position at operating point |
microswitch_button_t(type) | Button thickness |
microswitch_button_w(type) | Button width |
microswitch_fp_max(type) | Free position maximum |
microswitch_hole_d(type) | Screw hole diameter |
microswitch_holes(type) | Hole positions |
microswitch_leg(type) | Leg types |
microswitch_legs(type) | Leg positions |
microswitch_length(type) | Body length |
microswitch_op_tol(type) | Operating position +/- tolerance |
microswitch_radius(type) | Body corner radius |
microswitch_thickness(type) | Body thickness |
microswitch_width(type) | Body width |
| Function | Description |
|---|---|
microswitch_lower_extent(type) | How far legs extend downwards |
microswitch_right_extent(type) | How far legs extend right |
microswitch_size(type) | Body size |
| Module | Description |
|---|---|
microswitch(type) | Draw specified microswitch |
microswitch_hole_positions(type) | Place children at the hole positions |
microswitch_wire_positions(type, skip = undef) | Place children at the leg hole positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | microswitch(small_microswitch) | Microswitch DM1-00P-110-3 |
| 1 | microswitch(medium_microswitch) | Microswitch SS-01 or SS-5GL |
| 1 | microswitch(large_microswitch) | Microswitch Saia G3 low force |
Microview OLED display with on board AVR by geekammo / Sparkfun.
microview() generates the model. microview(true) makes an object to cut out a panel aperture for it.
Uses STL files copyright geekammo and licenced with MIT license, see microview/LICENSE.txt.
vitamins/microview.scad Implementation.
tests/microview.scad Code for this example.
| Module | Description |
|---|---|
microview(cutout = false) | Draw microview or generate a panel cutout for it |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | microview() | Microview OLED display |
Random screw down modules. Currently just DROK buck converters.
vitamins/modules.scad Object definitions.
vitamins/module.scad Implementation.
tests/modules.scad Code for this example.
| Function | Description |
|---|---|
mod_height(type) | Body height |
mod_hole_r(type) | Screw hole radius |
mod_holes(type) | Screw hole positions |
mod_length(type) | Body length |
mod_part(type) | Description |
mod_screw(type) | Screw type |
mod_screw_z(type) | Thickness of screw lug |
mod_width(type) | Body width |
| Module | Description |
|---|---|
mod(type) | Draw specified module |
mod_screw_positions(type) | Position children at the screw positions |
module_assembly(type, thickness) | Module with its fasteners in place |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | mod(drok_buck) | Drok buck converter |
| 2 | nut(M4_nut, nyloc = true) | Nut M4 x 3.2mm nyloc |
| 2 | screw(M4_dome_screw, 12) | Screw M4 dome x 12mm |
| 4 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
Default is steel but can be drawn as brass or nylon. A utility for making nut traps included.
If a nut is given a child then it gets placed on its top surface.
The following diagram shows you the parameters for drawing a sliding_t_nut:

vitamins/nuts.scad Object definitions.
vitamins/nut.scad Implementation.
tests/nuts.scad Code for this example.
| Function | Description |
|---|---|
nut_dome(type) | Dome height and max thread depth if a domed acorn nut |
nut_pitch(type) | Pitch if not standard metric course thread |
nut_radius(type) | Radius across the corners |
nut_size(type) | Diameter of the corresponding screw |
nut_square_size(type) | Diameter of the corresponding screw |
nut_square_thickness(type) | Thickness of the square nut |
nut_square_width(type) | Width of the square nut |
nut_trap_depth(type) | Depth of nut trap |
nut_washer(type) | Corresponding washer |
nut_weld_base_r(type) | Weld nut base radius |
nut_weld_base_t(type) | Weld nut base thickness |
| Function | Description |
|---|---|
nut_dome_height(type) | Height of the domed version |
nut_flat_radius(type) | Radius across the flats |
nut_thickness(type, nyloc = false) | Thickness of plain or nyloc version |
nut_thread_depth(type) | Max thread depth in domed version |
nut_trap_flat_radius(nut, horizontal = false) | Radius across the flats of a nut trap |
nut_trap_radius(nut, horizontal = false) | Radius across the corners of a nut trap |
t_nut_tab(type) | Sliding t-nut T dimensions |
| Module | Description |
|---|---|
nut(type, nyloc = false, brass = false, nylon = false, dome = false) | Draw specified nut |
nut_and_washer(type, nyloc) | Draw nut with corresponding washer |
nut_square(type, brass = false, nylon = false) | Draw specified square nut |
nut_trap(screw, nut, depth = 0, horizontal = false, supported = false, h = 200) | Make a nut trap |
sliding_ball_t_nut(size, w, h, r) | Draw a sliding ball t nut |
sliding_t_nut(type) | Draw a sliding T nut, T nut with a spring loaded ball or a hammer nut. |
weld_nut(type) | draw a weld nut |
wingnut(type) | Draw a wingnut |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | nut(M2_nut) | Nut M2 x 1.6mm |
| 1 | nut(M2_nut, nyloc = true) | Nut M2 x 1.6mm nyloc |
| 1 | nut(M2p5_nut) | Nut M2.5 x 2.2mm |
| 1 | nut(M2p5_nut, nyloc = true) | Nut M2.5 x 2.2mm nyloc |
| 1 | nut(M2p5_nut, nylon = true) | Nut M2.5 x 2.2mm nylon |
| 1 | sliding_t_nut(M3_hammer_nut) | Nut M3 hammer |
| 1 | sliding_t_nut(M3_sliding_t_nut) | Nut M3 sliding T |
| 1 | nut(M3_nut) | Nut M3 x 2.4mm |
| 1 | nut(M3_nut, brass = true) | Nut M3 x 2.4mm brass |
| 1 | nut(M3_nut, dome = true) | Nut M3 x 2.4mm domed |
| 1 | nut(M3_nut, nyloc = true) | Nut M3 x 2.4mm nyloc |
| 1 | nut(M3nS_thin_nut) | Nut M3nS 5.5 x 1.8mm |
| 1 | sliding_t_nut(M4_hammer_nut) | Nut M4 hammer |
| 1 | sliding_t_nut(M4_sliding_t_nut) | Nut M4 sliding T |
| 1 | nut(M4_nut) | Nut M4 x 3.2mm |
| 1 | nut(M4_nut, dome = true) | Nut M4 x 3.2mm domed |
| 1 | nut(M4_nut, nyloc = true) | Nut M4 x 3.2mm nyloc |
| 1 | nut(M4nS_thin_nut) | Nut M4nS 7 x 2.2mm |
| 1 | sliding_t_nut(M5_sliding_t_nut) | Nut M5 sliding T |
| 1 | nut(M5_nut) | Nut M5 x 4mm |
| 1 | nut(M5_nut, dome = true) | Nut M5 x 4mm domed |
| 1 | nut(M5_nut, nyloc = true) | Nut M5 x 4mm nyloc |
| 1 | nut(M5nS_thin_nut) | Nut M5nS 8 x 2.7mm |
| 1 | sliding_t_nut(M6_sliding_t_nut) | Nut M6 hammer |
| 1 | nut(M6_half_nut) | Nut M6 x 3mm |
| 1 | nut(M6_nut) | Nut M6 x 5mm |
| 1 | nut(M6_nut, dome = true) | Nut M6 x 5mm domed |
| 1 | nut(M6_nut, nyloc = true) | Nut M6 x 5mm nyloc |
| 1 | nut(M6nS_thin_nut) | Nut M6nS 10 x 3.2mm |
| 1 | sliding_t_nut(M8_sliding_ball_t_nut) | Nut M8 sliding T with spring loaded ball |
| 1 | nut(M8_nut) | Nut M8 x 6.5mm |
| 1 | nut(M8_nut, dome = true) | Nut M8 x 6.5mm domed |
| 1 | nut(M8_nut, nyloc = true) | Nut M8 x 6.5mm nyloc |
| 1 | nut(M8nS_thin_nut) | Nut M8nS 13 x 4mm |
| 1 | washer(M6_washer) | Washer M6 x 12.5mm x 1.5mm |
| 1 | weld nut(M4_weld_nut) | Weld Nut M4 |
| 1 | weld nut(M6_weld_nut) | Weld Nut M6 |
| 1 | wingnut(M4_wingnut) | Wingnut M4 |
Nitrile rubber O-rings.
Just a black torus specified by internal diameter, id and minor_d plus a BOM entry.
Can be shown stretched by specifying the actual_id.
vitamins/o_ring.scad Implementation.
tests/o_ring.scad Code for this example.
| Module | Description |
|---|---|
O_ring(id, minor_d, actual_id = 0) | Draw O-ring with specified internal diameter and minor diameter. actual_id can be used to stretch it around something. |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | O_ring(2.5, 1.6) | O-ring nitrile 2.5mm x 1.6mm |
Nicodrone OpenGrab V3 electro-permanent magnet, see https://kb.zubax.com/display/MAINKB/OpenGrab+EPM+v3.
A permanent magnet that can be magnetized and de-magnetized electronically.
vitamins/opengrab.scad Implementation.
tests/opengrab.scad Code for this example.
| Function | Description |
|---|---|
opengrab_depth() | Module height |
opengrab_pcb() | The PCB |
opengrab_pcb_z() | PCB offset from the front |
opengrab_screw_depth() | Max screw depth in pillars |
opengrab_target_thickness() | Target sheet thickness |
opengrab_width() | Module width |
| Module | Description |
|---|---|
opengrab() | Draw OpenGrab module |
opengrab_hole_positions() | Position children at the screw positions |
opengrab_side_hole_positions() | Position children at the two 4mm hole |
opengrab_target() | Draw OpenGrab target |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | opengrab() | OpenGrab V3 electro permanent magnet |
| 1 | opengrab_target() | OpenGrab silicon steel target plate |
Panel mounted digital meter modules
Notes on the DSN_VC288:
vitamins/panel_meters.scad Object definitions.
vitamins/panel_meter.scad Implementation.
tests/panel_meters.scad Code for this example.
| Function | Description |
|---|---|
pmeter_aperture(type) | Aperture length, width and bevel |
pmeter_bevel(type) | Bezel bevel inset and start height or a radius |
pmeter_bezel(type) | Bezel size |
pmeter_bezel_r(type) | Bezel radius |
pmeter_button_colour(type) | Button colour |
pmeter_button_pos(type) | Button position |
pmeter_button_r(type) | Button radius |
pmeter_button_size(type) | Button size |
pmeter_buttons(type) | List of buttons |
pmeter_inner_ap(type) | Inner aperture |
pmeter_inner_ap_o(type) | Inner aperture offset |
pmeter_pcb(type) | Optional PCB for open types |
pmeter_pcb_h(type) | Component height from the front |
pmeter_pcb_z(type) | Distance of PCB from the back |
pmeter_size(type) | Body size including bezel height |
pmeter_tab(type) | Tab size |
pmeter_tab_z(type) | Tab vertical position |
pmeter_thickness(type) | Wall thickness if not closed |
| Function | Description |
|---|---|
pmeter_depth(type) | Depth below bezel |
| Module | Description |
|---|---|
panel_meter(type) | Draw panel mounted LCD meter module |
panel_meter_button(type) | Draw panel meter button |
panel_meter_cutout(type, h = 0) | Make panel cutout |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | panel_meter(DSN_VC288) | DSN-VC288 DC 100V 10A Voltmeter ammeter |
| 1 | panel_meter(PZEM001) | Peacefair PZEM-001 AC digital multi-function meter |
| 1 | panel_meter(PZEM021) | Peacefair PZEM-021 AC digital multi-function meter |
| 1 | panel_meter(DSP5005) | Ruideng DSP5005 Power supply module |
PCBs and perfboard with optional components. The shape can be a rectangle with optionally rounded corners or a polygon for odd shapes like Arduino.
vitamins/pcb.scad Implementation.
tests/PCB.scad Code for this example.
| Function | Description |
|---|---|
ff_back(type) | Flat flex back section size |
ff_latch(type) | Flat flex latch size |
ff_mid(type) | Flat flex middle section size |
ff_slot(type) | Flat flex slot size |
hdmi_depth(type) | Front to back depth |
hdmi_height(type) | Outside height above the PCB |
hdmi_height1(type) | Inside height at the sides |
hdmi_height2(type) | Inside height in the middle |
hdmi_thickness(type) | Wall thickness of the metal |
hdmi_width1(type) | Inside width at the top |
hdmi_width2(type) | Inside width at the bottom |
pcb_accessories(type) | List of accessories to go on the BOM, SD cards, USB cables, etc. |
pcb_colour(type) | Colour of the substrate |
pcb_components(type) | List of components |
pcb_grid(type) | Grid origin if a perfboard |
pcb_hole_d(type) | Mounting hole diameter |
pcb_holes(type) | List of hole positions |
pcb_land_d(type) | Pad around mounting hole |
pcb_length(type) | Length |
pcb_name(type) | Description |
pcb_parts_on_bom(type) | True if the parts should be separate BOM items |
pcb_polygon(type) | Optional outline polygon for odd shaped boards |
pcb_radius(type) | Corner radius |
pcb_thickness(type) | Thickness |
pcb_width(type) | Width |
| Function | Description |
|---|---|
pcb(name, desc, size, corner_r = 0, hole_d = 0, land_d = 0, colour = "green", parts_on_bom = false, holes = [], components = [], accessories = [], grid = undef, polygon = undef, screw = undef) | Constructor |
pcb_component(type, name, index = 0) | Return the component specified by name and index |
pcb_component_position(type, name, index = 0) | Return x y position of specified component |
pcb_coord(type, p) | Convert offsets from the edge to coordinates relative to the centre |
pcb_grid_pos(type, x, y, z = 0, i = 0) | Returns a pcb grid position |
pcb_screw(type, cap = hs_cap) | Mounting screw type |
pcb_size(type) | Length, width and thickness in a vector |
| Module | Description |
|---|---|
barrel_jack(cutout = false) | Draw barrel power jack |
block(size, colour, makes_cutout, cutouts, r = 0, rtop = 0) | Draw a coloured cube to represent a random PCB component |
buzzer(height, diameter, colour) | Draw PCB buzzer with specified height, diameter and colour |
chip(length, width, thickness, colour, cutout = false) | Draw a coloured cube to represent a chip, or other rectangular component, or cylinder if width is zero |
flat_flex(type, cutout = false) | Draw flat flexistrip connector as used on RPI0 |
flex(cutout = false) | Draw flexistrip connector |
hdmi(type, cutout = false) | Draw HDMI socket |
jack(cutout = false) | Draw 3.5mm jack |
molex_254(ways, right_angle = 0, skip = undef) | Draw molex KK header, set right_angle to 1 for normal right angle version or -1 for inverted right angle version. |
molex_254_housing(ways) | Draw a Molex KK housing |
molex_usb_Ax1(cutout) | Draw Molex USB A connector suitable for perf board |
molex_usb_Ax2(cutout) | Draw Molex dual USB A connector suitable for perf board |
pcb(type) | Draw specified PCB |
pcb_assembly(type, height, thickness) | Draw PCB assembly with spaces and fasteners in place |
pcb_base(type, height, thickness, wall = 2) | Generate STL for a base with PCB spacers |
pcb_component(comp, cutouts = false, angle = undef) | Draw pcb component from description |
pcb_component_position(type, name) | Position child at the specified component position |
pcb_components(type, cutouts = false, angle = undef) | Draw list of PCB components on the PCB |
pcb_cutouts(type, angle = undef) | Make cut outs to clear components on a PCB |
pcb_grid(type, x, y, z = 0, i = 0) | Positions children at specified grid position |
pcb_grid_components(type, components, cutouts = false, angle = undef) | Draw list of components on the PCB grid for perf board |
pcb_screw_positions(type) | Positions children at the mounting hole positions |
pcb_spacer(screw, height, wall = 1.8, taper = 0) | Generate STL for PCB spacer |
rj45(cutout = false) | Draw RJ45 Ethernet connector |
standoff(h, d, h2, d2) | Draw a standoff |
terminal_35(ways, colour = "blue") | Draw 3.5mm terminal block |
trimpot10(vertical, cutout = false) | Draw a ten turn trimpot |
uSD(size, cutout = false) | Draw uSD socket |
usb_Ax1(cutout = false) | Draw USB type A single socket |
usb_Ax2(cutout = false) | Draw USB type A dual socket |
usb_B(cutout = false) | Draw USB B connector |
usb_C(cutout = false) | Draw USB C connector |
usb_miniA(cutout = false) | Draw USB mini A connector |
usb_uA(cutout = false) | Draw USB micro A connector |
usb_vAx1(cutout = false) | Draw a vertical USB type A single socket |
vero_pin(cropped = false) | Draw a vero pin |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | potentiometer(BTT_encoder) | BTT_encoder |
| 1 | box_header(2p54header, 4, 2) | Box header 4 x 2 |
| 1 | box_header(2p54header, 4, 2, right_angle = true) | Box header 4 x 2 right angle |
| 1 | rd_disc(10mm_disc, "1nF Y2") | Ceramic capacitor, 10mm_disc 1nF Y2 |
| 1 | rd_disc(6p4mm_disc, "100n") | Ceramic capacitor, 6p4mm_disc 100n |
| 1 | rd_cm_choke(ATX_CM_CHOKE ,"3.5mH") | Common mode choke 3.5mH |
| 1 | rd_xtal(ACT1100, "40MHz") | Crystal ACT1100 40MHz |
| 1 | rd_xtal(ACT1700, "80MHz") | Crystal ACT1700 80MHz |
| 1 | rd_xtal(C_002RX, "60KHz") | Crystal C_002RX 60KHz |
| 1 | rd_xtal(HC49, "4MHz") | Crystal HC49 4MHz |
| 1 | rd_xtal(HC49_4H, "10MHz") | Crystal HC49_4H 10MHz |
| 1 | d_plug(DCONN9, pcb = true) | D-type 9 way PCB mount plug |
| 1 | dil_socket(12, 15.24) | DIL socket 24 x 0.6" |
| 1 | smd_diode(DO214AC, "SS34") | DO214AC package SS34 |
| 2 | ax_diode(DO_41, "1N4007") | Diode 1N4007 |
| 2 | ax_diode(DO_35, "1N4148") | Diode 1N4148 |
| 1 | rd_electrolytic(ECAP8x12, "220uF35V") | Electolytic capacitor ECAP8x12 220uF35V |
| 1 | hdmi(hdmi_full) | HDMI socket |
| 1 | pdip(24, 27C32, w = 15.24) | IC 27C32 PDIP24 |
| 1 | pdip(8, NE555) | IC NE555 PDIP8 |
| 1 | idc_transition(2p54header, 5) | IDC transition header 5 x 2 |
| 1 | smd_inductor(IND2525 ,"4R7") | IND2525 package 4R7 |
| 1 | jst_xh_header(jst_ph_header, 2) | JST PH connector 2 way |
| 1 | jst_xh_header(jst_xh_header, 2) | JST XH connector 2 way |
| 1 | jst_xh_header(jst_zh_header, 2) | JST ZH connector 2 way |
| 1 | potentiometer(KY_040_encoder) | KY_040_encoder |
| 1 | led(LED10mm, "yellow") | LED 10 mm yellow |
| 1 | led(LED3mm) | LED 3 mm red |
| 1 | led(LED5mm, "orange") | LED 5 mm orange |
| 1 | led(LED8mm, "blue") | LED 8 mm blue |
| 1 | microswitch(small_microswitch) | Microswitch DM1-00P-110-3 |
| 1 | hdmi(hdmi_mini) | Mini HDMI socket |
| 1 | molex_254(2) | Molex KK header 2 way |
| 1 | molex_254(2, right_angle = 1) | Molex KK header 2 way right angle |
| 1 | molex_254(2, right_angle = -1) | Molex KK header 2 way right angle |
| 1 | pin_header(2p54header, 4, 1) | Pin header 4 x 1 |
| 1 | pin_header(2p54header, 5, 1) | Pin header 5 x 1 |
| 1 | pin_header(2p54header, 5, 1, right_angle = true) | Pin header 5 x 1 right_angle |
| 1 | pin_socket(2p54header, 4, 1) | Pin socket 4 x 1 |
| 1 | pin_socket(2p54header, 6, 1) | Pin socket 6 x 1 |
| 2 | pin_socket(2p54header, 8, 1) | Pin socket 8 x 1 |
| 1 | rd_coil(IND16x10 ,"4.7uH") | Radial inductor 16x10 4.7uH |
| 1 | rd_transistor(TO92, "78L05") | Regulator TO92 78L05 |
| 1 | rd_module(HF33F, "012-HSL-3F") | Relay HF33F / 012-HSL-3F |
| 1 | ax_res(res1_2, 10, tol = 10) | Resistor 10 Ohms 10% 0.5W |
| 1 | ax_res(res1_4, 100, tol = 2) | Resistor 100 Ohms 2% 0.25W |
| 1 | ax_res(res1_8, 1000) | Resistor 1000 Ohms 5% 0.125W |
| 1 | ax_res(res1_4, 10000) | Resistor 10000 Ohms 5% 0.25W |
| 1 | ax_res(res1_2, 100000) | Resistor 100000 Ohms 5% 0.5W |
| 1 | ax_res(res1_8, 1e+6, tol = 1) | Resistor 1e+6 Ohms 1% 0.125W |
| 1 | smd_led(LED0603, "orange") | SMD LED 0603 orange |
| 1 | smd_led(LED0805, "red") | SMD LED 0805 red |
| 1 | smd_led(LED1206, "blue") | SMD LED 1306 blue |
| 1 | smd_tant(TANT_A, value = "105e") | SMD Tantalum capacitor package A ,1uF, 2.5V |
| 1 | smd_tant(TANT_B, value = "106A") | SMD Tantalum capacitor package B ,10uF, 10V |
| 1 | smd_tant(TANT_C, value = "107C") | SMD Tantalum capacitor package C ,100uF, 16V |
| 1 | smd_capacitor(CAP0402, value = "10nF") | SMD capacitor 0402 10nF |
| 1 | smd_capacitor(CAP0502, value = "10nF") | SMD capacitor 0502 10nF |
| 1 | smd_capacitor(CAP0603, value = "10nF") | SMD capacitor 0603 10nF |
| 1 | smd_capacitor(CAP0805, value = "100nF") | SMD capacitor 0805 100nF |
| 1 | smd_capacitor(CAP1206, value = "1uF") | SMD capacitor 1206 1uF |
| 1 | smd_qfp(QFP50P1200X1200X160_64N, "ATSAM4S4BA") | SMD chip: ATSAM4S4BA, package : QFP50P1200X1200X160_64N |
| 1 | smd_resistor(L2012C, 1u) | SMD choke 0805 1u |
| 1 | smd_coax(U_FL_R_SMT_1) | SMD coax connector type: U_FL_R_SMT_1 |
| 1 | smd_250V_fuse(OMT250, "2A 250V") | SMD fuse: OMT250 2A 250V |
| 1 | smd_resistor(RES0402, 1) | SMD resistor 0402 1 0.0625W |
| 1 | smd_resistor(RES0502, 10) | SMD resistor 0502 10 0.05W |
| 1 | smd_resistor(RES0603, 100) | SMD resistor 0603 100 0.1W |
| 1 | smd_resistor(RES0805, 1K) | SMD resistor 0805 1K 0.125W |
| 1 | smd_resistor(RES1206, 1M) | SMD resistor 1206 1M 0.25W |
| 1 | smd_soic(SOIC14, "74HC00") | SOIC14 package 74HC00 |
| 1 | smd_soic(SOIC16, "ICL323") | SOIC16 package ICL323 |
| 1 | smd_soic(SOIC18, "PIC18F88") | SOIC18 package PIC18F88 |
| 1 | smd_soic(SOIC8, "M34063") | SOIC8 package M34063 |
| 1 | smd_sot(SOT223, "LM117") | SOT223 package LM117 |
| 1 | smd_sot(SOT23, "2N7000") | SOT23 package 2N7000 |
| 1 | square_button(button_4p5mm) | Square button 4.5mm |
| 1 | square_button(button_6mm) | Square button 6mm |
| 1 | smd_pot(TC33X1, "10K") | TC33X1 package 10K |
| 1 | pcb(TMC2130) | TMC2130 |
| 1 | green_terminal(gt_5p08, 2) | Terminal block 2 way 0.2" |
| 2 | green_terminal(gt_6p35, 2) | Terminal block 2 way 0.25" |
| 1 | green_terminal(gt_5x17, 2) | Terminal block 2 way 5mm |
| 2 | green_terminal(gt_2p54, 3) | Terminal block 3 way 0.1" |
| 1 | terminal_35(3) | Terminal block 3 way 3.5mm |
| 1 | green_terminal(gt_5x11, 3) | Terminal block 3 way 5mm |
| 1 | green_terminal(gt_5x17, 3) | Terminal block 3 way 5mm |
| 2 | green_terminal(gt_3p5, 4) | Terminal block 4 way 3.5mm |
| 1 | terminal_35(4) | Terminal block 4 way 3.5mm |
| 1 | pcb(test_pcb) | Test PCB |
| 1 | rd_transistor(E_LINE, "ZTX853") | Transistor E_LINE ZTX853 |
| 1 | rd_disc(ERZV07D471, "471") | Varistor, ERZV07D471 471 |
| 2 | vero_pin() | Vero board pin |
| 1 | wire_link(0.8, 5.08, h = 10.16) | Wire link 0.8mm x 0.2" |
| 1 | wire_link(0.8, 10.16) | Wire link 0.8mm x 0.4" |
| 1 | wire_link(0.8, 10.16, h = 0.75, sleeve = [1.5, "red"]) | Wire link 0.8mm x 0.4" with red sleeving |
| 1 | wire_link(0.8, 0, h = 5) | Wire link 0.8mm x 8mm |
| 1 | rd_boxc(BOXC18x5x11, "X2 rated film capacitor", "0.1uF 250V" ) | X2 rated film capacitor 0.1uF 250V |
| 1 | rd_boxc(BOXC18x10x16, "X2 rated film capacitor", "0.47uF 250V" ) | X2 rated film capacitor 0.47uF 250V |
PCBs and perfboard with optional components. The shape can be a rectangle with optionally rounded corners or a polygon for odd shapes like Arduino.
vitamins/pcbs.scad Object definitions.
vitamins/pcb.scad Implementation.
tests/PCBs.scad Code for this example.
| Function | Description |
|---|---|
ff_back(type) | Flat flex back section size |
ff_latch(type) | Flat flex latch size |
ff_mid(type) | Flat flex middle section size |
ff_slot(type) | Flat flex slot size |
hdmi_depth(type) | Front to back depth |
hdmi_height(type) | Outside height above the PCB |
hdmi_height1(type) | Inside height at the sides |
hdmi_height2(type) | Inside height in the middle |
hdmi_thickness(type) | Wall thickness of the metal |
hdmi_width1(type) | Inside width at the top |
hdmi_width2(type) | Inside width at the bottom |
pcb_accessories(type) | List of accessories to go on the BOM, SD cards, USB cables, etc. |
pcb_colour(type) | Colour of the substrate |
pcb_components(type) | List of components |
pcb_grid(type) | Grid origin if a perfboard |
pcb_hole_d(type) | Mounting hole diameter |
pcb_holes(type) | List of hole positions |
pcb_land_d(type) | Pad around mounting hole |
pcb_length(type) | Length |
pcb_name(type) | Description |
pcb_parts_on_bom(type) | True if the parts should be separate BOM items |
pcb_polygon(type) | Optional outline polygon for odd shaped boards |
pcb_radius(type) | Corner radius |
pcb_thickness(type) | Thickness |
pcb_width(type) | Width |
| Function | Description |
|---|---|
pcb(name, desc, size, corner_r = 0, hole_d = 0, land_d = 0, colour = "green", parts_on_bom = false, holes = [], components = [], accessories = [], grid = undef, polygon = undef, screw = undef) | Constructor |
pcb_component(type, name, index = 0) | Return the component specified by name and index |
pcb_component_position(type, name, index = 0) | Return x y position of specified component |
pcb_coord(type, p) | Convert offsets from the edge to coordinates relative to the centre |
pcb_grid_pos(type, x, y, z = 0, i = 0) | Returns a pcb grid position |
pcb_screw(type, cap = hs_cap) | Mounting screw type |
pcb_size(type) | Length, width and thickness in a vector |
| Module | Description |
|---|---|
barrel_jack(cutout = false) | Draw barrel power jack |
block(size, colour, makes_cutout, cutouts, r = 0, rtop = 0) | Draw a coloured cube to represent a random PCB component |
buzzer(height, diameter, colour) | Draw PCB buzzer with specified height, diameter and colour |
chip(length, width, thickness, colour, cutout = false) | Draw a coloured cube to represent a chip, or other rectangular component, or cylinder if width is zero |
flat_flex(type, cutout = false) | Draw flat flexistrip connector as used on RPI0 |
flex(cutout = false) | Draw flexistrip connector |
hdmi(type, cutout = false) | Draw HDMI socket |
jack(cutout = false) | Draw 3.5mm jack |
molex_254(ways, right_angle = 0, skip = undef) | Draw molex KK header, set right_angle to 1 for normal right angle version or -1 for inverted right angle version. |
molex_254_housing(ways) | Draw a Molex KK housing |
molex_usb_Ax1(cutout) | Draw Molex USB A connector suitable for perf board |
molex_usb_Ax2(cutout) | Draw Molex dual USB A connector suitable for perf board |
pcb(type) | Draw specified PCB |
pcb_assembly(type, height, thickness) | Draw PCB assembly with spaces and fasteners in place |
pcb_base(type, height, thickness, wall = 2) | Generate STL for a base with PCB spacers |
pcb_component(comp, cutouts = false, angle = undef) | Draw pcb component from description |
pcb_component_position(type, name) | Position child at the specified component position |
pcb_components(type, cutouts = false, angle = undef) | Draw list of PCB components on the PCB |
pcb_cutouts(type, angle = undef) | Make cut outs to clear components on a PCB |
pcb_grid(type, x, y, z = 0, i = 0) | Positions children at specified grid position |
pcb_grid_components(type, components, cutouts = false, angle = undef) | Draw list of components on the PCB grid for perf board |
pcb_screw_positions(type) | Positions children at the mounting hole positions |
pcb_spacer(screw, height, wall = 1.8, taper = 0) | Generate STL for PCB spacer |
rj45(cutout = false) | Draw RJ45 Ethernet connector |
standoff(h, d, h2, d2) | Draw a standoff |
terminal_35(ways, colour = "blue") | Draw 3.5mm terminal block |
trimpot10(vertical, cutout = false) | Draw a ten turn trimpot |
uSD(size, cutout = false) | Draw uSD socket |
usb_Ax1(cutout = false) | Draw USB type A single socket |
usb_Ax2(cutout = false) | Draw USB type A dual socket |
usb_B(cutout = false) | Draw USB B connector |
usb_C(cutout = false) | Draw USB C connector |
usb_miniA(cutout = false) | Draw USB mini A connector |
usb_uA(cutout = false) | Draw USB micro A connector |
usb_vAx1(cutout = false) | Draw a vertical USB type A single socket |
vero_pin(cropped = false) | Draw a vero pin |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | pcb(Feather405) | Adafruit Feather 405 |
| 1 | pcb(ArduinoLeonardo) | Arduino Leonardo |
| 1 | pcb(ArduinoNano) | Arduino Nano |
| 1 | pcb(ArduinoUno3) | Arduino Uno R3 |
| 1 | pcb(BTT_RELAY_V1_2) | BigTreeTech Relay Module v1.2 |
| 1 | pcb(BTT_SKR_E3_TURBO) | BigTreeTech SKR E3 Turbo |
| 1 | pcb(BTT_SKR_MINI_E3_V2_0) | BigTreeTech SKR Mini E3 v2.0 |
| 1 | pcb(BTT_SKR_V1_4_TURBO) | BigTreeTech SKR v1.4 Turbo |
| 1 | pcb(BlackPill) | Black Pill |
| 1 | Cat 5 patch cable 300mm | |
| 1 | d_plug(DCONN15, pcb = true) | D-type 15 way PCB mount plug - not shown |
| 1 | pcb(DuetE) | Duet 2 Ethernet electronics |
| 1 | pcb(Duex2) | Duex2 expansion board - not shown |
| 1 | pcb(Duex5) | Duex5 expansion board |
| 1 | pcb(ESP_01) | ESP-01 |
| 1 | pcb(ESP_01M) | ESP-01M WiFi module (ESP8285) |
| 1 | pcb(ESP_12F) | ESP-12F ESP8266 WiFi module |
| 1 | pcb(ESP_201) | ESP-201 ESP8266 WiFi module |
| 1 | pcb(ESP32_DOIT_V1) | ESP32 DOIT DEV KIT V1 |
| 1 | pcb(EnviroPlus) | Enviro+ |
| 1 | pcb(ExtruderPCB) | Extruder connection PCB - not shown |
| 1 | pcb(HW803_1WAY_RELAY) | HW-803 5V 1 way relay module |
| 1 | pcb(I2C_LCD_Backpack) | I2C / SPI character LCD backpack |
| 1 | pcb(KY_040) | KY-040 rotart encoder breakout |
| 1 | pcb(Keyes5p1) | Keyes5.1 Arduino Uno expansion board - not shown |
| 1 | pcb(L9110S) | L9110S 2-Channel motor driver module |
| 1 | pcb(LIPO_fuel_gauge) | LIPO fuel gauge |
| 1 | pcb(MP1584EN) | MP1584EN 3A buck converter |
| 1 | pcb(MT3608) | MT3608 boost converter module |
| 1 | pcb(MELLOW_FLY_D5) | Mellow FLY D5 |
| 1 | pcb(Melzi) | Melzi electronics - not shown |
| 6 | Micro SD card | |
| 1 | Micro SD card - not shown | |
| 1 | pcb(RCWL-0516) | Microwave Radar Sensor |
| 1 | molex_254(2) | Molex KK header 2 way - not shown |
| 1 | molex_254(3) | Molex KK header 3 way - not shown |
| 20 | nut(M2_nut, nyloc = true) | Nut M2 x 1.6mm nyloc |
| 38 | nut(M2p5_nut, nyloc = true) | Nut M2.5 x 2.2mm nyloc |
| 52 | nut(M3_nut, nyloc = true) | Nut M3 x 2.4mm nyloc |
| 8 | nut(M4_nut, nyloc = true) | Nut M4 x 3.2mm nyloc |
| 1 | pcb(OPZ2) | Orange Pi Zero 2 |
| 1 | pcb(PI_IO) | PI_IO V2 - not shown |
| 1 | pcb(PSU12V1A) | PSU 12V 1A - not shown |
| 1 | pcb(PanelDue_v3) | Panel Due v3.0a LCD Display interface |
| 1 | pcb(PERF60x40) | Perfboard 60 x 40mm |
| 1 | pcb(PERF70x30) | Perfboard 70 x 30mm |
| 1 | pcb(PERF70x50) | Perfboard 70 x 50mm |
| 1 | pcb(PERF70x51) | Perfboard 70 x 51mm |
| 1 | pcb(PERF74x51) | Perfboard 74 x 51mm |
| 1 | pcb(PERF80x20) | Perfboard 80 x 20mm |
| 1 | pin_socket(2p54header, 13, 2, right_angle = true) | Pin socket 13 x 2 right_angle - not shown |
| 1 | pcb(RAMPSEndstop) | RAMPS Endstop Switch |
| 1 | pcb(RPI3) | Raspberry Pi 3 |
| 1 | pcb(RPI3A) | Raspberry Pi 3 A+ |
| 1 | pcb(RPI4) | Raspberry Pi 4 |
| 1 | pcb(RPI_Pico) | Raspberry Pi Pico |
| 1 | pcb(RPI0) | Raspberry Pi Zero |
| 8 | screw(M2_cap_screw, 16) | Screw M2 cap x 16mm |
| 8 | screw(M2_cap_screw, 20) | Screw M2 cap x 20mm |
| 4 | screw(M2_cap_screw, 25) | Screw M2 cap x 25mm |
| 2 | screw(M2p5_cap_screw, 20) | Screw M2.5 cap x 20mm |
| 8 | screw(M2p5_cap_screw, 30) | Screw M2.5 cap x 30mm |
| 4 | screw(M2p5_cap_screw, 35) | Screw M2.5 cap x 35mm |
| 8 | screw(M2p5_cap_screw, 40) | Screw M2.5 cap x 40mm |
| 4 | screw(M2p5_dome_screw, 25) | Screw M2.5 dome x 25mm |
| 4 | screw(M2p5_pan_screw, 20) | Screw M2.5 pan x 20mm |
| 4 | screw(M2p5_pan_screw, 30) | Screw M2.5 pan x 30mm |
| 4 | screw(M2p5_pan_screw, 35) | Screw M2.5 pan x 35mm |
| 18 | screw(M3_cap_screw, 16) | Screw M3 cap x 16mm |
| 18 | screw(M3_cap_screw, 20) | Screw M3 cap x 20mm |
| 5 | screw(M3_cap_screw, 25) | Screw M3 cap x 25mm |
| 11 | screw(M3_cap_screw, 35) | Screw M3 cap x 35mm |
| 8 | screw(M4_cap_screw, 25) | Screw M4 cap x 25mm |
| 1 | pcb(XIAO) | Seeeduino XIAO |
| 1 | pcb(9DOF_stick) | Sparkfun 9 degrees of freedom IMU |
| 1 | pcb(TP4056) | TP4056 Li-lon Battery charger module |
| 3 | terminal_35(2) | Terminal block 2 way 3.5mm - not shown |
| 2 | green_terminal(gt_2p54, 4) | Terminal block 4 way 0.1" - not shown |
| 1 | USB A to Mini B lead - not shown | |
| 1 | pcb(tiny_buck) | Ultra Small 3A buck regulator |
| 1 | pcb(WD2002SJ) | WD2002SJ Buck Boost DC-DC converter |
| 20 | washer(M2_washer) | Washer M2 x 5mm x 0.3mm |
| 38 | washer(M2p5_washer) | Washer M2.5 x 5.9mm x 0.5mm |
| 52 | washer(M3_washer) | Washer M3 x 7mm x 0.5mm |
| 8 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
| 1 | pcb(ZC_A0591) | ZC-A0591 ULN2003 driver PCB |
| Qty | Filename |
|---|---|
| 4 | pcb_spacer20100.stl |
| 4 | pcb_spacer20160.stl |
| 4 | pcb_spacer2070.stl |
| 4 | pcb_spacer2080.stl |
| 4 | pcb_spacer2090.stl |
| 2 | pcb_spacer25110.stl |
| 4 | pcb_spacer25150.stl |
| 4 | pcb_spacer25190.stl |
| 4 | pcb_spacer25200.stl |
| 4 | pcb_spacer25210_2.stl |
| 4 | pcb_spacer25220_2.stl |
| 4 | pcb_spacer25260.stl |
| 4 | pcb_spacer25270.stl |
| 4 | pcb_spacer25280.stl |
| 4 | pcb_spacer2580.stl |
| 1 | pcb_spacer30130.stl |
| 4 | pcb_spacer30140.stl |
| 4 | pcb_spacer30230.stl |
| 4 | pcb_spacer30240.stl |
| 3 | pcb_spacer30250.stl |
| 10 | pcb_spacer3050.stl |
| 8 | pcb_spacer3060.stl |
| 9 | pcb_spacer3070.stl |
| 5 | pcb_spacer3080.stl |
| 4 | pcb_spacer3090.stl |
| 4 | pcb_spacer40100.stl |
| 4 | pcb_spacer40110.stl |
Photo interrupter modules popular in robot kits and from China.
vitamins/photo_interrupters.scad Object definitions.
vitamins/photo_interrupter.scad Implementation.
tests/photo_interrupters.scad Code for this example.
| Function | Description |
|---|---|
pi_base_height(type) | Height of the base |
pi_base_length(type) | Length of the base |
pi_base_width(type) | Width of the base |
pi_color(type) | Color of photo interrupter |
pi_gap_height(type) | Height of the gap where the light can be interrupted |
pi_gap_width(type) | Width of the gap |
pi_hole_diameter(type) | Diameter of the mounting holes |
pi_pcb(type) | Parameter for the support PCB, created with pi_pcb |
pi_stem_width(type) | Width of the stems |
| Module | Description |
|---|---|
photo_interrupter(type) | Draw the photo interrupter, with PCB |
pi_cutout(type) | Shape to subtract for fitting a photo interrupter |
pi_hole_locations(type) | Locations of photo interrupter mounting holes |
pi_pcb(type) | Draw the support PCB |
pi_pcb_hole_locations(pcb) | Locations of the PCB holes |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | photo_interrupter(PH1) | PH1 Photo interrupter |
Threaded pillars. Each end can be male or female.
vitamins/pillars.scad Object definitions.
vitamins/pillar.scad Implementation.
tests/pillars.scad Code for this example.
| Function | Description |
|---|---|
pillar_bot_thread(type) | Bottom thread length, + for male, - for female |
pillar_chamfered(type) | True if pillar is chamfered |
pillar_height(type) | Body height |
pillar_i_colour(type) | Colour of the inner part |
pillar_id(type) | Inner diameter of metal part |
pillar_ifn(type) | Inner number of sides, 6 for hex, 0 for smooth cylinder |
pillar_name(type) | Name of part |
pillar_o_colour(type) | Colour of the outer part |
pillar_od(type) | Outer diameter of body |
pillar_ofn(type) | Outer number of sides, 6 for hex, 0 for smooth cylinder |
pillar_thread(type) | Thread diameter |
pillar_top_thread(type) | Top thread length, + for male, - for female |
| Module | Description |
|---|---|
pillar(type) | Draw specified pillar |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | pillar(M3x13_hex_pillar) | Pillar hex M/F M3x13 |
| 1 | pillar(M3x20_hex_pillar) | Pillar hex M/F M3x20 |
| 1 | pillar(M3x6_hex_pillar) | Pillar hex M/F M3x6 |
| 1 | pillar(M3x10_nylon_hex_pillar) | Pillar hex nylon M/F M3x10 |
| 1 | pillar(M3x20_nylon_hex_pillar) | Pillar hex nylon M/F M3x20 |
| 1 | pillar(M2x16_brass_pillar) | Pillar nurled F/M M2x16 |
| 1 | pillar(M3x20_nylon_pillar) | Pillar nylon M/F M3x20 |
| 1 | pillar(M4x17_nylon_pillar) | Pillar nylon M/F M4x20 |
KP pillow block bearings
vitamins/pillow_blocks.scad Object definitions.
vitamins/pillow_block.scad Implementation.
tests/pillow_blocks.scad Code for this example.
| Function | Description |
|---|---|
kp_base_height(type) | Height of base containing the bolts |
kp_diameter(type) | Rod hole diameter |
kp_hole_offset(type) | Rod hole offset |
kp_screw_separation(type) | Separation of bolts in the base |
| Function | Description |
|---|---|
kp_size(type) | Size of bracket |
| Module | Description |
|---|---|
kp_pillow_block(type) | Draw the KP pillow block |
kp_pillow_block_assembly(type, part_thickness = 2, screw_type = M5_cap_screw, nut_type = undef) | Assembly with fasteners in place |
kp_pillow_block_hole_positions(type) | Place children at hole positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | kp_pillow_block(KP000) | KP000 pillow block |
| 1 | kp_pillow_block(KP001) | KP001 pillow block |
| 1 | kp_pillow_block(KP08_15) | KP08_15 pillow block |
| 1 | kp_pillow_block(KP08_18) | KP08_18 pillow block |
| 2 | sliding_t_nut(M4_hammer_nut) | Nut M4 hammer |
| 2 | sliding_t_nut(M4_sliding_t_nut) | Nut M4 sliding T |
| 2 | sliding_t_nut(M5_sliding_t_nut) | Nut M5 sliding T |
| 2 | nut(M5_nut, nyloc = undef) | Nut M5 x 4mm |
| 4 | screw(M4_cap_screw, 10) | Screw M4 cap x 10mm |
| 4 | screw(M5_cap_screw, 12) | Screw M5 cap x 12mm |
| 4 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
| 6 | washer(M5_washer) | Washer M5 x 10mm x 1mm |
Pin headers and sockets, etc.
vitamins/pin_headers.scad Object definitions.
vitamins/pin_header.scad Implementation.
tests/pin_headers.scad Code for this example.
| Function | Description |
|---|---|
hdr_base_colour(type) | Header insulator colour |
hdr_box_size(type) | Box header outside dimensions |
hdr_box_wall(type) | Box header wall thickness |
hdr_pin_below(type) | Header pin length underneath |
hdr_pin_colour(type) | Header pin colour |
hdr_pin_length(type) | Header pin length |
hdr_pin_width(type) | Header pin size |
hdr_pitch(type) | Header pitch |
hdr_ra_box_offset(type) | Offset between back of the box and the pins |
hdr_ra_height(type) | Height of right angle connector |
hdr_socket_depth(type) | Socket depth for female housing |
hdr_y_offset(type) | Y offset of pins from center of the box |
| Module | Description |
|---|---|
box_header(type, cols = 1, rows = 1, smt = false, cutout = false, right_angle = false) | Draw box header |
idc_transition(type, cols = 5, skip = [], cutout = false) | Draw IDC transition header |
jst_xh_header(type, pin_count, right_angle = false, colour = false, pin_colour = false, smt = false) | Draw JST XH, PH or ZH connector |
pin(type, length = undef, colour = undef) | Draw a header pin |
pin_header(type, cols = 1, rows = 1, smt = false, right_angle = false, cutout = false, colour) | Draw pin header |
pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, smt = false, cutout = false, colour) | Draw pin socket |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | box_header(2p54header, 10, 2) | Box header 10 x 2 |
| 1 | box_header(2p54header, 10, 2, right_angle = true) | Box header 10 x 2 right angle |
| 1 | box_header(2p54header, 8, 1) | Box header 8 x 1 |
| 1 | box_header(2p54header, 8, 1, right_angle = true) | Box header 8 x 1 right angle |
| 1 | idc_transition(2p54header, 10) | IDC transition header 10 x 2 |
| 1 | jst_xh_header(jst_ph_header, 2) | JST PH connector 2 way |
| 1 | jst_xh_header(jst_ph_header, 2, right_angle = true) | JST PH connector 2 way right_angle |
| 1 | jst_xh_header(jst_ph_header, 5) | JST PH connector 5 way |
| 1 | jst_xh_header(jst_ph_header, 5, right_angle = true) | JST PH connector 5 way right_angle |
| 1 | jst_xh_header(jst_xh_header, 2) | JST XH connector 2 way |
| 1 | jst_xh_header(jst_xh_header, 2, right_angle = true) | JST XH connector 2 way right_angle |
| 1 | jst_xh_header(jst_xh_header, 5) | JST XH connector 5 way |
| 1 | jst_xh_header(jst_xh_header, 5, right_angle = true) | JST XH connector 5 way right_angle |
| 1 | jst_xh_header(jst_zh_header, 2) | JST ZH connector 2 way |
| 1 | jst_xh_header(jst_zh_header, 2, right_angle = true) | JST ZH connector 2 way right_angle |
| 1 | jst_xh_header(jst_zh_header, 5) | JST ZH connector 5 way |
| 1 | jst_xh_header(jst_zh_header, 5, right_angle = true) | JST ZH connector 5 way right_angle |
| 1 | pin_header(2p54header, 10, 2) | Pin header 10 x 2 |
| 1 | pin_header(2p54header, 3, 1, right_angle = true) | Pin header 3 x 1 right_angle |
| 1 | pin_header(2p54header, 3, 2, right_angle = true) | Pin header 3 x 2 right_angle |
| 1 | pin_header(2p54header, 3, 3, right_angle = true) | Pin header 3 x 3 right_angle |
| 1 | pin_header(2p54header, 8, 1) | Pin header 8 x 1 |
| 1 | pin_socket(2p54header, 10, 2) | Pin socket 10 x 2 |
| 1 | pin_socket(2p54header, 3, 1, right_angle = true) | Pin socket 3 x 1 right_angle |
| 1 | pin_socket(2p54header, 3, 2, right_angle = true) | Pin socket 3 x 2 right_angle |
| 1 | pin_socket(2p54header, 3, 3, right_angle = true) | Pin socket 3 x 3 right_angle |
| 1 | pin_socket(2p54header, 8, 1) | Pin socket 8 x 1 |
Potentiometers and rotary encoders
vitamins/potentiometers.scad Object definitions.
vitamins/potentiometer.scad Implementation.
tests/potentiometers.scad Code for this example.
| Function | Description |
|---|---|
pot_body(type) | Body diameter or width & depth, height and corner radius |
pot_boss_d(type) | Boss diameter |
pot_boss_h(type) | Boss height |
pot_face(type) | Faceplate rib width, plate depth and plate height |
pot_gangs(type) | Number of gangs for mult-gang pot |
pot_neck(type) | Diameter and length of the shaft neck |
pot_nut(type) | Across flat diameter and thickness of the nut |
pot_shaft(type) | Diameter, flat diameter, length and flat/slot length and colour. If flat diameter is less than the radius then it is a slot width |
pot_spigot(type) | Spigot width, length and height above the boss |
pot_spigot_x(type) | Spigot offset from the shaft centre |
pot_thread_d(type) | Nomininal thread diameter |
pot_thread_h(type) | Height of threaded part |
pot_thread_p(type) | Thread pitch |
pot_wafer(type) | Width, diameter and thickness of the track wafer plus true if curved |
pot_washer(type) | Outside diameter and thickness of the washer |
| Function | Description |
|---|---|
pot_size(type) | Get pot body dimensions |
pot_z(type, washer = true) | Ideal distance behind panel surface to get the nut and washer on comfortably |
| Module | Description |
|---|---|
pot_nut(type, washer = true) | Draw the nut for a potentiometer and possibly a washer |
potentiometer(type, thickness = 3, shaft_length = undef, value = false) | Draw a potentiometer with nut spaced by specified thickness |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | potentiometer(BTT_encoder) | BTT_encoder |
| 1 | potentiometer(KY_040_encoder) | KY_040_encoder |
| 1 | potentiometer(imperial_pot) | Potentiometer imperial_pot |
| 1 | potentiometer(imperial_pot_x2) | Potentiometer imperial_pot_x2 |
| 1 | potentiometer(metric_pot) | Potentiometer metric_pot |
Power supplies. Can be a simple cube or can be defined by a list of six faces, each with thickness, holes, cutouts, etc.
Face order is bottom, top, left, right, front, back.
vitamins/psus.scad Object definitions.
vitamins/psu.scad Implementation.
tests/PSUs.scad Code for this example.
| Function | Description |
|---|---|
atx_psu(type) | True if an ATX style PSU |
psu_accessories(type) | Accessories to add to BOM, e.g. mains lead |
psu_face_cutout(type) | Panel cutout to accommodate this face, e.g. for ATX |
psu_face_cutouts(type) | List of polygons to remove |
psu_face_fan(type) | Fan x,y position and type |
psu_face_grill(type) | Is this face a grill |
psu_face_holes(type) | List of screw hole positions |
psu_face_iec(type) | IEC connector x,y, rotation and type |
psu_face_switch(type) | Rocker switch x,y, rotation and type |
psu_face_thickness(type) | The thickness |
psu_face_vents(type) | Vents array position x,y, rotation, size and corner radius |
psu_faces(type) | List of face descriptions |
psu_height(type) | Height |
psu_left_bay(type) | Bay for terminals |
psu_length(type) | Length |
psu_name(type) | The part name |
psu_pcb(type) | The PCB |
psu_right_bay(type) | Bay for heatsink |
psu_screw(type) | Screw type |
psu_screw_hole_radius(type) | Clearance hole for screw, bigger than normal on ATX |
psu_terminals(type) | How many terminals and the y offset from the back |
psu_width(type) | Width |
| Function | Description |
|---|---|
psu_face_transform(type, face) | Returns a transformation matrix to get to the specified face |
psu_size(type) | Size |
| Module | Description |
|---|---|
atx_psu_cutout(type, face = f_front) | Cut out for the rear of an ATX, which is actually f_front! |
psu(type) | Draw a power supply |
psu_screw_positions(type, face = undef) | Position children at the screw positions on the preferred mounting face, which can be overridden. |

| Qty | Module call | BOM entry |
|---|---|---|
| 2 | IEC mains lead | |
| 1 | psu(ATX500) | PSU ATX500 |
| 1 | psu(ATX300) | PSU FSP300-60GHX |
| 1 | psu(KY240W) | PSU KY-240W-12-L - not shown |
| 1 | psu(NG_CB_200W_24V) | PSU NIUGUY CB-200W-24V |
| 1 | psu(NG_CB_500W_24V) | PSU NIUGUY CB-500W-24V |
| 1 | psu(PD_150_12) | PSU PD-150-12 |
| 1 | psu(S_250_48) | PSU S-250-48 |
| 1 | psu(S_300_12) | PSU S-300-12 |
| 9 | screw(No632_pan_screw, 8) | Screw 6-32 pan x 8mm |
| 8 | screw(M3_pan_screw, 8) | Screw M3 pan x 8mm |
| 4 | screw(M4_cap_screw, 8) | Screw M4 cap x 8mm |
| 8 | washer(M3_washer) | Washer M3 x 7mm x 0.5mm |
| 13 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
Timing belt pulleys, both toothed and plain with internal bearings for idlers.
vitamins/pulleys.scad Object definitions.
vitamins/pulley.scad Implementation.
tests/pulleys.scad Code for this example.
| Function | Description |
|---|---|
pulley_belt(type) | Belt type |
pulley_bore(type) | Bore diameter for shaft |
pulley_flange_dia(type) | Flange diameter |
pulley_flange_thickness(type) | Flange thickness |
pulley_hub_dia(type) | Hub diameter |
pulley_hub_length(type) | Hub length |
pulley_od(type) | Outer diameter |
pulley_screw(type) | Grub screw type |
pulley_screw_length(type) | Grub screw length |
pulley_screw_z(type) | Grub screw position |
pulley_screws(type) | Number of grub screws |
pulley_teeth(type) | Number of teeth |
pulley_type(type) | Part description |
pulley_width(type) | Width of teeth / belt channel |
| Function | Description |
|---|---|
pulley_extent(type) | Largest diameter |
pulley_height(type) | Total height of pulley |
pulley_ir(type) | Inside radius of the teeth |
pulley_offset(type) | Offset of the belt path centre |
pulley_pr(type, belt = undef) | Pitch radius, belt only needed for non-standard belt over smooth pulleys |
| Module | Description |
|---|---|
pulley(type, colour = silver) | Draw a pulley, any children are placed above. |
pulley_assembly(type, colour = silver) | Draw a pulley with its grub screws in place |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | pulley(GT2x16_pulley_9) | Pulley GT2 16 teeth |
| 1 | pulley(GT2x16_pulley) | Pulley GT2 16 teeth |
| 1 | pulley(GT2x20_pulley_9) | Pulley GT2 20 teeth |
| 1 | pulley(GT2x80_pulley) | Pulley GT2 80 teeth |
| 1 | pulley(GT2x16_toothed_idler) | Pulley GT2 idler 16 teeth |
| 1 | pulley(GT2x16_toothed_idler_9) | Pulley GT2 idler 16 teeth |
| 1 | pulley(GT2x20_toothed_idler) | Pulley GT2 idler 20 teeth |
| 1 | pulley(GT2x20_toothed_idler_9) | Pulley GT2 idler 20 teeth |
| 1 | pulley(GT2x20_plain_idler) | Pulley GT2 idler smooth 12mm |
| 1 | pulley(GT2x16_plain_idler) | Pulley GT2 idler smooth 9.63mm |
| 1 | pulley(GT2x16x7_plain_idler) | Pulley GT2 idler smooth 9.63mm |
| 1 | pulley(GT2x20ob_pulley) | Pulley GT2OB 20 teeth |
| 1 | pulley(GT2x12_pulley) | Pulley GT2RD 12 teeth |
| 1 | pulley(GT2x20um_pulley) | Pulley GT2UM 20 teeth |
| 1 | pulley(T2p5x16_pulley) | Pulley T2.5 16 teeth |
| 1 | pulley(T5x10_pulley) | Pulley T5 10 teeth |
| 1 | screw(M3_grub_screw, 3) | Screw M3 grub x 3mm |
| 2 | screw(M3_grub_screw, 4.5) | Screw M3 grub x 4.5mm |
| 2 | screw(M3_grub_screw, 4) | Screw M3 grub x 4mm |
| 6 | screw(M3_grub_screw, 6) | Screw M3 grub x 6mm |
| 3 | screw(M4_grub_screw, 6) | Screw M4 grub x 6mm |
| 2 | screw(M5_grub_screw, 6) | Screw M5 grub x 6mm |
Radial components for PCBs.
vitamins/radials.scad Object definitions.
vitamins/radial.scad Implementation.
tests/radials.scad Code for this example.
| Function | Description |
|---|---|
rd_boxc_colours(type) | Case colour and resin fill colour |
rd_boxc_leads(type) | Lead pitch, diameter and length |
rd_boxc_size(type) | Overall size and corner radius |
rd_boxc_skirt(type) | Skirt slot, thickness, height |
rd_boxc_z(type) | Height of inner base above PCB. |
rd_cm_choke_core(type) | Core OD, ID, width, corner radius |
rd_cm_choke_csep(type) | Central separator thickness in slot, total thickness, height |
rd_cm_choke_seam(type) | Overlapping semicircular seams to join the two halves of the core width and thickness |
rd_cm_choke_slot(type) | Slot to hold central separator width, height, thickness |
rd_cm_choke_wire(type) | Wire positions, length and diameter |
rd_coil_colour(type) | Core colour |
rd_coil_size(type) | OD, ID, height, coil height |
rd_coil_turns(type) | Number of turns |
rd_coil_wire(type) | Wire pitch, diameter and length |
rd_disc_colours(type) | Colours of body and text |
rd_disc_kind(type) | Capacitor, etc |
rd_disc_lead_d(type) | Lead diameter and sleeve diameter |
rd_disc_pitch(type) | Lead pitch X & Y |
rd_disc_size(type) | Diameter, thickness and height |
rd_electrolytic_colours(type) | Colour of jacket and stripe |
rd_electrolytic_crimp(type) | Width and height of crimp |
rd_electrolytic_lead_d(type) | Lead diameter |
rd_electrolytic_pitch(type) | Lead pitch |
rd_electrolytic_radius(type) | Corner radius |
rd_electrolytic_size(type) | Diameter, crimp diameter, height |
rd_module_colour(type) | Colour |
rd_module_kind(type) | Relay, PSU, etc. |
rd_module_pin_posns(type) | list of pin positions |
rd_module_pin_size(type) | Pin size |
rd_module_radius(type) | Corner radius |
rd_module_size(type) | Size |
rd_transistor_colours(type) | Body colour and text colour |
rd_transistor_lead(type) | Lead diameter or width and depth |
rd_transistor_lead_posns(type) | List of lead xy coordinates |
rd_transistor_size(type) | Width / diameter, depth / flat and height |
rd_xtal_flange(type) | Crystal flange width and thickness |
rd_xtal_lead_d(type) | Crystal lead diameter |
rd_xtal_pitch(type) | Crystal lead pitch |
rd_xtal_size(type) | Crystal length, width and height and optional corner radius |
| Module | Description |
|---|---|
rd_box_cap(type, kind, value) | Draw radial boxed film capacitor |
rd_cm_choke(type, value) | Draw specified common mode choke. |
rd_coil(type, value, pitch = undef) | Draw the specified vertical coil |
rd_disc(type, value, pitch = undef, z = 0, tail = 3) | Draw a radial disc component |
rd_electrolytic(type, value, pitch = undef, z = 0, tail = 3) | Draw a radial electrolytic capcacitor |
rd_module(type, value) | Draw a PCB mounted potted module, e.g. PSU or relay |
rd_transistor(type, value, kind = "Transistor", lead_positions = undef, z = 5, tail = 3) | Draw a radial lead transistor |
rd_xtal(type, value, z = 0, pitch = undef, tail = 3) | Draw a crystal |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | rd_disc(10mm_disc, "1nF Y2") | Ceramic capacitor, 10mm_disc 1nF Y2 |
| 1 | rd_disc(6p4mm_disc, "10nF") | Ceramic capacitor, 6p4mm_disc 10nF |
| 1 | rd_cm_choke(ATX_CM_CHOKE ,"3.5mH") | Common mode choke 3.5mH |
| 1 | rd_xtal(ACT1100, "ACT1100") | Crystal ACT1100 ACT1100 |
| 1 | rd_xtal(ACT1700, "ACT1700") | Crystal ACT1700 ACT1700 |
| 1 | rd_xtal(C_002RX, "C_002RX") | Crystal C_002RX C_002RX |
| 1 | rd_xtal(HC49, "HC49") | Crystal HC49 HC49 |
| 1 | rd_xtal(HC49_4H, "HC49_4H") | Crystal HC49_4H HC49_4H |
| 1 | rd_electrolytic(ECAP8x12, "220uF35V") | Electolytic capacitor ECAP8x12 220uF35V |
| 1 | rd_module(LDE10_20B, "12V 900ma") | PSU LDE10_20B / 12V 900ma |
| 1 | rd_module(VCE03, "12V 250ma") | PSU VCE03 / 12V 250ma |
| 2 | pcb(PERF70x50) | Perfboard 70 x 50mm |
| 1 | rd_coil(IND16x10 ,"4.7uH") | Radial inductor 16x10 4.7uH |
| 1 | rd_module(HF33F, "012-HSL3F") | Relay HF33F / 012-HSL3F |
| 1 | rd_transistor(E_LINE, "ZTX853") | Transistor E_LINE ZTX853 |
| 1 | rd_transistor(TO92, "BC337") | Transistor TO92 BC337 |
| 1 | rd_disc(ERZV07D471, "470V") | Varistor, ERZV07D471 470V |
| 1 | rd_boxc(BOXC18x5x11, "X2 rated film capacitor", "0.1uF 250V" ) | X2 rated film capacitor 0.1uF 250V |
| 1 | rd_boxc(BOXC18x10x16, "X2 rated film capacitor", "0.47uF 250V" ) | X2 rated film capacitor 0.47uF 250V |
Linear rails with carriages.
vitamins/rails.scad Object definitions.
vitamins/rail.scad Implementation.
tests/rails.scad Code for this example.
| Function | Description |
|---|---|
carriage_block_length(type) | Length of the metal part |
carriage_clearance(type) | Gap under the carriage |
carriage_height(type) | Height of carriage |
carriage_length(type) | Overall length |
carriage_pitch_x(type) | Screw hole x pitch |
carriage_pitch_y(type) | Screw hole y pitch |
carriage_rail(type) | Rail type |
carriage_screw(type) | Carriage screw type |
carriage_width(type) | Width of carriage |
rail_bore(type) | Counter bore diameter for screw head |
rail_bore_depth(type) | Counter bore depth |
rail_end(type) | Minimum distance screw can be from the end |
rail_end_screw(type) | Screw used for ends only (Countersink used for better location) |
rail_groove_offset(type) | Offset of centre of groove from top of rail |
rail_groove_width(type) | Groove width |
rail_height(type) | Height of rail section |
rail_hole(type) | Screw hole diameter |
rail_pitch(type) | Distance between screws |
rail_screw(type) | Screw type |
rail_width(type) | Width of rail section |
| Function | Description |
|---|---|
carriage_screw_depth(type) | Carriage thread depth |
carriage_size(type) | Size of carriage |
carriage_travel(type, rail_length) | How far the carriage can travel on a given length rail |
rail_holes(type, length) | Number of holes in a rail given its length |
rail_screw_height(type, screw) | Position screw taking into account countersink into counterbored hole |
| Module | Description |
|---|---|
carriage(type, end_colour = grey(20), wiper_colour = grey(20)) | Draw the specified carriage |
carriage_hole_positions(type) | Position children over screw holes |
rail(type, length, colour = grey(90), use_polycircles = false) | Draw the specified rail |
rail_assembly(carriage, length, pos, carriage_end_colour = grey(20), carriage_wiper_colour = grey(20)) | Rail and carriage assembly |
rail_hole_positions(type, length, first = 0, screws = 100, both_ends = true) | Position children over screw holes |
rail_screws(type, length, thickness, screws = 100, index_screws = undef) | Place screws in the rail |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | rail(HGH15CA, 200) | Linear rail HGH15CA x 200mm |
| 1 | rail(HGH20CA, 200) | Linear rail HGH20CA x 200mm |
| 1 | rail(MGN12, 200) | Linear rail MGN12 x 200mm |
| 1 | rail(MGN15, 200) | Linear rail MGN15 x 200mm |
| 1 | rail(MGN5, 200) | Linear rail MGN5 x 200mm |
| 1 | rail(MGN7, 200) | Linear rail MGN7 x 200mm |
| 1 | rail(MGN9, 200) | Linear rail MGN9 x 200mm |
| 1 | rail(SSR15, 200) | Linear rail SSR15 x 200mm |
| 1 | carriage(HGH15CA_carriage) | Linear rail carriage HGH15CA |
| 1 | carriage(HGH20CA_carriage) | Linear rail carriage HGH20CA |
| 1 | carriage(MGN12C_carriage) | Linear rail carriage MGN12C |
| 1 | carriage(MGN12H_carriage) | Linear rail carriage MGN12H |
| 1 | carriage(MGN15C_carriage) | Linear rail carriage MGN15C |
| 1 | carriage(MGN5C_carriage) | Linear rail carriage MGN5C |
| 1 | carriage(MGN7C_carriage) | Linear rail carriage MGN7C |
| 1 | carriage(MGN7H_carriage) | Linear rail carriage MGN7H |
| 1 | carriage(MGN9C_carriage) | Linear rail carriage MGN9C |
| 1 | carriage(MGN9H_carriage) | Linear rail carriage MGN9H |
| 1 | carriage(SSR15_carriage) | Linear rail carriage SSR15 |
| 26 | nut(M2_nut, nyloc = true) | Nut M2 x 1.6mm nyloc |
| 23 | nut(M3_nut, nyloc = true) | Nut M3 x 2.4mm nyloc |
| 7 | nut(M4_nut, nyloc = true) | Nut M4 x 3.2mm nyloc |
| 3 | nut(M5_nut, nyloc = true) | Nut M5 x 4mm nyloc |
| 11 | screw(M2_cap_screw, 10) | Screw M2 cap x 10mm |
| 15 | screw(M2_cs_cap_screw, 10) | Screw M2 cs cap x 10mm |
| 8 | screw(M3_cap_screw, 10) | Screw M3 cap x 10mm |
| 6 | screw(M3_cap_screw, 12) | Screw M3 cap x 12mm |
| 3 | screw(M3_cap_screw, 16) | Screw M3 cap x 16mm |
| 2 | screw(M3_cs_cap_screw, 12) | Screw M3 cs cap x 12mm |
| 4 | screw(M3_cs_cap_screw, 16) | Screw M3 cs cap x 16mm |
| 2 | screw(M4_cap_screw, 16) | Screw M4 cap x 16mm |
| 2 | screw(M4_cap_screw, 20) | Screw M4 cap x 20mm |
| 2 | screw(M4_cs_cap_screw, 20) | Screw M4 cs cap x 20mm |
| 2 | screw(M4_cs_cap_screw, 25) | Screw M4 cs cap x 25mm |
| 2 | screw(M5_cap_screw, 20) | Screw M5 cap x 20mm |
| 2 | screw(M5_cs_cap_screw, 25) | Screw M5 cs cap x 25mm |
| 26 | washer(M2_washer) | Washer M2 x 5mm x 0.3mm |
| 23 | washer(M3_washer) | Washer M3 x 7mm x 0.5mm |
| 7 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
| 3 | washer(M5_washer) | Washer M5 x 10mm x 1mm |
Ring terminals and earth assemblies for DiBond panels.
vitamins/ring_terminals.scad Object definitions.
vitamins/ring_terminal.scad Implementation.
tests/ring_terminals.scad Code for this example.
| Function | Description |
|---|---|
ringterm_crimp_length(type) | If non-zero the length of the crimp tube |
ringterm_hole(type) | Wire hole diameter |
ringterm_id(type) | Inside diameter |
ringterm_length(type) | Length of the tail including the ring |
ringterm_od(type) | Outside diameter |
ringterm_screw(type) | Screw type |
ringterm_thickness(type) | Metal thickness |
ringterm_width(type) | Width of the tail |
| Function | Description |
|---|---|
ringterm_extent(type) | Space to leave |
| Module | Description |
|---|---|
ring_terminal(type) | Draw specified ring terminal |
ring_terminal_assembly(type, thickness, top = false) | Earthing assembly for DiBond twin skins |
ring_terminal_hole(type, h = 0) | Drill hole for the screw |

| Qty | Module call | BOM entry |
|---|---|---|
| 3 | nut(M3_nut, nyloc = true) | Nut M3 x 2.4mm nyloc |
| 1 | ring_terminal(M3_ringterm) | Ring terminal 3mm |
| 1 | ring_terminal(M3_ringterm_cs) | Ring terminal 3mm |
| 1 | ring_terminal(M3_ringterm_crimp) | Ring terminal crimp 3mm |
| 1 | screw(M3_cap_screw, 10) | Screw M3 cap x 10mm |
| 2 | screw(M3_dome_screw, 10) | Screw M3 dome x 10mm |
| 6 | star_washer(M3_washer) | Washer star M3 x 0.5mm |
Rocker switch. Also used for neon indicator in the same form factor.
vitamins/rockers.scad Object definitions.
vitamins/rocker.scad Implementation.
tests/rockers.scad Code for this example.
| Function | Description |
|---|---|
rocker_bezel(type) | Bezel width |
rocker_button(type) | How far the button extends from the bezel |
rocker_depth(type) | Body depth |
rocker_flange_h(type) | Flange height |
rocker_flange_t(type) | Flange thickness |
rocker_flange_w(type) | Flange width |
rocker_height(type) | Body height |
rocker_part(type) | Part description |
rocker_pivot(type) | Pivot distance from the back of the flange |
rocker_slot_h(type) | Panel slot height |
rocker_slot_w(type) | Panel slot width |
rocker_spades(type) | Spade types and positions |
rocker_width(type) | Body width |
| Function | Description |
|---|---|
rocker_size(type) | Width, height, and depth in a vector |
rocker_slot(type) | Rocker slot in a vector |
| Module | Description |
|---|---|
rocker(type, colour) | Draw the specified rocker switch |
rocker_hole(type, h = 0, rounded = true) | Make a hole to accept a rocker switch, by default 2D, set h for 3D |

| Qty | Module call | BOM entry |
|---|---|---|
| 2 | rocker(neon_indicator) | Neon Indicator H8630FBNAL |
| 2 | rocker(micro_rocker) | Rocker Switch 10x15 |
| 2 | rocker(small_rocker) | Rocker Switch PRASA1-16F-BB0BW |
Steel rods and studding with chamfered ends.
These items are symmetrical, so by default the origin is in the centre but it can be changed to the bottom.
vitamins/rod.scad Implementation.
tests/rod.scad Code for this example.
| Module | Description |
|---|---|
leadscrew(d , l, lead, starts, center = true) | Draw a leadscrew with specified diameter, length, lead and number of starts |
rod(d , l, center = true) | Draw a smooth rod with specified diameter and length |
studding(d , l, center = true) | Draw a threaded rod with specified diameter and length |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | leadscrew(10, 80, 8, 4) | Leadscrew 10 x 80mm, 8mm lead, 4 starts |
| 1 | leadscrew(12, 80, 12, 4) | Leadscrew 12 x 80mm, 12mm lead, 4 starts |
| 1 | leadscrew(16, 80, 16, 4) | Leadscrew 16 x 80mm, 16mm lead, 4 starts |
| 1 | leadscrew(6, 80, 2, 1) | Leadscrew 6 x 80mm, 2mm lead, 1 starts |
| 1 | leadscrew(8, 80, 8, 4) | Leadscrew 8 x 80mm, 8mm lead, 4 starts |
| 1 | rod(10, 80) | Smooth rod 10mm x 80mm |
| 1 | rod(12, 80) | Smooth rod 12mm x 80mm |
| 1 | rod(16, 80) | Smooth rod 16mm x 80mm |
| 1 | rod(3, 80) | Smooth rod 3mm x 80mm |
| 1 | rod(4, 80) | Smooth rod 4mm x 80mm |
| 1 | rod(5, 80) | Smooth rod 5mm x 80mm |
| 1 | rod(6, 80) | Smooth rod 6mm x 80mm |
| 1 | rod(8, 80) | Smooth rod 8mm x 80mm |
| 1 | studding(10, 80) | Threaded rod M10 x 80mm |
| 1 | studding(12, 80) | Threaded rod M12 x 80mm |
| 1 | studding(16, 80) | Threaded rod M16 x 80mm |
| 1 | studding(3, 80) | Threaded rod M3 x 80mm |
| 1 | studding(4, 80) | Threaded rod M4 x 80mm |
| 1 | studding(5, 80) | Threaded rod M5 x 80mm |
| 1 | studding(6, 80) | Threaded rod M6 x 80mm |
| 1 | studding(8, 80) | Threaded rod M8 x 80mm |
A rod end, sometimes called a spherical bearing or rod-end eye, is a component used in mechanical systems to create a flexible connection between two parts.
vitamins/rod_ends.scad Object definitions.
vitamins/rod_end.scad Implementation.
tests/rod_ends.scad Code for this example.
| Function | Description |
|---|---|
rod_end_bearing_bore(type) | radius of the bore hole in the bearing |
rod_end_bearing_od(type) | Outer diameter of the bearing |
rod_end_bearing_rim(type) | Outer rim thickness guesstimate |
rod_end_bearing_shield_colour(type) | Shield colour, "silver" for metal |
rod_end_bearing_width(type) | Width |
rod_end_bore_width(type) | Width |
rod_end_overall_length(type) | overall length of the rod end |
rod_end_screw_length(type) | length of the screw from eye center, not the bore |
rod_end_screw_radius(type) | radius of the screw end, not the bore |
rod_end_sphere_radius(type) | radius of the rod end sphere |
rod_end_sphere_seg_width(type) | the width of the pivoting part, effectively a (sphere - sphereCaps - center bore) |
rod_end_thread_length(type) | length of the threads |
| Module | Description |
|---|---|
rod_end_bearing(type) | Draw a rod end bearing |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | Rod End Bearing(RE_m5_bearing, 33) | Rod End Bearing 5 x 33mm |
SBR rails
The rails are drawn from the center of the rod.
sbr_rail_center_height(type) can be used to determine where the bottom of the rail is.
vitamins/sbr_rails.scad Object definitions.
vitamins/sbr_rail.scad Implementation.
tests/SBR_rails.scad Code for this example.
| Function | Description |
|---|---|
sbr_rail_base_width(type) | Width of the rail base |
sbr_rail_carriage(type) | Carriage to use with this rail |
sbr_rail_center_height(type) | Height of the center above the bottom of the rail |
sbr_rail_diameter(type) | Diameter of the rod |
sbr_rail_screw(type) | Screw to fasten this rail |
| Module | Description |
|---|---|
sbr_rail(type , l) | Draw an SBR rail |
sbr_screw_locations(type, l) | Linear locations of screws |
sbr_screw_positions(type, l) | Screw positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | sbr_rail(16, 200) | SBR16 rail, length 200mm |
| 1 | sbr_bearing_block(SBR16UU) | SBR16UU bearing block |
| 4 | screw(M5_cap_screw, 12) | Screw M5 cap x 12mm |
| 4 | screw(M5_cap_screw, 18) | Screw M5 cap x 18mm |
Machine screws and wood screws with various head styles.
For an explanation of screw_polysink() see https://hydraraptor.blogspot.com/2020/12/sinkholes.html.
vitamins/screws.scad Object definitions.
vitamins/screw.scad Implementation.
tests/screws.scad Code for this example.
| Function | Description |
|---|---|
screw_clearance_radius(type) | Clearance hole radius |
screw_head_height(type) | Head height |
screw_head_radius(type) | Head radius |
screw_head_type(type) | Head style hs_cap, hs_pan, hs_cs, hs_hex, hs_grub, hs_cs_cap, hs_dome |
screw_max_thread(type) | Maximum thread length |
screw_nut(type) | Default nut |
screw_pilot_hole(type) | Pilot hole radius for wood screws, tap radius for machine screws |
screw_radius(type) | Nominal radius |
screw_socket_af(type) | Socket across flats |
screw_socket_depth(type) | Socket or slot depth |
screw_thread_diameter(type) | Thread diameter, if different from nominal diameter |
screw_washer(type) | Default washer |
| Function | Description |
|---|---|
screw_angle(type, length, nut_distance) | How much to rotate the screw to align it with a nut at the specified distance from the head |
screw_boss_diameter(type) | Boss big enough for nut trap and washer |
screw_head_depth(type, d = 0) | How far a counter sink head will go into a straight hole diameter d |
screw_insert(screw, short = false, i = 0) | Find insert to fit specified screw, defaults to longest but can specify the shortest |
screw_length(screw, thickness, washers, insert = false, nyloc = false, nut = false, longer = false) | Returns the length of the longest or shortest screw that will got through thickness and washers and possibly an insert, nut or nyloc |
screw_longer_than(x) | Returns the length of the shortest screw length longer or equal to x |
screw_nut_radius(type) | Radius of matching nut |
screw_polysink_r(type, z) | Countersink hole profile corrected for rounded staircase extrusions. |
screw_shorter_than(x) | Returns the length of the longest screw shorter than or equal to x |
screw_thread_radius(type) | Thread radius |
| Module | Description |
|---|---|
screw(type, length, hob_point = 0, nylon = false) | Draw specified screw, optionally hobbed or nylon |
screw_and_washer(type, length, star = false, penny = false) | Screw with a washer which can be standard or penny and an optional star washer on top |
screw_countersink(type, drilled = true) | Countersink shape |
screw_keyhole(type, h = 0) | Make keyhole slot to accept and retain screw head |
screw_polysink(type, h = 100, alt = false, sink = 0) | A countersink hole made from stacked polyholes for printed parts, default is flush, sink can be used to recess the head |
screw_tearsink(type) | Countersink shape for horizontal holes |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | screw(No632_pan_screw, 30) | Screw 6-32 pan x 30mm |
| 1 | screw(M2_cap_screw, 10) | Screw M2 cap x 10mm |
| 1 | screw(M2_cs_cap_screw, 10) | Screw M2 cs cap x 10mm |
| 1 | screw(M2_dome_screw, 10) | Screw M2 dome x 10mm |
| 1 | screw(M2p5_cap_screw, 10) | Screw M2.5 cap x 10mm |
| 1 | screw(M2p5_dome_screw, 10) | Screw M2.5 dome x 10mm |
| 1 | screw(M2p5_pan_screw, 10) | Screw M2.5 pan x 10mm |
| 1 | screw(M3_cap_screw, 10) | Screw M3 cap x 10mm |
| 1 | screw(M3_cs_cap_screw, 10) | Screw M3 cs cap x 10mm |
| 1 | screw(M3_dome_screw, 10) | Screw M3 dome x 10mm |
| 1 | screw(M3_grub_screw, 6) | Screw M3 grub x 6mm |
| 1 | screw(M3_hex_screw, 10) | Screw M3 hex x 10mm |
| 1 | screw(M3_low_cap_screw, 10) | Screw M3 low cap x 10mm |
| 1 | screw(M3_pan_screw, 10) | Screw M3 pan x 10mm |
| 1 | screw(M3_shoulder_screw, 12) | Screw M3 shoulder x 12mm |
| 1 | screw(M4_cap_screw, 25) | Screw M4 cap x 25mm |
| 1 | screw(M4_cs_cap_screw, 25) | Screw M4 cs cap x 25mm |
| 1 | screw(M4_dome_screw, 25) | Screw M4 dome x 25mm |
| 1 | screw(M4_grub_screw, 8) | Screw M4 grub x 8mm |
| 1 | screw(M4_hex_screw, 30) | Screw M4 hex x 30mm |
| 1 | screw(M4_pan_screw, 30) | Screw M4 pan x 30mm |
| 1 | screw(M4_shoulder_screw, 16) | Screw M4 shoulder x 16mm |
| 1 | screw(M5_cap_screw, 30) | Screw M5 cap x 30mm |
| 1 | screw(M5_cs_cap_screw, 30) | Screw M5 cs cap x 30mm |
| 1 | screw(M5_dome_screw, 30) | Screw M5 dome x 30mm |
| 1 | screw(M5_grub_screw, 10) | Screw M5 grub x 10mm |
| 1 | screw(M5_hex_screw, 30) | Screw M5 hex x 30mm |
| 1 | screw(M5_pan_screw, 30) | Screw M5 pan x 30mm |
| 1 | screw(M6_cap_screw, 30) | Screw M6 cap x 30mm |
| 1 | screw(M6_cs_cap_screw, 30) | Screw M6 cs cap x 30mm |
| 1 | screw(M6_dome_screw, 30) | Screw M6 dome x 30mm |
| 1 | screw(M6_grub_screw, 12) | Screw M6 grub x 12mm |
| 1 | screw(M6_hex_screw, 30) | Screw M6 hex x 30mm |
| 1 | screw(M6_pan_screw, 30) | Screw M6 pan x 30mm |
| 1 | screw(M8_cap_screw, 35) | Screw M8 cap x 35mm |
| 1 | screw(M8_cs_cap_screw, 35) | Screw M8 cs cap x 35mm |
| 1 | screw(M8_dome_screw, 35) | Screw M8 dome x 35mm |
| 1 | screw(M8_hex_screw, 30) | Screw M8 hex x 30mm |
| 1 | screw(No2_screw, 10) | Screw No2 pan wood x 10mm |
| 1 | screw(No4_screw, 10) | Screw No4 pan wood x 10mm |
| 1 | screw(No6_cs_screw, 30) | Screw No6 cs wood x 30mm |
| 1 | screw(No6_screw, 30) | Screw No6 pan wood x 30mm |
| 1 | screw(No8_cs_screw, 30) | Screw No8 cs wood x 30mm |
| 1 | screw(No8_screw, 30) | Screw No8 pan wood x 30mm |
| Qty | Filename |
|---|---|
| 1 | polysink.stl |
Sealing strip from B&Q used to seal around the door of 3D printers.
vitamins/sealing_strip.scad Implementation.
tests/sealing_strip.scad Code for this example.
| Module | Description |
|---|---|
sealing_strip(length) | Draw specified length of sealing strip |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | sealing_strip(100) | Sealing strip 10mm x 4mm x 100mm |
BLDC servos for CNC machines
vitamins/servo_motors.scad Object definitions.
vitamins/servo_motor.scad Implementation.
tests/servo_motors.scad Code for this example.
| Function | Description |
|---|---|
faceplate_boss_size(type) | Centre boss outer d, inner d and height |
faceplate_hole_dia(type) | Screw hole size |
faceplate_hole_pitch(type) | Screw hole pitch |
faceplate_thickness(type) | Thickness of the faceplate |
faceplate_width(type) | Width of faceplate |
servo_motor_cap(type) | Diameter height and corner radius of encoder cover |
servo_motor_faceplate(type) | Face plate type |
servo_motor_length(type) | Total length from the faceplate |
servo_motor_shaft(type) | Shaft type |
shaft_diameter(type) | Shaft diameter |
shaft_key_size(type) | None |
shaft_length(type) | Shaft length |
shaft_type(type) | String to indicate the shaft type |
| Function | Description |
|---|---|
servo_motor_width(type) | Width of the motor body |
| Module | Description |
|---|---|
faceplate_screw_positions(type) | Position children at faceplate screw positions |
motor_faceplate(type) | Draw specified motor faceplate |
motor_shaft(type) | Draw the specified motor shaft |
servo_motor(type) | Draw the specified servo |
servo_screw_positions(type) | Position children at screw positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | servo_motor(Lichuan_M01330_80ST) | Servo Lichuan LCMT07L02NB-80M01330B 80ST mount 80 x 123mm |
| 1 | servo_motor(Lichuan_M02430_80ST) | Servo Lichuan LCMT07L02NB-80M02430B 80ST mount 80 x 150mm |
| 1 | servo_motor(Lichuan_M03530_80ST) | Servo Lichuan LCMT07L02NB-80M03530B 80ST mount 80 x 178mm |
| 1 | servo_motor(Lichuan_M04030_80ST) | Servo Lichuan LCMT07L02NB-80M04030B 80ST mount 80 x 190mm |
Shaft couplings
vitamins/shaft_couplings.scad Object definitions.
vitamins/shaft_coupling.scad Implementation.
tests/shaft_couplings.scad Code for this example.
| Function | Description |
|---|---|
sc_diameter(type) | Coupling outer diameter |
sc_diameter1(type) | Diameter of smaller shaft |
sc_diameter2(type) | Diameter of larger shaft |
sc_flexible(type) | Flexible coupling |
sc_length(type) | Coupling length |
| Module | Description |
|---|---|
shaft_coupling(type, colour = "silver") | Draw the shaft coupling |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | shaft_coupling(SC_5x8_rigid) | Shaft coupling SC_5x8_rigid |
| 1 | shaft_coupling(SC_6x8_flex) | Shaft coupling SC_6x8_flex |
Sheet materials. Rectangular with optional rounded corners. Negative radii make a chamfer.
The "Soft" parameter can be used to determine if the sheet material needs machine screws or wood screws, e.g.:
The "Colour" parameter is a quad-array: [R, G, B, Alpha], or can be a named colour, see OpenSCAD_User_Manual.
For speed sheets should be modelled in 2D by subtracting holes from 2D templates made by sheet_2D() and then extruded to 3D with render_2D_sheet().
Note that modules that drill holes will return a 2D object if h is set to 0 to facilitate this.
If 3D features are needed, for example countersinks, then sheets can be modelled in 3D using sheet() and then coloured with render_sheet().
When woven sheets (e.g. carbon fibre) are rendered it is necessary to specify the dimensions again to render_sheet() or render_2D_sheet().
vitamins/sheets.scad Object definitions.
vitamins/sheet.scad Implementation.
tests/sheets.scad Code for this example.
| Function | Description |
|---|---|
sheet_colour(type) | Colour |
sheet_colour2(type) | Second colour for a woven sheet |
sheet_is_soft(type) | Is soft enough for wood screws |
sheet_thickness(type) | Thickness |
sheet_warp(type) | Woven sheet warp |
sheet_weft(type) | Woven sheet weft |
| Function | Description |
|---|---|
sheet_is_woven(type) | Is a woven sheet, eg carbon fiber |
| Module | Description |
|---|---|
render_2D_sheet(type, colour = false, colour2 = false, w = undef, d = undef) | Extrude a 2D sheet template and give it the correct colour |
render_sheet(type, colour = false, colour2 = false, w = undef, d = undef) | Render a sheet in the correct colour after holes have been subtracted |
sheet(type, w, d, corners = [0, 0, 0, 0]) | Draw specified sheet |
sheet_2D(type, w, d, corners = [0, 0, 0, 0]) | 2D sheet template with specified size and optionally rounded corners |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | sheet(FoilTape, 30, 30, 2) | Aluminium foil tape 30mm x 30mm x 0.05mm |
| 1 | sheet(AL1_6, 30, 30, 2) | Aluminium tooling plate 30mm x 30mm x 1.6mm |
| 1 | sheet(AL2, 30, 30, 2) | Aluminium tooling plate 30mm x 30mm x 2mm |
| 1 | sheet(AL3, 30, 30, 2) | Aluminium tooling plate 30mm x 30mm x 3mm |
| 1 | sheet(AL6, 30, 30, 2) | Aluminium tooling plate 30mm x 30mm x 6mm |
| 1 | sheet(AL8, 30, 30, 2) | Aluminium tooling plate 30mm x 30mm x 8mm |
| 1 | sheet(Spring08, 30, 30, 2) | Bi-metal saw blade 30mm x 30mm x 0.8mm |
| 1 | sheet(Cardboard, 30, 30, 2) | Corrugated cardboard 30mm x 30mm x 5mm |
| 1 | sheet(Foam20, 30, 30, 2) | Foam sponge 30mm x 30mm x 20mm |
| 1 | sheet(Sellotape, 30, 30, 2) | Sellotape tape 30mm x 30mm x 0.05mm |
| 1 | sheet(DiBond, 30, 30, 2) | Sheet DiBond 30mm x 30mm x 3mm |
| 1 | sheet(DiBond6, 30, 30, 2) | Sheet DiBond 30mm x 30mm x 6mm |
| 1 | sheet(MDF10, 30, 30, 2) | Sheet MDF 30mm x 30mm x 10mm |
| 1 | sheet(MDF12, 30, 30, 2) | Sheet MDF 30mm x 30mm x 12mm |
| 1 | sheet(MDF19, 30, 30, 2) | Sheet MDF 30mm x 30mm x 19mm |
| 1 | sheet(MDF22, 30, 30, 2) | Sheet MDF 30mm x 30mm x 22mm |
| 1 | sheet(MDF3, 30, 30, 2) | Sheet MDF 30mm x 30mm x 3mm |
| 1 | sheet(MDF6, 30, 30, 2) | Sheet MDF 30mm x 30mm x 6mm |
| 1 | sheet(PMMA1p25, 30, 30, 2) | Sheet acrylic 30mm x 30mm x 1.25mm |
| 1 | sheet(PMMA10, 30, 30, 2) | Sheet acrylic 30mm x 30mm x 10mm |
| 1 | sheet(PMMA2, 30, 30, 2) | Sheet acrylic 30mm x 30mm x 2mm |
| 1 | sheet(PMMA3, 30, 30, 2) | Sheet acrylic 30mm x 30mm x 3mm |
| 1 | sheet(PMMA6, 30, 30, 2) | Sheet acrylic 30mm x 30mm x 6mm |
| 1 | sheet(PMMA8, 30, 30, 2) | Sheet acrylic 30mm x 30mm x 8mm |
| 1 | sheet(CF1, 30, 30, 2) | Sheet carbon fiber 30mm x 30mm x 1mm |
| 1 | sheet(CF2, 30, 30, 2) | Sheet carbon fiber 30mm x 30mm x 2mm |
| 1 | sheet(CF3, 30, 30, 2) | Sheet carbon fiber 30mm x 30mm x 3mm |
| 1 | sheet(glass2, 30, 30, 2) | Sheet glass 30mm x 30mm x 2mm |
| 1 | sheet(Steel06, 30, 30, 2) | Sheet mild steel 30mm x 30mm x 0.6mm |
| 1 | sheet(Silicone3, 30, 30, 2) | Sheet silicone 30mm x 30mm x 3mm |
SK shaft support brackets
vitamins/sk_brackets.scad Object definitions.
vitamins/sk_bracket.scad Implementation.
tests/SK_brackets.scad Code for this example.
| Function | Description |
|---|---|
sk_base_height(type) | Height of base containing the screws |
sk_diameter(type) | Rod hole diameter |
sk_hole_offset(type) | Rod hole offset |
sk_screw_separation(type) | Separation of screws in the base |
| Function | Description |
|---|---|
sk_size(type) | Size of bracket |
| Module | Description |
|---|---|
sk_bracket(type) | SK shaft support bracket |
sk_bracket_assembly(type, part_thickness = 2, screw_type = M5_cap_screw, nut_type = undef, max_screw_depth = 6) | Assembly with fasteners in place |
sk_bracket_hole_positions(type) | Place children at hole positions |

| Qty | Module call | BOM entry |
|---|---|---|
| 2 | extrusion(E2020, 20, cornerHole = true) | Extrusion E2020 x 20mm |
| 2 | extrusion(E3030, 20, cornerHole = true) | Extrusion E3030 x 20mm |
| 2 | sliding_t_nut(M4_hammer_nut) | Nut M4 hammer |
| 2 | sliding_t_nut(M4_sliding_t_nut) | Nut M4 sliding T |
| 2 | sliding_t_nut(M5_sliding_t_nut) | Nut M5 sliding T |
| 2 | nut(M5_nut, nyloc = undef) | Nut M5 x 4mm |
| 1 | sk_bracket(SK10) | SK10 shaft support bracket |
| 1 | sk_bracket(SK12) | SK12 shaft support bracket |
| 1 | sk_bracket(SK16) | SK16 shaft support bracket |
| 1 | sk_bracket(SK8) | SK8 shaft support bracket |
| 2 | screw(M4_cap_screw, 12) | Screw M4 cap x 12mm |
| 2 | screw(M4_dome_screw, 12) | Screw M4 dome x 12mm |
| 4 | screw(M5_cap_screw, 16) | Screw M5 cap x 16mm |
| 4 | washer(M4_washer) | Washer M4 x 9mm x 0.8mm |
| 6 | washer(M5_washer) | Washer M5 x 10mm x 1mm |
Surface mount components for PCBs.
Note that the value string for tantalum capacitors is the the capacitance in pico farads expressed as two digits plus an exponent plus a single letter voltage code. E.g. 475A is 4.7uF 10V on the parts list.
| Code | Voltage |
|---|---|
| e | 2.5 |
| G | 4 |
| J | 6.3 |
| A | 10 |
| C | 16 |
| D | 20 |
| E | 25 |
| V | 35 |
| H | 50 |
vitamins/smds.scad Object definitions.
vitamins/smd.scad Implementation.
tests/SMDs.scad Code for this example.
| Function | Description |
|---|---|
smd_250V_fuse_base(type) | Base length |
smd_250V_fuse_size(type) | Bounding box of the body |
smd_250V_fuse_step(type) | End cutout length, width and height |
smd_250V_fuse_z(type) | Height of body above the PCB surface |
smd_cap_end_cap(type) | End cap width |
smd_cap_size(type) | Body length, width |
smd_coax_base_r(type) | Corner radius of the base |
smd_coax_base_size(type) | Size of the insulating base |
smd_coax_groove(type) | Groove id, width and z |
smd_coax_lug_size(type) | lug size |
smd_coax_pin_d(type) | Central pin diameter |
smd_coax_tube(type) | OD, ID, height |
smd_contact_size(type) | contact size |
smd_diode_colour(type) | Body colour |
smd_diode_lead_z(type) | Top of lead frame from top |
smd_diode_leads(type) | Lead extent in x, width, thickness and gap |
smd_diode_size(type) | Body length, width and height |
smd_diode_z(type) | Height above PCB surface |
smd_inductor_colour(type) | Body colour |
smd_inductor_lead_z(type) | Top of lead frame from top |
smd_inductor_leads(type) | Lead extent in x, width, thickness and gap |
smd_inductor_size(type) | Body length, width and height |
smd_inductor_z(type) | Height above PCB surface |
smd_led_lens(type) | Lens length width and height |
smd_led_size(type) | Body length, width and height |
smd_pot_contacts(type) | Contacts width, depth, pitch and width, depth, gap for center contact |
smd_pot_cross(type) | Cross head slot for screwdriver |
smd_pot_flat(type) | Flat at the back of the wiper |
smd_pot_size(type) | Base length, width and height |
smd_pot_wiper(type) | Wiper diameter, offset, thickness, height, d1, d2, d3, d4 |
smd_qfp_body_size(type) | Size of the body |
smd_qfp_gullwing(type) | Gullwing S, L, R1, R2 |
smd_qfp_pin_size(type) | Pins dimensions |
smd_qfp_pins(type) | Number of pins |
smd_qfp_pitch(type) | Pin pitch |
smd_qfp_slant(type) | Angle of the slope |
smd_res_end_cap(type) | End cap width |
smd_res_power(type) | Power rating in Watts, 0 for choke |
smd_res_size(type) | Body length, width and height |
smd_soic_lead_pitch(type) | Lead pitch |
smd_soic_lead_size(type) | Lead width, foot depth, lead thickness |
smd_soic_lead_span(type) | Total span of leads |
smd_soic_lead_z(type) | Top of lead frame from top |
smd_soic_size(type) | Body length, width and height |
smd_soic_z(type) | Height above PCB surface |
smd_sot_lead_pitch(type) | Lead pitch |
smd_sot_lead_size(type) | Lead width, foot depth, lead thickness |
smd_sot_lead_span(type) | Total span of leads |
smd_sot_lead_z(type) | Top of lead frame from top |
smd_sot_size(type) | Body length, width and height |
smd_sot_tab_width(type) | The wide lead at the top |
smd_sot_z(type) | Height above PCB surface |
smd_tant_colours(type) | Colours of body and stripe |
smd_tant_lead_z(type) | Top of lead frame from top |
smd_tant_leads(type) | Lead extent in x, width, thickness and gap |
smd_tant_size(type) | Body length, width and height |
smd_tant_z(type) | Height above PCB surface |
| Function | Description |
|---|---|
smd_100th(x) | Convert dimension to 1/100" notation |
smd_led_height(type) | Total height |
smd_size(size) | Convert size to 1/100" notation |
| Module | Description |
|---|---|
smd_250V_fuse(type, value) | Draw an SMD mains fuse |
smd_capacitor(type, height, value = undef) | Draw an SMD capacitor with specified height |
smd_coax(type) | Draw an SMD coaxial connector |
smd_diode(type, value) | Draw an SMD diode |
smd_inductor(type, value) | Draw an SMD inductor |
smd_led(type, colour, cutout) | Draw an SMD LED with specified colour |
smd_pot(type, value) | Draw an SMD pot |
smd_qfp(type, value) | Draw and SMD QFP package |
smd_resistor(type, value) | Draw an SMD resistor with specified value |
smd_soic(type, value) | Draw an SMD SOIC |
smd_sot(type, value) | Draw an SMD transistor |
smd_tant(type, value) | Draw an SMD tantalum capacitor |

| Qty | Module call | BOM entry |
|---|---|---|
| 1 | smd_inductor(CDRH104 ,"10R") | CDRH104 package 10R |
| 1 | smd_diode(DO214AC, "SS34") | DO214AC package SS34 |
| 1 | smd_inductor(IND2525 ,"4R7") | IND2525 package 4R7 |
| 1 | smd_led(LED0603, "green") | SMD LED 0603 green |
| 1 | smd_led(LED0805, "blue") | SMD LED 0805 blue |
| 1 | smd_led(LED1206, "red") | SMD LED 1306 red |
| 1 | smd_tant(TANT_A, value = "105e") | SMD Tantalum capacitor package A ,1uF, 2.5V |
| 1 | smd_tant(TANT_B, value = "106J") | SMD Tantalum capacitor package B ,10uF, 6.3V |
| 1 | smd_tant(TANT_C, value = "107A") | SMD Tantalum capacitor package C ,100uF, 10V |
| 1 | smd_capacitor(CAP0402) | SMD capacitor 0402 |
| 1 | smd_capacitor(CAP0502) | SMD capacitor 0502 |
| 1 | smd_capacitor(CAP0603) | SMD capacitor 0603 |
| 1 | smd_capacitor(CAP0805) | SMD capacitor 0805 |
| 1 | smd_capacitor(CAP1206) | SMD capacitor 1206 |
| 1 | smd_capacitor(CAP1210) | SMD capacitor 1210 |
| 1 | smd_qfp(QFP50P1200X1200X160_64N, "ATSAM4S4BA") | SMD chip: ATSAM4S4BA, package : QFP50P1200X1200X160_64N |
| 1 | smd_resistor(L2012C, 10u) | SMD choke 0805 10u |
| 1 | smd_coax(U_FL_R_SMT_1) | SMD coax connector type: U_FL_R_SMT_1 |
| 1 | smd_250V_fuse(OMT250, "2A 250V") | SMD fuse: OMT250 2A 250V |
| 1 | smd_resistor(RES0402, 1R0) | SMD resistor 0402 1R0 0.0625W |
| 1 | smd_resistor(RES0502, 10) | SMD resistor 0502 10 0.05W |
| 1 | smd_resistor(RES0603, 100) | SMD resistor 0603 100 0.1W |
| 1 | smd_resistor(RES0805, 10M) | SMD resistor 0805 10M 0.125W |
| 1 | smd_resistor(RES1206, 100K) | SMD resistor 1206 100K 0.25W |
| 1 | smd_soic(SOIC14, "SOIC14") | SOIC14 package SOIC14 |
| 1 | smd_soic(SOIC16, "SOIC16") | SOIC16 package SOIC16 |
| 1 | smd_soic(SOIC18, "SOIC18") | SOIC18 package SOIC18 |
| 1 | smd_soic(SOIC8, "SOIC8") | SOIC8 package SOIC8 |
| 1 | smd_sot(SOT223, "FZT851") | SOT223 package FZT851 |
| 1 | smd_sot(SOT23, "2N7000") | SOT23 package 2N7000 |
| 1 | smd_soic(SOT23_6, "SOT23_6") | SOT23_6 package SOT23_6 |
| 1 | smd_pot(TC33X1, "10K") | TC33X1 package 10K |
| 1 | smd_soic(TSOT23_8, "TSOT23_8") | TSOT23_8 package TSOT23_8 |
Spade terminals used as parts of electrical components.
vitamins/spades.scad Object definitions.
vitamins/spade.scad Implementation.
tests/spades.scad Code for this example.
| Function | Description |
|---|---|
spade_hole(type) | Hole diameter |
spade_l(type) | Length of the narrow part |
spade_shank(type) | Shank width |
spade_t(type) | Thickness |
spade_w(type) | Width |
| Module | Description |
|---|---|
spade(type, height = 14) | Draw a spade of the specified type and total length. The shank length is adjusted to make the length. |

Truncated — view the full README on GitHub.
535 followers · starred Feb 2026
203 followers · starred Dec 2024
365 followers · starred Jan 2026
372 followers · starred Nov 2023