mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2024-11-27 01:03:51 -05:00
Added circlips.
This commit is contained in:
parent
c1b5bd1b87
commit
f2ec3e71f4
20
libtest.scad
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])
|
||||
|
76
readme.md
76
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 |
|
||||
|
||||
![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 |
|
||||
|
||||
|
||||
<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 |
|
||||
@ -2616,10 +2659,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 |
|
||||
@ -4845,6 +4890,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 |
|
||||
|
40
tests/circlips.scad
Normal file
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])
|
||||
|
BIN
tests/png/circlips.png
Normal file
BIN
tests/png/circlips.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
Binary file not shown.
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 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],
|
||||
|
90
vitamins/circlip.scad
Normal file
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
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>
|
Loading…
Reference in New Issue
Block a user