An open API service indexing awesome lists of open source software.

https://github.com/nophead/nopscadlib

Library of parts modelled in OpenSCAD and a framework for making projects
https://github.com/nophead/nopscadlib

3d-printing openscad

Last synced: 6 months ago
JSON representation

Library of parts modelled in OpenSCAD and a framework for making projects

Awesome Lists containing this project

README

          

# NopSCADlib
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](scripts/readme.md).

A simple example project can be found [here](examples/MainsBreakOutBox/readme.md) and more complex examples [here](examples).

For more examples of what it can make see the [gallery](gallery/readme.md).

The license is GNU General Public License v3.0, see [COPYING](COPYING).

See [usage](docs/usage.md) for requirements, installation instructions and a usage guide.

A list of changes classified as breaking, additions or fixes is maintained in [CHANGELOG.md](CHANGELOG.md).

## Table of Contents

Vitamins A-H Vitamins I-Q Vitamins R-Z Printed Utilities Core Utilities
7_segments IECs Radials Box Annotation BOM
Antennas Inserts Rails Butt_box Bezier Clip
Axials Jack Ring_terminals Cable_clip Catenary Global
BLDC_motors LDRs Rockers Cable_grommets Chamfer Polyholes
Ball_bearings LED_meters Rod Camera_housing Core_xy Rounded_rectangle
Batteries LEDs Rod_ends Carriers Dimension Sphere
Bearing_blocks Leadnuts SBR_rails Corner_block Dogbones Teardrops
Belts Light_strips SK_brackets Door_hinge Fillet
Blowers Linear_bearings SMDs Door_latch Gears
Box_sections Magnets SSRs Drag_chain Hanging_hole
Bulldogs Mains_sockets Screws Fan_guard Horiholes
Buttons Microswitches Sealing_strip Fixing_block Layout
Cable_strips Microview Servo_motors Flat_hinge Maths
Cameras Modules Shaft_couplings Foot Offset
Circlips Nuts Sheets Gridfinity PCB_utils
Components O_ring Spades Handle Quadrant
DIP Opengrab Spools Knob Round
D_connectors PCB Springs LED_bezel Rounded_cylinder
Displays PCBs Stepper_motors PCB_mount Rounded_polygon
Extrusion_brackets PSUs Swiss_clips PSU_shroud Rounded_triangle
Extrusions Panel_meters Terminals Pocket_handle Sector
Fans Photo_interrupters Toggles Press_fit Splines
Fastons Pillars Transformers Printed_box Sweep
Fuseholder Pillow_blocks Ttracks Printed_pulleys Thread
Gear_motors Pin_headers Tubings Ribbon_clamp Tube
Geared_steppers Potentiometers Variacs SSR_shroud
Green_terminals Pulleys Veroboard Screw_knob
HT_pipes Washers Socket_box
Hot_ends Wire Strap_handle
Hygrometer Zipties

---

## 7_segments
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](vitamins/7_segments.scad) Object definitions.

[vitamins/7_segment.scad](vitamins/7_segment.scad) Implementation.

[tests/7_segments.scad](tests/7_segments.scad) Code for this example.

### Properties
| 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 |

### Modules
| 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 |

![7_segments](tests/png/7_segments.png)

Top

---

## Antennas
Wifi Antennas

[vitamins/antennas.scad](vitamins/antennas.scad) Object definitions.

[vitamins/antenna.scad](vitamins/antenna.scad) Implementation.

[tests/antennas.scad](tests/antennas.scad) Code for this example.

### Properties
| 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 |

### Functions
| Function | Description |
|:--- |:--- |
| `antenna_hole_r(type)` | Panel hole radius |
| `antenna_nut(type)` | The nut |

### Modules
| Module | Description |
|:--- |:--- |
| `antenna(type, thickness, angle)` | Draw a WiFi antenna |

![antennas](tests/png/antennas.png)

### Vitamins
| 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 |

Top

---

## Axials
Axial components for PCBs.

[vitamins/axials.scad](vitamins/axials.scad) Object definitions.

[vitamins/axial.scad](vitamins/axial.scad) Implementation.

[tests/axials.scad](tests/axials.scad) Code for this example.

### Properties
| 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 |

