Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a9c2f854c6 | ||
|
6187d90c57 | ||
|
65f320141d | ||
|
d367e743da | ||
|
3a4305f5ca | ||
|
a7dde2d4e2 | ||
|
56390bf8dd | ||
|
53f0bbcd6e | ||
|
f2ec3e71f4 | ||
|
c1b5bd1b87 | ||
|
268c066965 |
@@ -234,6 +234,19 @@ In OpenCSG 3D difference and intersection are relatively slow and the negative v
|
||||
as possible is done by unioning primitives and extruded 2D shapes. Any 3D differences or intersections are wrapped in ```render()``` so that CGAL will compute a polyhedron
|
||||
that is cached and reused. This will be very slow the first time it renders but very fast afterwards.
|
||||
|
||||
### Panels and Platters
|
||||
|
||||
The ```stls``` and ```dxfs``` scripts produce a file for each part but often it is desirable to print or route collections of parts laid out together.
|
||||
This can be done by adding scad files to folders called ```platters``` for STL files and ```panels``` for DXF files.
|
||||
These can aggregate and lay out parts by including ```NopSCADlib/core.scad``` and using modules ```use_stl(name)``` and ```use_dxf(name)```.
|
||||
These modules import the already generated singular STL and DXF files, so they are relatively fast. The name does not include the suffix.
|
||||
The scad files typically also need to include other files from the project to get the dimensions of the parts to calculate their positions.
|
||||
|
||||
The composite part files have the same name as the scad file that generates them, with the suffix changed to ```.stl``` or ```.dxf```.
|
||||
|
||||
The generated files are placed in ```stls/printed``` and ```dxfs/routed```.
|
||||
Any parts that are not covered by the platters / panels are copied into the ```printed``` / ```routed``` directories, so that they contain everything to be made.
|
||||
|
||||
### Multiple configurations
|
||||
|
||||
Some parametric designs might have several configurations, for example a 3D printer with different size options. If several configurations need to be supported at the
|
||||
|
BIN
libtest.png
Before Width: | Height: | Size: 786 KiB After Width: | Height: | Size: 782 KiB |
20
libtest.scad
@@ -29,6 +29,7 @@ use <tests/blowers.scad>
|
||||
use <tests/bulldogs.scad>
|
||||
use <tests/buttons.scad>
|
||||
use <tests/cable_strips.scad>
|
||||
use <tests/circlips.scad>
|
||||
use <tests/components.scad>
|
||||
use <tests/d_connectors.scad>
|
||||
use <tests/displays.scad>
|
||||
@@ -147,11 +148,10 @@ translate([x5, cable_grommets_y + 250])
|
||||
translate([950, 600])
|
||||
box_test();
|
||||
|
||||
translate([890, 730])
|
||||
translate([890, 750])
|
||||
printed_boxes();
|
||||
|
||||
|
||||
translate([850, 1300])
|
||||
translate([850, 1330])
|
||||
bbox_test();
|
||||
|
||||
|
||||
@@ -159,8 +159,9 @@ inserts_y = 0;
|
||||
nuts_y = inserts_y + 20;
|
||||
washers_y = nuts_y + 120;
|
||||
screws_y = washers_y + 120;
|
||||
o_rings_y = screws_y + 130;
|
||||
springs_y = o_rings_y + 20;
|
||||
circlips_y = screws_y + 160;
|
||||
springs_y = circlips_y + 20;
|
||||
o_rings_y = springs_y;
|
||||
sealing_strip_y = springs_y + 20;
|
||||
tubings_y = sealing_strip_y + 20;
|
||||
pillars_y = tubings_y + 20;
|
||||
@@ -190,10 +191,13 @@ translate([x0, washers_y])
|
||||
translate([x0, screws_y])
|
||||
screws();
|
||||
|
||||
translate([x0, circlips_y])
|
||||
circlips();
|
||||
|
||||
translate([x0, o_rings_y])
|
||||
o_rings();
|
||||
|
||||
translate([x0, springs_y])
|
||||
translate([x0 + 20, springs_y])
|
||||
springs();
|
||||
|
||||
translate([x0 + 50, sealing_strip_y])
|
||||
@@ -208,7 +212,7 @@ translate([x0, pillars_y])
|
||||
translate([x0, leadnuts_y ])
|
||||
leadnuts();
|
||||
|
||||
translate([x0 + 80, leadnuts_y])
|
||||
translate([x0 + 60, leadnuts_y])
|
||||
ball_bearings();
|
||||
|
||||
translate([x0, pulleys_y])
|
||||
@@ -376,7 +380,7 @@ translate([x4 + 150, belts_y + 58]) {
|
||||
translate([x4, rails_y + 130])
|
||||
rails();
|
||||
|
||||
translate([900, fans_y + 50])
|
||||
translate([800, fans_y])
|
||||
cable_strips();
|
||||
|
||||
translate([x4, kp_pillow_blocks_y])
|
||||
|
@@ -18,7 +18,7 @@
|
||||
//
|
||||
|
||||
//
|
||||
//! Adapts ESP12 module to 0.1" grid. See <https://hydraraptor.blogspot.com/2018/04/esp-12-module-breakout-adaptor.html>.
|
||||
//! Adapts ESP12 modules and various small PCBs to 0.1" grid. See <https://hydraraptor.blogspot.com/2018/04/esp-12-module-breakout-adaptor.html>.
|
||||
//
|
||||
$extrusion_width = 0.5;
|
||||
|
||||
@@ -61,3 +61,71 @@ module ESP12F_carrier_stl() { //! Generate the STL for an ESP12 carrier
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module TP4056_carrier_stl() { //! Generate the STL for an TP4056 carrier, two required
|
||||
stl("TP4056_carrier");
|
||||
pitch = 2.54;
|
||||
outer_pitch = 13.9;
|
||||
inner_pitch = 7.54;
|
||||
hole = pitch - 3 * extrusion_width;
|
||||
pins = 6;
|
||||
length1 = outer_pitch + hole + squeezed_wall * 2;
|
||||
length2 = (pins - 1) * pitch + hole + squeezed_wall * 2;
|
||||
height = 3;
|
||||
|
||||
width = hole + squeezed_wall * 2;
|
||||
spacing = inch(0.9);
|
||||
|
||||
difference() {
|
||||
hull() {
|
||||
translate_z(height - eps / 2)
|
||||
cube([width, length1, eps], center = true);
|
||||
|
||||
translate_z(eps / 2)
|
||||
cube([width, length2, eps], center = true);
|
||||
}
|
||||
|
||||
for(i = [0 : pins - 1])
|
||||
let(x = [-outer_pitch / 2, - inner_pitch / 2, 0, 0, inner_pitch / 2, outer_pitch / 2][i])
|
||||
if(x)
|
||||
hull() {
|
||||
translate([0, x, height])
|
||||
cube([hole, hole, eps], center = true);
|
||||
|
||||
translate([0, i * pitch - (pins - 1) * pitch / 2])
|
||||
cube([hole, hole, eps], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module MT3608_carrier_stl() { //! Generate the STL for an MT3608 carrier, two required
|
||||
stl("MT3608_carrier");
|
||||
pcb_width = 17;
|
||||
w_pitch_top = 6.81;
|
||||
w_pitch_bot = inch(0.3);
|
||||
l_pitch_top = 30.855;
|
||||
l_pitch_bot = inch(1.2);
|
||||
hole = 1;
|
||||
height = 3;
|
||||
wall = 2 * extrusion_width;
|
||||
width = hole + 2 * wall;
|
||||
offset = (l_pitch_top - l_pitch_bot) / 2;
|
||||
|
||||
difference() {
|
||||
hull() {
|
||||
translate([offset, 0, height - eps / 2])
|
||||
rounded_rectangle([width, pcb_width - 2, eps], 1);
|
||||
|
||||
translate_z(eps / 2)
|
||||
rounded_rectangle([width, pcb_width - 2, eps], 1);
|
||||
}
|
||||
for(side = [-1, 1])
|
||||
hull() {
|
||||
translate([offset, side * w_pitch_top / 2, height])
|
||||
cube([hole, hole, eps], center = true);
|
||||
|
||||
translate([0, side * w_pitch_bot / 2])
|
||||
cube([hole, hole, eps], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
86
readme.md
@@ -25,21 +25,21 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa
|
||||
<tr><td> <a href = "#Bulldogs">Bulldogs</a> </td><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#SCS_bearing_blocks">SCS_bearing_blocks</a> </td><td> <a href = "#Corner_block">Corner_block</a> </td><td> <a href = "#Hanging_hole">Hanging_hole</a> </td><td> <a href = "#Rounded_rectangle">Rounded_rectangle</a> </td></tr>
|
||||
<tr><td> <a href = "#Buttons">Buttons</a> </td><td> <a href = "#Linear_bearings">Linear_bearings</a> </td><td> <a href = "#SK_brackets">SK_brackets</a> </td><td> <a href = "#Door_hinge">Door_hinge</a> </td><td> <a href = "#Layout">Layout</a> </td><td> <a href = "#Sphere">Sphere</a> </td></tr>
|
||||
<tr><td> <a href = "#Cable_strips">Cable_strips</a> </td><td> <a href = "#Mains_sockets">Mains_sockets</a> </td><td> <a href = "#SSRs">SSRs</a> </td><td> <a href = "#Door_latch">Door_latch</a> </td><td> <a href = "#Maths">Maths</a> </td><td> <a href = "#Teardrops">Teardrops</a> </td></tr>
|
||||
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Meter">Meter</a> </td><td> <a href = "#Screws">Screws</a> </td><td> <a href = "#Fan_guard">Fan_guard</a> </td><td> <a href = "#Offset">Offset</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Fixing_block">Fixing_block</a> </td><td> <a href = "#Quadrant">Quadrant</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#Modules">Modules</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#PCB_mount">PCB_mount</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#IECs">IECs</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Jack">Jack</a> </td><td></td><td> <a href = "#Wire">Wire</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td></td><td></td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Circlips">Circlips</a> </td><td> <a href = "#Meter">Meter</a> </td><td> <a href = "#Screws">Screws</a> </td><td> <a href = "#Fan_guard">Fan_guard</a> </td><td> <a href = "#Offset">Offset</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Fixing_block">Fixing_block</a> </td><td> <a href = "#Quadrant">Quadrant</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#Modules">Modules</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#PCB_mount">PCB_mount</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#IECs">IECs</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Inserts">Inserts</a> </td><td></td><td> <a href = "#Wire">Wire</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Jack">Jack</a> </td><td></td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
|
||||
</table>
|
||||
|
||||
---
|
||||
@@ -385,6 +385,48 @@ When the sides are constrained then a circular model is more accurate.
|
||||
| 3 | ```cable_strip(20, 25, 100, 30)``` | Polypropylene strip 189mm x 24mm x 0.8mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Circlips"></a>
|
||||
## 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 |
|
||||
|
||||
### 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 |
|
||||
|
||||

|
||||
|
||||
### 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 |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -1687,6 +1729,7 @@ If a nut is given a child then it gets placed on its top surface.
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```nut_pitch(type)``` | Pitch if not standard metric course thread |
|
||||
| ```nut_radius(type)``` | Radius across the corners |
|
||||
| ```nut_size(type)``` | Diameter of the corresponding screw |
|
||||
| ```nut_square_size(type)``` | Diameter of the corresponding screw |
|
||||
@@ -1880,7 +1923,9 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| ```pcb_screw_positions(type)``` | Positions children at the mounting hole positions |
|
||||
| ```pcb_spacer(screw, height, wall = 1.8, taper = 0)``` | Generate STL for PCB spacer |
|
||||
| ```rj45(cutout = false)``` | Draw RJ45 Ethernet connector |
|
||||
| ```standoff(h, d, h2, d2)``` | Draw a standoff |
|
||||
| ```terminal_35(ways, colour = "blue")``` | Draw 3.5mm terminal block |
|
||||
| ```trimpot10(vertical, coutout = false)``` | Draw a ten turn trimpot |
|
||||
| ```uSD(size, cutout = false)``` | Draw uSD socket |
|
||||
| ```usb_Ax1(cutout = false)``` | Draw USB type A single socket |
|
||||
| ```usb_Ax2(cutout = false)``` | Draw USB type A dual socket |
|
||||
@@ -1964,7 +2009,9 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| ```pcb_screw_positions(type)``` | Positions children at the mounting hole positions |
|
||||
| ```pcb_spacer(screw, height, wall = 1.8, taper = 0)``` | Generate STL for PCB spacer |
|
||||
| ```rj45(cutout = false)``` | Draw RJ45 Ethernet connector |
|
||||
| ```standoff(h, d, h2, d2)``` | Draw a standoff |
|
||||
| ```terminal_35(ways, colour = "blue")``` | Draw 3.5mm terminal block |
|
||||
| ```trimpot10(vertical, coutout = false)``` | Draw a ten turn trimpot |
|
||||
| ```uSD(size, cutout = false)``` | Draw uSD socket |
|
||||
| ```usb_Ax1(cutout = false)``` | Draw USB type A single socket |
|
||||
| ```usb_Ax2(cutout = false)``` | Draw USB type A dual socket |
|
||||
@@ -2616,10 +2663,12 @@ SCSnUU and SCSnLUU bearing blocks
|
||||
| ```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 |
|
||||
@@ -3744,7 +3793,7 @@ of conductive panels, an extra layer of insulation.
|
||||
---
|
||||
<a name="Carriers"></a>
|
||||
## Carriers
|
||||
Adapts ESP12 module to 0.1" grid. See <https://hydraraptor.blogspot.com/2018/04/esp-12-module-breakout-adaptor.html>.
|
||||
Adapts ESP12 modules and various small PCBs to 0.1" grid. See <https://hydraraptor.blogspot.com/2018/04/esp-12-module-breakout-adaptor.html>.
|
||||
|
||||
|
||||
[printed/carriers.scad](printed/carriers.scad) Implementation.
|
||||
@@ -3755,6 +3804,8 @@ Adapts ESP12 module to 0.1" grid. See <https://hydraraptor.blogspot.com/2018/04/
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```ESP12F_carrier_stl()``` | Generate the STL for an ESP12 carrier |
|
||||
| ```MT3608_carrier_stl()``` | Generate the STL for an MT3608 carrier, two required |
|
||||
| ```TP4056_carrier_stl()``` | Generate the STL for an TP4056 carrier, two required |
|
||||
|
||||

|
||||
|
||||
@@ -3762,6 +3813,8 @@ Adapts ESP12 module to 0.1" grid. See <https://hydraraptor.blogspot.com/2018/04/
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 1 | ESP12F_carrier.stl |
|
||||
| 1 | MT3608_carrier.stl |
|
||||
| 1 | TP4056_carrier.stl |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -4845,6 +4898,7 @@ Maths utilities for manipulating vectors and matrices.
|
||||
| ```euler(R)``` | Convert a rotation matrix to a Euler rotation vector. |
|
||||
| ```identity(n, x = 1)``` | Construct an arbitrary size identity matrix |
|
||||
| ```reverse(v)``` | Reverse a vector |
|
||||
| ```rot3_z(a)``` | Generate a 3x3 matrix to rotate around z |
|
||||
| ```rotate(a, v)``` | Generate a 4x4 rotation matrix, ```a``` can be a vector of three angles or a single angle around ```z```, or around axis ```v``` |
|
||||
| ```scale(v)``` | Generate a 4x4 matrix that scales by ```v```, which can be a vector of xyz factors or a scalar to scale all axes equally |
|
||||
| ```transform(v, m)``` | Apply 4x4 transform to a 3 vector by extending it and cropping it again |
|
||||
|
@@ -98,6 +98,8 @@ test_pcb = ["TestPCB", "Test PCB",
|
||||
[ 12, 444, 0, "2p54socket", 8, 1, undef, undef, undef, "red" ],
|
||||
[ 10, 470, 0, "standoff", 5, 4.5, 12.5, 2.54],
|
||||
[ 6, 480, 180, "uSD", [12, 11.5, 1.4]],
|
||||
[ 20, -5, 180, "trimpot10"],
|
||||
[ 20, -15, 0, "trimpot10", true],
|
||||
],
|
||||
// accessories
|
||||
[]
|
||||
|
@@ -19,7 +19,16 @@
|
||||
include <../utils/core/core.scad>
|
||||
use <../printed/carriers.scad>
|
||||
|
||||
module carriers()
|
||||
module carriers() {
|
||||
color(pp1_colour) ESP12F_carrier_stl();
|
||||
|
||||
translate([0, 15])
|
||||
rotate(90)
|
||||
color(pp1_colour) TP4056_carrier_stl();
|
||||
|
||||
translate([0, 25])
|
||||
rotate(90)
|
||||
color(pp1_colour) MT3608_carrier_stl();
|
||||
}
|
||||
|
||||
carriers();
|
||||
|
40
tests/circlips.scad
Normal file
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/circlips.scad>
|
||||
|
||||
module circlips(all = false)
|
||||
layout([for(c = circlips) circlip_d3(c)], 10, false) let(c = circlips[$i]) {
|
||||
gap = circlip_d3(c) + 2;
|
||||
|
||||
internal_circlip(c, 1);
|
||||
|
||||
if(all) {
|
||||
translate([0, gap])
|
||||
internal_circlip(c, 0);
|
||||
|
||||
translate([0, 2 * gap])
|
||||
internal_circlip(c, -1);
|
||||
}
|
||||
}
|
||||
|
||||
if($preview)
|
||||
circlips(true);
|
@@ -26,14 +26,13 @@ module resistors()
|
||||
resistor(resistors[$i]);
|
||||
|
||||
module al_clad_resistors()
|
||||
layout([for(a = al_clad_resistors) al_clad_width(a)])
|
||||
layout([for(a = al_clad_resistors) al_clad_width(a)], 5, true)
|
||||
rotate(90)
|
||||
al_clad_resistor_assembly(al_clad_resistors[$i], 4.7)
|
||||
screw(al_clad_hole(al_clad_resistors[$i]) > 3 ? M3_pan_screw : M2p5_pan_screw, 16);
|
||||
|
||||
|
||||
module thermal_cutouts()
|
||||
layout([for(t = thermal_cutouts) tc_length(t)])
|
||||
layout([for(t = thermal_cutouts) tc_length(t)], 5, true)
|
||||
thermal_cutout(thermal_cutouts[$i]);
|
||||
|
||||
module components() {
|
||||
@@ -42,7 +41,7 @@ module components() {
|
||||
translate([0, 50])
|
||||
TO220("Generic TO220 package");
|
||||
|
||||
translate([30, 50])
|
||||
translate([50, 50])
|
||||
panel_USBA();
|
||||
|
||||
translate([0,80])
|
||||
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 54 KiB |
BIN
tests/png/circlips.png
Normal file
After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 111 KiB |
@@ -56,6 +56,13 @@ function rotate(a, v) = //! Generate a 4x4 rotation matrix, ```a``` can be a vec
|
||||
[ 0, 0, 0, 1]
|
||||
];
|
||||
|
||||
function rot3_z(a) = //! Generate a 3x3 matrix to rotate around z
|
||||
let(c = cos(a),
|
||||
s = sin(a))
|
||||
[ [ c, -s, 0],
|
||||
[ s, c, 0],
|
||||
[ 0, 0, 1] ];
|
||||
|
||||
function scale(v) = let(s = is_list(v) ? v : [v, v, v]) //! Generate a 4x4 matrix that scales by ```v```, which can be a vector of xyz factors or a scalar to scale all axes equally
|
||||
[
|
||||
[s.x, 0, 0, 0],
|
||||
|
@@ -79,7 +79,7 @@ module thread(dia, pitch, length, profile, center = true, top = -1, bot = -1, st
|
||||
sides = r2sides4n(r);
|
||||
step_angle = 360 / sides;
|
||||
segs = ceil(turns * sides);
|
||||
leadin = ceil(sides / starts);
|
||||
leadin = min(ceil(sides / starts), floor(turns * sides / 2));
|
||||
final = floor(turns * sides) - leadin;
|
||||
path = [for(i = [0 : segs],
|
||||
R = i < leadin && bot < 0 ? r + dir * (h - h * i / leadin)
|
||||
|
90
vitamins/circlip.scad
Normal file
@@ -0,0 +1,90 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Circlips aka tapered retaining rings.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
include <../utils/sector.scad>
|
||||
include <../utils/round.scad>
|
||||
include <../utils/maths.scad>
|
||||
|
||||
function circlip_d1(type) = type[1]; //! Nominal OD, i.e. diameter of tube
|
||||
function circlip_d2(type) = type[2]; //! Groove diameter, i.e. OD when installed
|
||||
function circlip_d3(type) = type[3]; //! Relaxed OD when not installed
|
||||
function circlip_thickness(type) = type[4]; //! Thickness
|
||||
function circlip_a(type) = type[5]; //! Size of the lugs
|
||||
function circlip_b(type) = type[6]; //! Widest part of the taper
|
||||
function circlip_d5(type) = type[7]; //! Plier hole diameter
|
||||
|
||||
circlip_colour = grey20;
|
||||
closed_angle = 25;
|
||||
|
||||
module internal_circlip(type, open = 0) { //! Draw specified internal circlip, open = 0, for nominal size installed, 1 for relaxed uninstalled, -1 for squeezed to install
|
||||
d1 = circlip_d1(type);
|
||||
|
||||
vitamin(str("circlip(", type[0], "): Circlip internal ", d1, "mm"));
|
||||
d3 = circlip_d3(type);
|
||||
d2 = circlip_d2(type);
|
||||
a = circlip_a(type);
|
||||
b = circlip_b(type);
|
||||
d5 = circlip_d5(type);
|
||||
|
||||
od = lookup(open, [[-1, d1], [0, d2], [1, d3]]);
|
||||
or = od / 2;
|
||||
c = (d3 - d1);
|
||||
|
||||
angle = (od - d1) / d1 * 360 + closed_angle;
|
||||
tab_angle = 360 * a / PI / od;
|
||||
p = [0, -or + b / 2, 1] * rot3_z(angle / 2 + tab_angle);
|
||||
pitch = (or - a / 2);
|
||||
y_offset = (sqr(p.x) + sqr(p.y) - sqr(or - b)) / (or - b - p.y) / 2;
|
||||
ir = or - b + y_offset;
|
||||
color(circlip_colour)
|
||||
linear_extrude(height = circlip_thickness(type), center = true)
|
||||
round((a - d5) / 5)
|
||||
union() {
|
||||
difference() {
|
||||
circle(or);
|
||||
|
||||
translate([0, -y_offset])
|
||||
circle(ir);
|
||||
|
||||
sector(d3 / 2 + 1, 270 - angle / 2 - tab_angle, 270 + angle / 2 + tab_angle);
|
||||
|
||||
}
|
||||
for(side = [-1, 1])
|
||||
intersection() {
|
||||
circle(or);
|
||||
|
||||
rotate(side * (angle + tab_angle) / 2)
|
||||
difference() {
|
||||
hull() {
|
||||
translate([0, -pitch])
|
||||
circle(d = a);
|
||||
|
||||
translate([0, -pitch - a])
|
||||
circle(d = 1.5 * a);
|
||||
}
|
||||
translate([0, -pitch])
|
||||
circle(d = d5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
28
vitamins/circlips.scad
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
// d1 d2 d3 s a b d5
|
||||
circlip_12i = ["circlip_12i", 12, 12.5, 13.0, 1.0, 3.4, 1.7, 1.5];
|
||||
circlip_15i = ["circlip_15i", 15, 15.7, 16.2, 1.0, 3.7, 2.0, 1.7];
|
||||
circlip_19i = ["circlip_19i", 19, 20.0, 20.5, 1.0, 4.1, 2.2, 2.0];
|
||||
circlip_21i = ["circlip_21i", 21, 22.0, 22.5, 1.0, 4.2, 2.4, 2.0];
|
||||
circlip_28i = ["circlip_28i", 28, 29.4, 30.1, 1.2, 4.8, 2.9, 2.0];
|
||||
|
||||
circlips = [circlip_12i, circlip_15i, circlip_19i, circlip_21i, circlip_28i];
|
||||
|
||||
use <circlip.scad>
|
@@ -26,7 +26,7 @@ use <../utils/tube.scad>
|
||||
|
||||
bearing_colour = grey70;
|
||||
groove_colour = grey60;
|
||||
seal_colour = grey20;
|
||||
seal_colour = grey30;
|
||||
|
||||
|
||||
function bearing_length(type) = type[1]; //! Total length
|
||||
@@ -61,5 +61,10 @@ module linear_bearing(type) { //! Draw specified linear bearing
|
||||
color(bearing_colour) translate_z(offset+gs) tube(or = or, ir = casing_ir, h = offset, center = false);
|
||||
}
|
||||
}
|
||||
color(seal_colour) tube(or = casing_ir, ir = bearing_rod_dia(type) / 2, h = length - 0.5);
|
||||
rod_r = bearing_rod_dia(type) / 2;
|
||||
color(seal_colour)
|
||||
tube(or = casing_ir, ir = rod_r + eps, h = length - 0.5);
|
||||
|
||||
color(seal_colour * 0.8)
|
||||
tube(or = rod_r * 1.12, ir = rod_r, h = length);
|
||||
}
|
||||
|
@@ -36,6 +36,7 @@ function nut_radius(type) = type[2] / 2; //! Radius across the corners
|
||||
function nut_thickness(type, nyloc = false) = nyloc ? type[4] : type[3]; //! Thickness of plain or nyloc version
|
||||
function nut_washer(type) = type[5]; //! Corresponding washer
|
||||
function nut_trap_depth(type) = type[6]; //! Depth of nut trap
|
||||
function nut_pitch(type) = type[7]; //! Pitch if not standard metric course thread
|
||||
|
||||
function nut_flat_radius(type) = nut_radius(type) * cos(30); //! Radius across the flats
|
||||
|
||||
@@ -45,6 +46,7 @@ function nut_square_thickness(type) = type[3]; //! Thickness of the square nut
|
||||
|
||||
module nut(type, nyloc = false, brass = false, nylon = false) { //! Draw specified nut
|
||||
thread_d = nut_size(type);
|
||||
thread_p = nut_pitch(type) ? nut_pitch(type) : metric_coarse_pitch(thread_d);
|
||||
hole_rad = thread_d / 2;
|
||||
outer_rad = nut_radius(type);
|
||||
thickness = nut_thickness(type);
|
||||
@@ -69,7 +71,7 @@ module nut(type, nyloc = false, brass = false, nylon = false) { //! Draw specifi
|
||||
}
|
||||
|
||||
if(show_threads)
|
||||
female_metric_thread(thread_d, metric_coarse_pitch(thread_d), thickness, center = false, colour = colour);
|
||||
female_metric_thread(thread_d, thread_p, thickness, center = false, colour = colour);
|
||||
|
||||
if(nyloc)
|
||||
translate_z(thickness)
|
||||
|
@@ -28,28 +28,34 @@ M5_nut_depth = 4;
|
||||
M6_nut_depth = 5;
|
||||
M8_nut_depth = 6.5;
|
||||
|
||||
// s r t n w t
|
||||
// c a h y a r
|
||||
// r d i l s a
|
||||
// e i c o h p
|
||||
// w u k c e
|
||||
// s r t n w t t
|
||||
// c a h y a r h
|
||||
// r d i l s a r
|
||||
// e i c o h p e
|
||||
// w u k c e d
|
||||
// s n r d
|
||||
// e t e
|
||||
// s h p
|
||||
// s k t
|
||||
// h
|
||||
//
|
||||
M2_nut = ["M2_nut", 2, 4.9, 1.6, 2.4, M2_washer, M2_nut_trap_depth];
|
||||
M2p5_nut = ["M2p5_nut", 2.5, 5.8, 2.2, 3.8, M2p5_washer, M2p5_nut_trap_depth];
|
||||
M3_nut = ["M3_nut", 3, 6.4, 2.4, 4, M3_washer, M3_nut_trap_depth];
|
||||
M4_nut = ["M4_nut", 4, 8.1, 3.2, 5, M4_washer, M4_nut_trap_depth];
|
||||
M5_nut = ["M5_nut", 5, 9.2, 4, 6.25, M5_washer, M5_nut_depth];
|
||||
M6_nut = ["M6_nut", 6, 11.5, 5, 8, M6_washer, M6_nut_depth];
|
||||
M6_half_nut = ["M6_half_nut", 6, 11.5, 3, 8, M6_washer, 3];
|
||||
M8_nut = ["M8_nut", 8, 15, 6.5, 8, M8_washer, M8_nut_depth];
|
||||
toggle_nut = ["toggle_nut", 6.1, 9.2, 1.5, 1.5, M6_washer, 1.5];
|
||||
// e t e p
|
||||
// s h p i
|
||||
// s k t t
|
||||
// h c
|
||||
// h
|
||||
M2_nut = ["M2_nut", 2, 4.9, 1.6, 2.4, M2_washer, M2_nut_trap_depth, 0];
|
||||
M2p5_nut = ["M2p5_nut", 2.5, 5.8, 2.2, 3.8, M2p5_washer, M2p5_nut_trap_depth, 0];
|
||||
M3_nut = ["M3_nut", 3, 6.4, 2.4, 4, M3_washer, M3_nut_trap_depth, 0];
|
||||
M4_nut = ["M4_nut", 4, 8.1, 3.2, 5, M4_washer, M4_nut_trap_depth, 0];
|
||||
M5_nut = ["M5_nut", 5, 9.2, 4, 6.25, M5_washer, M5_nut_depth, 0];
|
||||
M6_nut = ["M6_nut", 6, 11.5, 5, 8, M6_washer, M6_nut_depth, 0];
|
||||
M6_half_nut = ["M6_half_nut", 6, 11.5, 3, 8, M6_washer, 3, 0];
|
||||
M8_nut = ["M8_nut", 8, 15, 6.5, 8, M8_washer, M8_nut_depth, 0];
|
||||
toggle_nut = ["toggle_nut", 6.1, 9.2, 1.5, 1.5, M6_washer, 1.5, inch(1/40)];
|
||||
|
||||
M4_wingnut = ["M4_wingnut", 4, 10, 3.75,8, M4_washer, 0, 22, 10, 6, 3];
|
||||
// sx ty1 ty2 hammer
|
||||
M3_sliding_t_nut = ["M3_sliding_t_nut", 3, 6, 3.0, 4.0, false, 0, 10, 10, 6, false];
|
||||
M4_sliding_t_nut = ["M4_sliding_t_nut", 4, 6, 3.25,4.5, false, 0, 11, 10, 6, false];
|
||||
M5_sliding_t_nut = ["M5_sliding_t_nut", 5, 6, 3.25,4.5, false, 0, 11, 10, 7, false];
|
||||
M3_hammer_nut = ["M3_hammer_nut", 3, 6, 2.75,4.0, false, 0, 5.5, 10, 6, true];
|
||||
M4_hammer_nut = ["M4_hammer_nut", 4, 6, 3.25,4.5, false, 0, 5.5, 10, 6, true];
|
||||
|
||||
// DIN 562 (thin) square nuts
|
||||
// s w h
|
||||
@@ -65,13 +71,6 @@ M5nS_thin_nut = ["M5nS_thin_nut", 5, 8, 2.7];
|
||||
M6nS_thin_nut = ["M6nS_thin_nut", 6, 10, 3.2];
|
||||
M8nS_thin_nut = ["M8nS_thin_nut", 8, 13, 4];
|
||||
|
||||
// sx ty1 ty2 hammer
|
||||
M3_sliding_t_nut = ["M3_sliding_t_nut", 3, 6, 3.0, 4.0, false, 0, 10, 10, 6, false];
|
||||
M4_sliding_t_nut = ["M4_sliding_t_nut", 4, 6, 3.25,4.5, false, 0, 11, 10, 6, false];
|
||||
M5_sliding_t_nut = ["M5_sliding_t_nut", 5, 6, 3.25,4.5, false, 0, 11, 10, 7, false];
|
||||
M3_hammer_nut = ["M3_hammer_nut", 3, 6, 2.75,4.0, false, 0, 5.5, 10, 6, true];
|
||||
M4_hammer_nut = ["M4_hammer_nut", 4, 6, 3.25,4.5, false, 0, 5.5, 10, 6, true];
|
||||
|
||||
nuts = [M2_nut, M2p5_nut, M3_nut, M4_nut, M5_nut, M6_nut, M8_nut];
|
||||
|
||||
use <nut.scad>
|
||||
|
@@ -721,7 +721,7 @@ module molex_254(ways) { //! Draw molex header
|
||||
cube([0.44, 0.75, above + below], center = true);
|
||||
}
|
||||
|
||||
module standoff(h, d, h2, d2) {
|
||||
module standoff(h, d, h2, d2) { //! Draw a standoff
|
||||
color("white") {
|
||||
cylinder(d = d, h = h);
|
||||
|
||||
@@ -735,6 +735,44 @@ module standoff(h, d, h2, d2) {
|
||||
}
|
||||
}
|
||||
|
||||
module trimpot10(vertical, coutout = false) { //! Draw a ten turn trimpot
|
||||
l = 10;
|
||||
w = 9.5;
|
||||
h = 4.8;
|
||||
foot_w = 1;
|
||||
foot_h = 0.5;
|
||||
screw_h = 1.5;
|
||||
screw_d = 2.25;
|
||||
slot_w = 0.6;
|
||||
slot_h = 0.8;
|
||||
|
||||
translate(vertical ? [0, -h / 2, l / 2] : [0, 0])
|
||||
rotate([vertical ? -90 : 0, 0, 0]) {
|
||||
color("#2CA1FD") {
|
||||
translate([0, -foot_h / 2, foot_h / 2 + h / 2])
|
||||
cube([w, l - foot_h, h - foot_h], center = true);
|
||||
|
||||
for(x = [-1, 1], y = [-1, 1])
|
||||
translate([x * (w - foot_w) / 2, y * (l - foot_w) / 2, h / 2])
|
||||
cube([foot_w, foot_w, h], center = true);
|
||||
|
||||
}
|
||||
|
||||
color(brass)
|
||||
translate([-w / 2 + screw_d / 2, -l / 2, h - screw_d / 2])
|
||||
rotate([90, 0, 0]) {
|
||||
cylinder(d = screw_d, h = screw_h - slot_h);
|
||||
|
||||
linear_extrude(height = screw_h)
|
||||
difference() {
|
||||
circle(d = screw_d);
|
||||
|
||||
square([slot_w, screw_d + 1], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb component from description
|
||||
function show(comp, part) = (comp[3] == part || comp[3] == str("-",part)) && (!cutouts || angle == undef || angle == comp.z);
|
||||
function param(n, default = 0) = len(comp) > n ? comp[n] : default;
|
||||
@@ -773,6 +811,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
if(show(comp, "pcb")) if(!cutouts) translate_z(comp[4]) pcb(comp[5]);
|
||||
if(show(comp, "standoff")) if(!cutouts) standoff(comp[4], comp[5], comp[6], comp[7]);
|
||||
if(show(comp, "uSD")) uSD(comp[4], cutouts);
|
||||
if(show(comp, "trimpot10")) trimpot10(param(4, false), cutouts);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -848,10 +887,20 @@ module pcb(type) { //! Draw specified PCB
|
||||
circle(d = 1 + eps);
|
||||
}
|
||||
|
||||
land = pcb_land_d(type);
|
||||
hole = pcb_hole_d(type);
|
||||
color("silver")
|
||||
translate_z(t / 2)
|
||||
pcb_hole_positions(type)
|
||||
tube(or = max(pcb_land_d(type), 1) / 2, ir = pcb_hole_d(type) / 2, h = t + 2 * eps);
|
||||
if(is_list(land))
|
||||
linear_extrude(height = t + 2 * eps, center = true)
|
||||
difference() {
|
||||
square(land, center = true);
|
||||
|
||||
circle(d = hole);
|
||||
}
|
||||
else
|
||||
tube(or = max(land, 1) / 2, ir = hole / 2, h = t + 2 * eps);
|
||||
|
||||
fr4 = pcb_colour(type) != "sienna";
|
||||
plating = 0.15;
|
||||
|
@@ -27,6 +27,7 @@ use <screw.scad>
|
||||
use <nut.scad>
|
||||
use <washer.scad>
|
||||
use <linear_bearing.scad>
|
||||
use <circlip.scad>
|
||||
|
||||
function scs_size(type) = [type[4],type[6],type[5]]; //! Size of scs bracket bounding block
|
||||
function scs_hole_offset(type) = type[2]; //! Offset of bearing hole from base of block
|
||||
@@ -36,6 +37,8 @@ function scs_screw(type) = type[11]; //! Screw type
|
||||
function scs_screw_separation_x(type) = type[8]; //! Screw separation in X direction
|
||||
function scs_screw_separation_z(type) = type[9]; //! Screw separation in Z direction
|
||||
function scs_bearing(type) = type[14]; //! Linear bearing used
|
||||
function scs_circlip(type) = type[15]; //! Circlip used
|
||||
function scs_spacer(type) = type[16]; //! Spacer used in long bearings
|
||||
|
||||
|
||||
sks_bearing_block_color = grey90;
|
||||
@@ -57,6 +60,8 @@ module scs_bearing_block(type) { //! Draw the specified SCS bearing block
|
||||
S1 = scs_screw(type);
|
||||
S2 = type[12];
|
||||
L1 = type[13];
|
||||
bearing = scs_bearing(type);
|
||||
clip = scs_circlip(type);
|
||||
|
||||
module 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
|
||||
extrude_if(h, center = center)
|
||||
@@ -64,11 +69,11 @@ module scs_bearing_block(type) { //! Draw the specified SCS bearing block
|
||||
}
|
||||
|
||||
boltHoleRadius = screw_clearance_radius(S1);
|
||||
footHeight = min(0.75, (G - bearing_dia(scs_bearing(type)) - 1.5) / 2); // estimate, not specified on drawings
|
||||
footHeight = min(0.75, (G - bearing_dia(bearing) - 1.5) / 2); // estimate, not specified on drawings
|
||||
|
||||
color(sks_bearing_block_color) {
|
||||
linear_extrude(L, center = true) {
|
||||
bearingRadius = bearing_dia(scs_bearing(type)) / 2;
|
||||
bearingRadius = bearing_dia(bearing) / 2;
|
||||
// center section with bearing hole
|
||||
difference() {
|
||||
union() {
|
||||
@@ -117,8 +122,17 @@ module scs_bearing_block(type) { //! Draw the specified SCS bearing block
|
||||
circle(r = boltHoleRadius);
|
||||
}
|
||||
}
|
||||
not_on_bom() no_explode()
|
||||
linear_bearing(scs_bearing(type));
|
||||
not_on_bom() no_explode() {
|
||||
spacer = scs_spacer(type);
|
||||
for(end = spacer ? [-1, 1] : 0)
|
||||
translate_z(end * (bearing_length(bearing) + spacer) / 2)
|
||||
linear_bearing(bearing);
|
||||
|
||||
for(end = [-1, 1])
|
||||
translate_z(end * ((spacer ? 2 * bearing_length(bearing) + spacer : bearing_length(bearing)) + circlip_thickness(clip)) / 2)
|
||||
rotate(180)
|
||||
internal_circlip(clip);
|
||||
}
|
||||
}
|
||||
|
||||
module scs_bearing_block_hole_positions(type) { //! Place children at hole positions
|
||||
|
@@ -22,18 +22,19 @@
|
||||
//
|
||||
|
||||
include <linear_bearings.scad>
|
||||
include <circlips.scad>
|
||||
|
||||
// T h E W L F G B C K S1 S2 L1 LB
|
||||
SCS6UU = ["SCS6UU", 6, 9, 15, 30, 25, 18, 15, 20, 15, 5, M4_cap_screw, 3.4, 8, LM6UU];
|
||||
SCS8UU = ["SCS8UU", 6, 11, 17, 34, 30, 22, 18, 24, 18, 5, M4_cap_screw, 3.4, 8, LM8UU];
|
||||
SCS10UU = ["SCS10UU", 8, 13, 20, 40, 35, 26, 21, 28, 21, 6, M5_cap_screw, 4.3, 12, LM10UU];
|
||||
SCS12UU = ["SCS12UU", 8, 15, 21, 42, 36, 28, 24, 30.5, 26, 5.75, M5_cap_screw, 4.3, 12, LM12UU];
|
||||
SCS16UU = ["SCS16UU", 9, 19, 25, 50, 44, 38.5, 32.5, 36, 34, 7, M5_cap_screw, 4.3, 12, LM16UU];
|
||||
SCS6UU = ["SCS6UU", 6, 9, 15, 30, 25, 18, 15, 20, 15, 5, M4_cap_screw, 3.4, 8, LM6UU, circlip_12i, 0];
|
||||
SCS8UU = ["SCS8UU", 6, 11, 17, 34, 30, 22, 18, 24, 18, 5, M4_cap_screw, 3.4, 8, LM8UU, circlip_15i, 0];
|
||||
SCS10UU = ["SCS10UU", 8, 13, 20, 40, 35, 26, 21, 28, 21, 6, M5_cap_screw, 4.3, 12, LM10UU, circlip_19i, 0];
|
||||
SCS12UU = ["SCS12UU", 8, 15, 21, 42, 36, 28, 24, 30.5, 26, 5.75, M5_cap_screw, 4.3, 12, LM12UU, circlip_21i, 0];
|
||||
SCS16UU = ["SCS16UU", 9, 19, 25, 50, 44, 38.5, 32.5, 36, 34, 7, M5_cap_screw, 4.3, 12, LM16UU, circlip_28i, 0];
|
||||
|
||||
SCS8LUU = ["SCS8LUU", 6, 11, 17, 34, 58, 22, 18, 24, 42, 5, M4_cap_screw, 3.4, 8, LM8LUU];
|
||||
SCS10LUU = ["SCS10LUU", 8, 13, 20, 40, 68, 26, 21, 28, 45, 6, M5_cap_screw, 4.3, 12, LM10LUU];
|
||||
SCS12LUU = ["SCS12LUU", 8, 15, 21, 42, 70, 28, 24, 30.5, 50, 5.75, M5_cap_screw, 4.3, 12, LM12LUU];
|
||||
SCS16LUU = ["SCS16LUU", 9, 19, 25, 50, 85, 38.5, 32.5, 36, 60, 7, M5_cap_screw, 4.3, 12, LM16LUU];
|
||||
SCS8LUU = ["SCS8LUU", 6, 11, 17, 34, 58, 22, 18, 24, 42, 5, M4_cap_screw, 3.4, 8, LM8UU, circlip_15i, 4];
|
||||
SCS10LUU = ["SCS10LUU", 8, 13, 20, 40, 68, 26, 21, 28, 45, 6, M5_cap_screw, 4.3, 12, LM10UU, circlip_19i, 4];
|
||||
SCS12LUU = ["SCS12LUU", 8, 15, 21, 42, 70, 28, 24, 30.5, 50, 5.75, M5_cap_screw, 4.3, 12, LM12UU, circlip_21i, 4];
|
||||
SCS16LUU = ["SCS16LUU", 9, 19, 25, 50, 85, 38.5, 32.5, 36, 60, 7, M5_cap_screw, 4.3, 12, LM16UU, circlip_28i, 4];
|
||||
|
||||
|
||||
scs_bearing_blocks = [SCS6UU, SCS8UU, SCS10UU, SCS12UU, SCS16UU];
|
||||
|