1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-03 12:22:46 +02:00

Compare commits

...

9 Commits

Author SHA1 Message Date
Chris
4eaaee6a4d Merge branch 'jeroenrnl-nuthousing' 2022-09-29 11:58:06 +01:00
Chris
f1737d257b Updated images and readme. 2022-09-29 11:57:49 +01:00
Jeroen Roos
ce258d6d4f Leadnuts: add nuthousing 2022-09-27 21:50:28 +02:00
Chris
272b7efd45 Updated changelog. 2022-09-27 01:12:59 +01:00
Chris
e84b5721d7 Merge branch 'jeroenrnl-SC_flex' 2022-09-27 01:10:40 +01:00
Chris
ec85cc5d4c Updated images and readme. 2022-09-27 01:10:23 +01:00
Chris
264e4366f6 Merge branch 'SC_flex' of https://github.com/jeroenrnl/NopSCADlib into jeroenrnl-SC_flex 2022-09-27 00:35:19 +01:00
Chris
233fba275d Updated changelog. 2022-09-27 00:18:08 +01:00
Jeroen Roos
fb6695471f Shaft coupling: Add flexible SC / 6x8 flexible SC
Added the possibility for shaft couplings to be flexible and added a 6x8
example of such a coupling.
2022-09-24 14:17:15 +02:00
11 changed files with 146 additions and 6 deletions

View File