### Modules
| 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. |

![axials](tests/png/axials.png)

### Vitamins
| 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 |

Top

---

## Ball_bearings
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](vitamins/ball_bearings.scad) Object definitions.

[vitamins/ball_bearing.scad](vitamins/ball_bearing.scad) Implementation.

[tests/ball_bearings.scad](tests/ball_bearings.scad) Code for this example.

### Properties
| 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 |

### Modules
| Module | Description |
|:--- |:--- |
| `ball_bearing(type)` | Draw a ball bearing |
| `bearing_ball(dia)` | Draw a steel bearing ball |

![ball_bearings](tests/png/ball_bearings.png)

### Vitamins
| 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 |

Top

---

## Batteries
Actually just single cells at the moment, shown here with mating contacts in place.

Note that the [Lumintop LM34](http://www.lumintop.com/lm34c-usb-rechargeable-18650-li-ion-battery.html) 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](vitamins/batteries.scad) Object definitions.

[vitamins/battery.scad](vitamins/battery.scad) Implementation.

[tests/batteries.scad](tests/batteries.scad) Code for this example.

### Properties
| 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 |

### Modules
| 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 |

![batteries](tests/png/batteries.png)

### Vitamins
| 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 |

Top

---

## Bearing_blocks
SCSnUU and SCSnLUU bearing blocks

[vitamins/bearing_blocks.scad](vitamins/bearing_blocks.scad) Object definitions.

[vitamins/bearing_block.scad](vitamins/bearing_block.scad) Implementation.

[tests/bearing_blocks.scad](tests/bearing_blocks.scad) Code for this example.

### Properties
| 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 |

### Functions
| Function | Description |
|:--- |:--- |
| `sbr_size(type)` | Size of SBR bracket bounding block |
| `scs_size(type)` | Size of scs bracket bounding block |

### Modules
| 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 |

![bearing_blocks](tests/png/bearing_blocks.png)

### Vitamins
| 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 |

Top

---

## Belts
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](vitamins/belts.scad) Object definitions.

[vitamins/belt.scad](vitamins/belt.scad) Implementation.

[tests/belts.scad](tests/belts.scad) Code for this example.

### Properties
| 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 |

### Functions
| 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. |

### Modules
| 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 |

![belts](tests/png/belts.png)

### Vitamins
| 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 |

Top

---

## BLDC_motors
Brushless DC electric motor

[vitamins/bldc_motors.scad](vitamins/bldc_motors.scad) Object definitions.

[vitamins/bldc_motor.scad](vitamins/bldc_motor.scad) Implementation.

[tests/BLDC_motors.scad](tests/BLDC_motors.scad) Code for this example.

### Properties
| 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 |

### Modules
| 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 |

![bldc_motors](tests/png/bldc_motors.png)

### Vitamins
| 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 |

Top

---

## Blowers
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](vitamins/blowers.scad) Object definitions.

[vitamins/blower.scad](vitamins/blower.scad) Implementation.

[tests/blowers.scad](tests/blowers.scad) Code for this example.

### Properties
| 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 |

### Functions
| 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 |

### Modules
| Module | Description |
|:--- |:--- |
| `blower(type)` | Draw specified blower |
| `blower_hole_positions(type)` | Translate children to screw hole positions |
| `blower_square(type)` | Draw a square blower |

![blowers](tests/png/blowers.png)

### Vitamins
| 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 |

Top

---

## Box_sections
Box sections.

[vitamins/box_sections.scad](vitamins/box_sections.scad) Object definitions.

[vitamins/box_section.scad](vitamins/box_section.scad) Implementation.

[tests/box_sections.scad](tests/box_sections.scad) Code for this example.

### Properties
| 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 |

### Functions
| Function | Description |
|:--- |:--- |
| `box_section_is_woven(type)` | Box section is woven, eg carbon fiber |

![box_sections](tests/png/box_sections.png)

### Vitamins
| 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 |

Top

---

## Bulldogs
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](vitamins/bulldogs.scad) Object definitions.

[vitamins/bulldog.scad](vitamins/bulldog.scad) Implementation.

[tests/bulldogs.scad](tests/bulldogs.scad) Code for this example.

