From b7654f0384f56d4b04257b705484fb4ce6df60ef Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Sun, 18 Aug 2019 14:26:14 +0100 Subject: [PATCH] Fixed readme index order for Python 2. Fixed index order being different on Linux due to os.listdir order being inconsistent with Windows. --- readme.md | 162 +++++++++++++++++++++++------------------------ scripts/tests.py | 4 +- 2 files changed, 83 insertions(+), 83 deletions(-) diff --git a/readme.md b/readme.md index 3908ad0..1c4909d 100644 --- a/readme.md +++ b/readme.md @@ -18,16 +18,16 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa ## Table of Contents - - + + - - + + @@ -477,55 +477,6 @@ Various electronic components used in hot ends and heated beds. | 1 | ```resistor(Honewell)``` | Thermistor Honeywell 135-104LAC-J01 100K 1% | -Top - ---- - -## Displays -LCD dispays. - - -[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(HDMI5)``` | HDMI display 5" | -| 1 | ```display(LCD1602A)``` | LCD display 1602A | -| 1 | ```display(SSD1963_4p3)``` | LCD display SSD1963 4.3" | - - Top --- @@ -582,6 +533,55 @@ D-connectors. Can be any number of ways, male or female, solder buckets, PCB mou | 6 | ```d_pillar()``` | D-type connector pillar | +Top + +--- + +## Displays +LCD dispays. + + +[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(HDMI5)``` | HDMI display 5" | +| 1 | ```display(LCD1602A)``` | LCD display 1602A | +| 1 | ```display(SSD1963_4p3)``` | LCD display SSD1963 4.3" | + + Top --- @@ -1542,6 +1542,34 @@ If a nut is given a child then it gets placed on its top surface. | 1 | ```wingnut(M4_wingnut)``` | Wingnut M4 | +Top + +--- + +## O_ring +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](vitamins/o_ring.scad) Implementation. + +[tests/o_ring.scad](tests/o_ring.scad) Code for this example. + +### Modules +| 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. | + +![o_ring](tests/png/o_ring.png) + +### Vitamins +| Qty | Module call | BOM entry | +| ---:|:--- |:---| +| 1 | ```O_ring(2.5, 1.6)``` | O-ring nitrile 2.5mm x 1.6mm | + + Top --- @@ -1579,34 +1607,6 @@ A permanent magnet that can be magnatized and de-magnatized electronically. | 1 | ```opengrab()``` | OpenGrab V3 electro permanent magnet | -Top - ---- - -## O_ring -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](vitamins/o_ring.scad) Implementation. - -[tests/o_ring.scad](tests/o_ring.scad) Code for this example. - -### Modules -| 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. | - -![o_ring](tests/png/o_ring.png) - -### Vitamins -| Qty | Module call | BOM entry | -| ---:|:--- |:---| -| 1 | ```O_ring(2.5, 1.6)``` | O-ring nitrile 2.5mm x 1.6mm | - - Top --- diff --git a/scripts/tests.py b/scripts/tests.py index 403007b..436d772 100644 --- a/scripts/tests.py +++ b/scripts/tests.py @@ -107,7 +107,7 @@ def tests(tests): # # List of individual part files # - scads = [i for i in os.listdir(scad_dir) if i[-5:] == ".scad"] + scads = [i for i in sorted(os.listdir(scad_dir)) if i[-5:] == ".scad"] for scad in scads: base_name = scad[:-5] @@ -257,7 +257,7 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa print('', file = doc_file, end = '') for type in types: if i < len(index[type]): - name = index[type][i] + name = sorted(index[type])[i] print('', file = doc_file, end = '') else: print('', file = doc_file, end = '')
Vitamins A-N Vitamins O-Z Printed Utilities Core Utilities
Ball_bearings Opengrab Box Annotation Bom
Batteries O_ring Butt_box Bezier Clip
Ball_bearings O_ring Box Annotation Bom
Batteries Opengrab Butt_box Bezier Clip
Belts Pcbs Cable_grommets Dogbones Global
Blowers Pillars Carriers Fillet Polyholes
Bulldogs Pin_headers Corner_block Hanging_hole Rounded_rectangle
Buttons Psus Door_hinge Layout Sphere
Cable_strips Pulleys Door_latch Maths Teardrops
Components Rails Fan_guard Offset
Displays Ring_terminals Fixing_block Quadrant
D_connectors Rockers Flat_hinge Round
D_connectors Ring_terminals Fixing_block Quadrant
Displays Rockers Flat_hinge Round
Fans Rod Foot Rounded_cylinder
Fuseholder Screws Handle Rounded_polygon
Geared_steppers Sealing_strip Psu_shroud Sector
' + name + '