@@ -3,6 +3,27 @@
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
### [v20.13.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.13.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.12.0...v20.13.0 "diff with v20.12.0")
* 2022-09-27 [`ec85cc5`](https://github.com/nophead/NopSCADlib/commit/ec85cc5d4c76baedae670a5652194bd1799a7094 "show commit") [C.](# "Chris") Updated images and readme.
* 2022-09-24 [`fb66954`](https://github.com/nophead/NopSCADlib/commit/fb6695471f935057a0949e55f70a39911ac81f4c "show commit") [J.R.](# "Jeroen Roos") Shaft coupling: Add flexible SC `/` 6x8 flexible SC
* Added the possibility for shaft couplings to be flexible and added a 6x8
example of such a coupling.
### [v20.12.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.12.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.11.0...v20.12.0 "diff with v20.11.0")
* 2022-09-27 [`c9ac393`](https://github.com/nophead/NopSCADlib/commit/c9ac393c0c7b025b3e6ad9e1030d1b13f8b879c3 "show commit") [C.](# "Chris") Printed corner blocks now have a `short_insert` option.
* 2022-09-27 [`208334a`](https://github.com/nophead/NopSCADlib/commit/208334a585ed0605bf7dbaab1050c060aa15edb7 "show commit") [C.](# "Chris") Printed box now has a short insert option.
* 2022-09-27 [`3a17b89`](https://github.com/nophead/NopSCADlib/commit/3a17b89d5ceb69834b23ff6bc46523f2dfb15f99 "show commit") [C.](# "Chris") Added short inserts and M5 inserts.
`screw_insert()` now takes a short flag.
`screw_length()` can now be passed an insert object.
* 2022-09-25 [`0f36c02`](https://github.com/nophead/NopSCADlib/commit/0f36c02b5e34b0b45d258ff8e6ed4536f0601d92 "show commit") [C.](# "Chris") Added `layer_height0` global variable and updated `round_to_layer()` to handle it.
* Moved functions from `global_defs.scad` to `global.scad` so they get documented.
### [v20.11.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.11.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.10.3...v20.11.0 "diff with v20.10.3")
* 2022-08-30 [`c1e4625`](https://github.com/nophead/NopSCADlib/commit/c1e4625382646faf6a00e78ac01e495a88169b35 "show commit") [C.](# "Chris") Replaced generic chips with SOIC8.
Updated images and readme.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 993 KiB

After

Width:  |  Height:  |  Size: 996 KiB

View File

@@ -279,6 +279,9 @@ translate([x0, pulleys_y])
translate([x0, leadnuts_y])
leadnuts();
translate([x0 + 120, leadnuts_y])
leadnuthousings();
translate([x0, linear_bearings_y]) {
linear_bearings();
rods();

View File

@@ -1650,6 +1650,16 @@ Nuts for leadscrews.
| `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 |
@@ -1661,15 +1671,21 @@ Nuts for leadscrews.
|:--- |:--- |
| `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 | `leadnut(LSN8x2)` | Leadscrew nut 8 x 2 |
| 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 |
<a href="#top">Top</a>
@@ -3481,6 +3497,7 @@ Shaft couplings
| `sc_diameter(type)` | Coupling outer diameter |
| `sc_diameter1(type)` | Diameter of smaller shaft |
| `sc_diameter2(type)` | Diameter of larger shaft |
| `sc_flexible(type)` | Flexible coupling |
| `sc_length(type)` | Coupling length |
### Modules
@@ -3494,6 +3511,7 @@ Shaft couplings
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `shaft_coupling(SC_5x8_rigid)` | Shaft coupling SC_5x8_rigid |
| 1 | `shaft_coupling(SC_6x8_flex)` | Shaft coupling SC_6x8_flex |
<a href="#top">Top</a>

View File

@@ -25,6 +25,26 @@ module leadnuts()
layout([for(n = leadnuts) leadnut_flange_dia(n)], 5)
leadnut(leadnuts[$i]);
module leadnuthousings()
layout([for(n = leadnuthousings) leadnuthousing_width(n)], 5) {
rotate([0,0,270]) {
leadnuthousing(leadnuthousings[$i]);
explode(15)
leadnuthousing_nut_position(leadnuthousings[$i])
leadnut(leadnuthousing_nut(leadnuthousings[$i]));
explode(17 + leadnuthousing_nut_screw_length(leadnuthousings[$i]))
translate_z(leadnuthousing_height(leadnuthousings[$i])/2)
leadnuthousing_nut_screw_positions(leadnuthousings[$i])
screw(leadnut_screw(
leadnuthousing_nut(leadnuthousings[$i])),
leadnuthousing_nut_screw_length(leadnuthousings[$i])
);
}
}
if($preview)
let($show_threads = true)
let($show_threads = true) {
leadnuts();
translate([0,50,0])
leadnuthousings();
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -23,6 +23,7 @@
include <../utils/core/core.scad>
use <../utils/tube.scad>
use <../utils/thread.scad>
use <../vitamins/screw.scad>
function leadnut_bore(type) = type[2]; //! Thread size
function leadnut_od(type) = type[3]; //! Outer diameter of the shank
@@ -41,6 +42,17 @@ function leadnut_colour(type) = type[15]; //! The colour
function leadnut_shank(type) = leadnut_height(type) - leadnut_flange_t(type) - leadnut_flange_offset(type); //! The length of the shank below the flange
function leadnuthousing_length(type) = type[2]; //! Length of housing
function leadnuthousing_width(type) = type[3]; //! Width of housing
function leadnuthousing_height(type) = type[4]; //! Height of housing
function leadnuthousing_hole_pos(type) = type[5]; //! Offset from center for nut hole
function leadnuthousing_screw_dist_l(type) = type[6]; //! Distance between mounting holes length
function leadnuthousing_screw_dist_w(type) = type[7]; //! Distance between mounting holes width
function leadnuthousing_mount_screw(type) = type[8]; //! Mounting screw
function leadnuthousing_mount_screw_len(type) = type[9]; //! Mounting screw length
function leadnuthousing_nut(type) = type[10]; //! Nut type this is suitable for
function leadnuthousing_nut_screw_length(type) = type[11]; //! Length of mounting screw for nut
module leadnut_screw_positions(type) { //! Position children at the screw holes
holes = leadnut_holes(type);
flat = leadnut_flat(type);
@@ -87,3 +99,58 @@ module leadnut(type) { //! Draw specified leadnut
}
}
}
module leadnuthousing_screw_positions(type) { //! Get screw positions to mount the leadnut housing
for(p = [[-1,-1], [1,-1], [1,1], [-1,1]])
translate([p.x * leadnuthousing_screw_dist_l(type)/2, p.y * leadnuthousing_screw_dist_w(type)/2, 0])
children();
}
module leadnuthousing_nut_position(type) { //! The position of the nut may be off-center, use this to get the position
translate([leadnuthousing_hole_pos(type),0, leadnuthousing_height(type)/2])
children();
}
module leadnuthousing_nut_screw_positions(type) { //! get screw positions to mount the nut to the nut housing
translate([leadnuthousing_hole_pos(type),0, 0])
leadnut_screw_positions(leadnuthousing_nut(type))
children();
}
module leadnuthousing(type) { //! Nut housing, to connect a lead nut to another object
vitamin(str("nuthousing(", type[0], "): ", type[1]));
leadnut = leadnuthousing_nut(type);
screw = leadnut_screw(leadnut);
d = screw_radius(screw) * 2;
p = metric_coarse_pitch(d);
sl = leadnuthousing_nut_screw_length(type);
ms = leadnuthousing_mount_screw(type);
msl = leadnuthousing_mount_screw_len(type);
md = screw_radius (ms) * 2;
mp = metric_coarse_pitch(md);
color("silver")
difference() {
cube([leadnuthousing_length(type), leadnuthousing_width(type), leadnuthousing_height(type)], center = true);
translate([leadnuthousing_hole_pos(type),0,0]) {
cylinder(d=leadnut_od(leadnut), h=leadnuthousing_length(type)+2, center=true);
translate_z(leadnut_flange_offset(leadnut))
leadnut_screw_positions(leadnut)
cylinder(r=screw_radius(leadnut_screw(leadnut)), h=sl+1);
}
rotate([0,90,0])
leadnuthousing_screw_positions(type)
cylinder(r=screw_radius(ms), h=msl+1);
}
if(show_threads) {
translate([leadnuthousing_hole_pos(type),0,leadnuthousing_height(type)/2 - sl/2 - leadnut_flange_t(leadnut)])
leadnut_screw_positions(leadnut)
female_metric_thread(d, p, sl, center = true, colour = silver);
rotate([0,90,0])
translate_z(msl/2)
leadnuthousing_screw_positions(type)
female_metric_thread(md, mp, msl, center = true, colour = silver);
}
}

View File

@@ -29,5 +29,9 @@ LSN8x8 = ["LSN8x8", "Leadscrew nut 8 x 8 RobotDigg", 8, 12.75,19, 25.4, 4.1, 0
SFU1610 = ["SFU1610", "Leadscrew nut for SFU1610", 16, 28, 42.5, 48, 10, 0, 6, 6, 38/2, M6_cap_screw, 5, 10, 40, "#DFDAC5"];
leadnuts = [LSN8x2, LSN8x8, SFU1610];
// L W H Hole Mounting screws (top) Nut Nut mount screw
// Pos Dist L Dist W Type L Length
LNHT8x2 = [ "LNHT8x2", "Lead Screw Nut Housing T8", 30, 34, 30, -1, 20, 24, M4_cs_cap_screw, 15, LSN8x2, 15 ];
leadnuthousings = [LNHT8x2];
use <leadnut.scad>

View File

@@ -26,6 +26,7 @@ function sc_length(type) = type[1]; //! Coupling length
function sc_diameter(type) = type[2]; //! Coupling outer diameter
function sc_diameter1(type) = type[3]; //! Diameter of smaller shaft
function sc_diameter2(type) = type[4]; //! Diameter of larger shaft
function sc_flexible(type) = type[5]; //! Flexible coupling
module shaft_coupling(type, colour = "silver") { //! Draw the shaft coupling
vitamin(str("shaft_coupling(", type[0], "): Shaft coupling ", type[0]));
@@ -34,6 +35,7 @@ module shaft_coupling(type, colour = "silver") { //! Draw the shaft coupling
radius = sc_diameter(type) / 2;
r1 = sc_diameter1(type) / 2;
r2 = sc_diameter2(type) / 2;
flexible = is_undef(sc_flexible(type)) ? false : sc_flexible(type);
grub_length = 3;
module grub_screw_positions() {
@@ -54,6 +56,11 @@ module shaft_coupling(type, colour = "silver") { //! Draw the shaft coupling
tube(radius, r2, length / 2, false);
}
if (flexible) {
linear_extrude(length/3, center=true, convexity = 20, twist = -5 * 360)
translate([r1,0,0])
square(radius-r1,1);
}
grub_screw_positions()
rotate([180, 0, 0])
cylinder(r = screw_radius(M3_grub_screw), h = 5);

View File

@@ -21,9 +21,9 @@
//! Shaft couplings
//
// L D d1 d2
SC_5x8_rigid = [ "SC_5x8_rigid", 25, 12.5, 5, 8 ];
shaft_couplings = [SC_5x8_rigid];
// L D d1 d2 flex?
SC_5x8_rigid = [ "SC_5x8_rigid", 25, 12.5, 5, 8, false ];
SC_6x8_flex = [ "SC_6x8_flex", 25, 19, 6, 8, true ];
shaft_couplings = [SC_5x8_rigid, SC_6x8_flex];
use <shaft_coupling.scad>