### Properties
| 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 |

### Modules
| Module | Description |
|:--- |:--- |
| `bulldog(type, open = 4)` | Draw bulldog clip open by specified amount |

![bulldogs](tests/png/bulldogs.png)

### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `bulldog(small_bulldog)` | Bulldog clip 19mm |
| 1 | `bulldog(large_bulldog)` | Bulldog clip 25mm |

Top

---

## Buttons
PCB mounted buttons. Can optionally have a coloured cap

[vitamins/buttons.scad](vitamins/buttons.scad) Object definitions.

[vitamins/button.scad](vitamins/button.scad) Implementation.

[tests/buttons.scad](tests/buttons.scad) Code for this example.

### Properties
| 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 |

### Modules
| Module | Description |
|:--- |:--- |
| `square_button(type, colour = "yellow", right_angle = false)` | Draw square button with specified cap colour if it has a cap |

![buttons](tests/png/buttons.png)

### Vitamins
| 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 |

Top

---

## Cable_strips
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](vitamins/cable_strip.scad) Implementation.

[tests/cable_strips.scad](tests/cable_strips.scad) Code for this example.

### Functions
| 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 |

### Modules
| 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 |

![cable_strips](tests/png/cable_strips.png)

### Vitamins
| 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 |

Top

---

## Cameras
PCB cameras.

[vitamins/cameras.scad](vitamins/cameras.scad) Object definitions.

[vitamins/camera.scad](vitamins/camera.scad) Implementation.

[tests/cameras.scad](tests/cameras.scad) Code for this example.

### Properties
| 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 |

### Functions
| Function | Description |
|:--- |:--- |
| `camera_lens_height(type)` | The height of the lens stack |

### Modules
| 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 |

![cameras](tests/png/cameras.png)

### Vitamins
| 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 |

Top

---

## Circlips
Circlips aka tapered retaining rings.

[vitamins/circlips.scad](vitamins/circlips.scad) Object definitions.

[vitamins/circlip.scad](vitamins/circlip.scad) Implementation.

[tests/circlips.scad](tests/circlips.scad) Code for this example.

### Properties
| 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 |

### Functions
| Function | Description |
|:--- |:--- |
| `circlip_closed_angle(type)` | Closed angle |

### Modules
| 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 |

![circlips](tests/png/circlips.png)

### Vitamins
| 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) |

Top

---

## Components
Various electronic components used in hot ends and heated beds.

[vitamins/components.scad](vitamins/components.scad) Object definitions.

[vitamins/component.scad](vitamins/component.scad) Implementation.

[tests/components.scad](tests/components.scad) Code for this example.

### Properties
| 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 |

### Functions
| 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 |

### Modules
| 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 |

![components](tests/png/components.png)

### Vitamins
| 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% |

Top

---

## D_connectors
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](vitamins/d_connectors.scad) Object definitions.

[vitamins/d_connector.scad](vitamins/d_connector.scad) Implementation.

[tests/d_connectors.scad](tests/d_connectors.scad) Code for this example.

### Properties
| 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 |

### Functions
| 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 |

### Modules
| 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 |

![d_connectors](tests/png/d_connectors.png)

### Vitamins
| 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 |

Top

---

## DIP
Dual inline IC packages and sockets

[vitamins/dip.scad](vitamins/dip.scad) Implementation.

[tests/DIP.scad](tests/DIP.scad) Code for this example.

### Properties
| 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 |

### Modules
| 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 |

![dip](tests/png/dip.png)

### Vitamins
| 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 |

Top

---

## Displays
LCD displays.

[vitamins/displays.scad](vitamins/displays.scad) Object definitions.

[vitamins/display.scad](vitamins/display.scad) Implementation.

[tests/displays.scad](tests/displays.scad) Code for this example.

### Properties
| 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 |

### Functions
| Function | Description |
|:--- |:--- |
| `display_depth(type)` | Total thickness including touch screen and PCB |
| `display_ts_thickness(type)` | Touch screen thickness or 0 |

### Modules
| Module | Description |
|:--- |:--- |
| `display(type)` | Draw specified display |
| `display_aperture(type, clearance, clear_pcb = false)` | Make aperture cutout |

![displays](tests/png/displays.png)

### Vitamins
| 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" |

Top

---

## Extrusion_brackets
Brackets for joining extrusions at a corner.

[vitamins/extrusion_brackets.scad](vitamins/extrusion_brackets.scad) Object definitions.

[vitamins/extrusion_bracket.scad](vitamins/extrusion_bracket.scad) Implementation.

[tests/extrusion_brackets.scad](tests/extrusion_brackets.scad) Code for this example.

### Properties
| 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 ) |
| `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 |

### Functions
| 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 |

### Modules
| 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 |

![extrusion_brackets](tests/png/extrusion_brackets.png)

### Vitamins
| 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 |

Top

---

## Extrusions
Aluminium extrusion.

[vitamins/extrusions.scad](vitamins/extrusions.scad) Object definitions.

[vitamins/extrusion.scad](vitamins/extrusion.scad) Implementation.

[tests/extrusions.scad](tests/extrusions.scad) Code for this example.

### Properties
| 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 |

### Functions
| 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 |

### Modules
| Module | Description |
|:--- |:--- |
| `extrusion(type, length, center = true, cornerHole = true)` | Draw the specified extrusion |

![extrusions](tests/png/extrusions.png)

### Vitamins
| 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 |

Top

---

## Fans
Axial fans.

Can draw three styles: solid, open frame and open frame with screw bosses.

[vitamins/fans.scad](vitamins/fans.scad) Object definitions.

[vitamins/fan.scad](vitamins/fan.scad) Implementation.

[tests/fans.scad](tests/fans.scad) Code for this example.

### Properties
| 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 |

### Modules
| 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. |

![fans](tests/png/fans.png)

### Vitamins
| 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 |

Top

---

## Fastons
Faston receptacles to mate with spade connectors

[vitamins/fastons.scad](vitamins/fastons.scad) Object definitions.

[vitamins/faston.scad](vitamins/faston.scad) Implementation.

[tests/fastons.scad](tests/fastons.scad) Code for this example.

### Properties
| 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 |

### Functions
| Function | Description |
|:--- |:--- |
| `faston_insul_stop(type)` | Position where insulation stops |
| `faston_length(type)` | Total length of crimp |

### Modules
| Module | Description |
|:--- |:--- |
| `faston(type, closed = false)` | Draw specified faston |

![fastons](tests/png/fastons.png)

### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 4 | `faston(5_160430_7)` | Faston part no 5_160430_7 to fit 4.75mm spade |

Top

---

## Fuseholder
20mm panel mount fuse holder.

[vitamins/fuseholder.scad](vitamins/fuseholder.scad) Implementation.

[tests/fuseholder.scad](tests/fuseholder.scad) Code for this example.

### Functions
| Function | Description |
|:--- |:--- |
| `fuseholder_diameter()` | Outside diameter of flange |

### Modules
| Module | Description |
|:--- |:--- |
| `fuseholder(thickness)` | Fuseholder with nut in place for specified panel thickness |
| `fuseholder_hole(h = 100)` | Hole with flats for fuseholder |

![fuseholder](tests/png/fuseholder.png)

### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `fuseholder(6)` | Fuse holder 20mm |

Top

---

## Gear_motors
DC motors with a gearbox

[vitamins/gear_motors.scad](vitamins/gear_motors.scad) Object definitions.

[vitamins/gear_motor.scad](vitamins/gear_motor.scad) Implementation.

[tests/gear_motors.scad](tests/gear_motors.scad) Code for this example.

### Properties
| 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 |

### Functions
| 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 |

### Modules
| Module | Description |
|:--- |:--- |
| `gear_motor(type, alpha = 1)` | Draw specified gear motor, can be partially transparent to see what is behind it |

![gear_motors](tests/png/gear_motors.png)

Top

---

## Geared_steppers
Geared tin can steppers

[vitamins/geared_steppers.scad](vitamins/geared_steppers.scad) Object definitions.

[vitamins/geared_stepper.scad](vitamins/geared_stepper.scad) Implementation.

[tests/geared_steppers.scad](tests/geared_steppers.scad) Code for this example.

### Properties
| 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 |

### Modules
| 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 |

![geared_steppers](tests/png/geared_steppers.png)

### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `geared_stepper(28BYJ_48)` | Geared stepper - 28BYJ-48 5V |
| 1 | `geared_stepper(35BYGHJ75)` | Geared stepper - 35BYGHJ75 0.4A |

Top

---

## Green_terminals
Parametric green terminal blocks

[vitamins/green_terminals.scad](vitamins/green_terminals.scad) Object definitions.

[vitamins/green_terminal.scad](vitamins/green_terminal.scad) Implementation.

[tests/green_terminals.scad](tests/green_terminals.scad) Code for this example.

### Properties
| 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 |

### Modules
| Module | Description |
|:--- |:--- |
| `green_terminal(type, ways, skip = [], colour = "lime")` | Draw green terminal blocks, skip can be used to remove pins. |

![green_terminals](tests/png/green_terminals.png)

### Vitamins
| 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" |

Top

---

## Hot_ends
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](vitamins/hot_ends.scad) Object definitions.

[vitamins/hot_end.scad](vitamins/hot_end.scad) Implementation.

[tests/hot_ends.scad](tests/hot_ends.scad) Code for this example.

### Properties
| 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 |

### Functions
| 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 |

### Modules
| Module | Description |
|:--- |:--- |
| `hot_end(type, filament, naked = false, resistor_wire_rotate = [0,0,0], bowden = false)` | Draw specified hot end |

![hot_ends](tests/png/hot_ends.png)

### Vitamins
| 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 |

Top

---

## HT_pipes
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](vitamins/ht_pipes.scad) Object definitions.

[vitamins/ht_pipe.scad](vitamins/ht_pipe.scad) Implementation.

[tests/HT_pipes.scad](tests/HT_pipes.scad) Code for this example.

### Properties
| Function | Description |
|:--- |:--- |
| `pipe_length(type)` | Pipe length |
| `pipe_od(type)` | Outside diameter |
| `pipe_td(type)` | T-Pipe diameter |
| `pipe_wall(type)` | Wall thickness |

### Modules
| Module | Description |
|:--- |:--- |
| `ht_cap(type)` | Draw specified cap |
| `ht_pipe(type)` | Draw specified pipe |
| `ht_tpipe(type)` | Draw specified T-pipe |

![ht_pipes](tests/png/ht_pipes.png)

### Vitamins
| 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 |

Top

---

## Hygrometer
Mini LCD Celsius Digital Thermometer Hygrometer Temperature Humidity Meter Gauge on eBay

[vitamins/hygrometer.scad](vitamins/hygrometer.scad) Implementation.

[tests/hygrometer.scad](tests/hygrometer.scad) Code for this example.

### Functions
| Function | Description |
|:--- |:--- |
| `hygrometer_or()` | The outside radius of a hygrometer |

### Modules
| Module | Description |
|:--- |:--- |
| `hygrometer()` | Draw a hygrometer |
| `hygrometer_hole(h = 0)` | Drill the hole for a hygrometer |

![hygrometer](tests/png/hygrometer.png)

### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `hygrometer()` | Mini LCD Digital Thermometer / Hygrometer |

Top

---

## IECs
IEC mains inlets and outlet.

[vitamins/iecs.scad](vitamins/iecs.scad) Object definitions.

[vitamins/iec.scad](vitamins/iec.scad) Implementation.

[tests/IECs.scad](tests/IECs.scad) Code for this example.

### Properties
| 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 |

### Functions
| Function | Description |
|:--- |:--- |
| `iec_insert_screw_length()` | Screw length used for inserts |

### Modules
| 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 |

![iecs](tests/png/iecs.png)

### Vitamins
| 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 |

Top

---

## Inserts
Heatfit threaded inserts. Can be pushed into thermoplastics using a soldering iron with a conical bit set to 200°C.

[vitamins/inserts.scad](vitamins/inserts.scad) Object definitions.

[vitamins/insert.scad](vitamins/insert.scad) Implementation.

[tests/inserts.scad](tests/inserts.scad) Code for this example.

### Properties
| 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 |

### Functions
| 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. |

### Modules
| 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](#Ssr_shroud) |
| `threaded_insert(type)` | Draw specified threaded insert, for use in wood |

![inserts](tests/png/inserts.png)

### Vitamins
| 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 |

Top

---

## Jack
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](vitamins/jack.scad) Implementation.

[tests/jack.scad](tests/jack.scad) Code for this example.

### Functions
| 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 |

### Modules
| 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 |

![jack](tests/png/jack.png)

### Vitamins
| 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 |

Top

---

## LDRs
Light dependent resistors.

Larger ones seem to have both a higher dark resistance and a lower bright light resistance.

[vitamins/ldrs.scad](vitamins/ldrs.scad) Object definitions.

[vitamins/ldr.scad](vitamins/ldr.scad) Implementation.

[tests/LDRs.scad](tests/LDRs.scad) Code for this example.

### Properties
| 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 |

### Modules
| Module | Description |
|:--- |:--- |
| `LDR(type, lead_length = 3)` | Draw an LDR, can specify the lead length |

![ldrs](tests/png/ldrs.png)

### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `ldr(large_ldr)` | Light dependent resistor - large |
| 1 | `ldr(small_ldr)` | Light dependent resistor - small |

Top

---

## Leadnuts
Nuts for leadscrews.

[vitamins/leadnuts.scad](vitamins/leadnuts.scad) Object definitions.

[vitamins/leadnut.scad](vitamins/leadnut.scad) Implementation.

[tests/leadnuts.scad](tests/leadnuts.scad) Code for this example.

### Properties
| 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 |

### Functions
| Function | Description |
|:--- |:--- |
| `leadnut_shank(type)` | The length of the shank below the flange |

### Modules
| 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 |

![leadnuts](tests/png/leadnuts.png)

### Vitamins
| 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 |

Top

---

## LED_meters
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](docs) directory needs to be installed to get realistic digits.

[vitamins/led_meters.scad](vitamins/led_meters.scad) Object definitions.

[vitamins/led_meter.scad](vitamins/led_meter.scad) Implementation.

[tests/LED_meters.scad](tests/LED_meters.scad) Code for this example.

### Properties
| 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 |

### Functions
| 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 |

### Modules
| 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 |

![led_meters](tests/png/led_meters.png)

### Vitamins
| 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 |

### Printed
| Qty | Filename |
| ---:|:--- |
| 1 | meter_bezel.stl |

Top

---

## LEDs
Standard domed through hole LEDs. Can specify colour and lead length.

[vitamins/leds.scad](vitamins/leds.scad) Object definitions.

[vitamins/led.scad](vitamins/led.scad) Implementation.

[tests/LEDs.scad](tests/LEDs.scad) Code for this example.

### Properties
| 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 |

### Functions
| Function | Description |
|:--- |:--- |
| `led_hole_radius(type)` | Radius of panel hole to accept LED |
| `led_radius(type)` | Radius |

### Modules
| Module | Description |
|:--- |:--- |
| `led(type, colour = "red", lead = 5, right_angle = 0)` | Draw specified LED with desired colour and lead length |

![leds](tests/png/leds.png)

### Vitamins
| 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 |

Top

---

## Light_strips
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](vitamins/light_strips.scad) Object definitions.

[vitamins/light_strip.scad](vitamins/light_strip.scad) Implementation.

[tests/light_strips.scad](tests/light_strips.scad) Code for this example.

### Properties
| 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 |

### Functions
| 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 |

### Modules
| 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 |

![light_strips](tests/png/light_strips.png)

### Vitamins
| 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) |

Top

---

## Linear_bearings
LMnUU linear bearings.

[vitamins/linear_bearings.scad](vitamins/linear_bearings.scad) Object definitions.

[vitamins/linear_bearing.scad](vitamins/linear_bearing.scad) Implementation.

[tests/linear_bearings.scad](tests/linear_bearings.scad) Code for this example.

### Properties
| 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 |

### Functions
| Function | Description |
|:--- |:--- |
| `bearing_radius(type)` | Outside radius |
| `open_bearing_theta(type)` | For open bearings, the angle of the opening |

### Modules
| Module | Description |
|:--- |:--- |
| `linear_bearing(type)` | Draw specified linear bearing |

![linear_bearings](tests/png/linear_bearings.png)

### Vitamins
| 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