1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-03 20:32:35 +02:00

Compare commits

...

58 Commits

Author SHA1 Message Date
Chris Palmer
d4e8dd8311 Wire_hole_radius() now rounded up to half mm diameters to match metric drills.
mouse_grommet STL name is now based on the diameter instead of the radius.
Added mouse_grommet_length(r) and documented mouse_grommet_offset(r).
2022-01-23 09:14:09 +00:00
Chris Palmer
1928ec6fb1 Box can now be named to allow more than one in a project.
box_hole_inset(type) documented.
2022-01-23 09:08:27 +00:00
Chris Palmer
f4b9ab961c Fixed blower_exit_offset() for square blowers with 2 screws. 2022-01-23 09:04:46 +00:00
Chris Palmer
ac7c4403b9 Updated changelog. 2022-01-10 23:55:40 +00:00
Chris Palmer
b7b40ba6a4 Merge branch 'ggabbiani-fix-grid-origin-offsets' 2022-01-10 23:52:33 +00:00
Chris Palmer
317b485ee1 Updated the image. 2022-01-10 23:52:00 +00:00
Chris Palmer
6218287e2a Merge branch 'fix-grid-origin-offsets' of https://github.com/ggabbiani/NopSCADlib into ggabbiani-fix-grid-origin-offsets 2022-01-10 23:36:51 +00:00
Chris Palmer
d04f2bc8d1 Updated changelog. 2022-01-10 23:34:08 +00:00
Chris Palmer
49c26079fe Added M3x6_hex_pillar. 2022-01-10 23:32:01 +00:00
Chris Palmer
b5ee63bfc4 Added more documentation for microswitches. 2022-01-10 23:31:02 +00:00
Chris Palmer
a5bc80c0e8 Added D_plug_d() function. 2022-01-10 23:28:33 +00:00
Chris Palmer
bf8014fba0 Added tubing_ir() function. 2022-01-10 23:20:04 +00:00
Giampiero Gabbiani
ccf2b8e21b Reverted PERF74x51 2022-01-11 00:00:16 +01:00
Giampiero Gabbiani
99f277de8d Fixed offset calculations 2022-01-08 00:10:57 +01:00
Giampiero Gabbiani
fe1ab5d59a Fixed grid origin offsets 2022-01-07 13:47:00 +01:00
Chris Palmer
e06b485d3e Updated changelog. 2021-12-14 21:37:54 +00:00
Chris Palmer
72d9c398bc Merge branch 'martinbudden-teardrop_angle' 2021-12-14 21:35:37 +00:00
Chris Palmer
608f0b2db0 Simplified teardrop top length calculation. 2021-12-14 21:22:29 +00:00
Chris Palmer
7f8dfb9e73 Merge branch 'teardrop_angle' of https://github.com/martinbudden/NopSCADlib into martinbudden-teardrop_angle 2021-12-14 20:50:39 +00:00
Chris Palmer
c9de51fbbb Updated changelog. 2021-12-14 17:57:36 +00:00
Chris Palmer
30b7d966a1 Merge branch 'martinbudden-camera_fov' 2021-12-14 17:55:06 +00:00
Chris Palmer
abe1b1db01 Updated readme. 2021-12-14 17:53:10 +00:00
Chris Palmer
8835fa0b7d Merge branch 'camera_fov' of https://github.com/martinbudden/NopSCADlib into martinbudden-camera_fov 2021-12-14 17:49:08 +00:00
Martin Budden
71f935de8e Corrected FOV handling. 2021-12-14 12:11:03 +00:00
Chris Palmer
b0a6a873c0 Merge branch 'martinbudden-core_xy_improvements' 2021-12-12 23:21:27 +00:00
Chris Palmer
0771d4742c Updated changelog. 2021-12-12 23:18:28 +00:00
Chris Palmer
970c538496 Updated images and readme. 2021-12-12 23:16:09 +00:00
Chris Palmer
4d44eae16a Merge branch 'core_xy_improvements' of https://github.com/martinbudden/NopSCADlib into martinbudden-core_xy_improvements 2021-12-12 23:07:20 +00:00
Martin Budden
cec790ec09 Fixed y-carriage plain pulley and test. 2021-12-12 10:32:18 +00:00
Chris Palmer
3c9ec5455b Merge branch 'core_xy_improvements' of https://github.com/martinbudden/NopSCADlib into martinbudden-core_xy_improvements 2021-12-12 08:43:45 +00:00
Chris Palmer
5be85f5c25 Updated changelog. 2021-12-12 08:42:26 +00:00
Chris Palmer
e6254daaf1 Merge branch 'martinbudden-belt_gt2x9' 2021-12-12 08:40:51 +00:00
Chris Palmer
c31f58a4fd Udpated images and readme. 2021-12-12 08:40:34 +00:00
Chris Palmer
46fc574e7a Merge branch 'belt_gt2x9' of https://github.com/martinbudden/NopSCADlib into martinbudden-belt_gt2x9 2021-12-11 21:08:56 +00:00
Chris Palmer
6ee0fad2e1 Updated changelog. 2021-12-11 20:57:48 +00:00
Chris Palmer
6e76c2ce89 Merge branch 'martinbudden-drag_chain_links' 2021-12-11 20:54:08 +00:00
Chris Palmer
a2dfaef2b5 Updated readme. 2021-12-11 20:53:01 +00:00
Chris Palmer
2c197be193 Merge branch 'drag_chain_links' of https://github.com/martinbudden/NopSCADlib into martinbudden-drag_chain_links 2021-12-11 20:51:38 +00:00
Chris Palmer
05a67d1b2e Updated changelog 2021-12-11 20:50:37 +00:00
Chris Palmer
be4dc0c57a Merge branch 'martinbudden-drag_chain_no_support_v2' 2021-12-11 20:48:02 +00:00
Chris Palmer
c4895f84c7 Updated image and readme. 2021-12-11 18:34:38 +00:00
Chris Palmer
72700a0acb Merge branch 'drag_chain_no_support_v2' of https://github.com/martinbudden/NopSCADlib into martinbudden-drag_chain_no_support_v2 2021-12-11 13:10:07 +00:00
Chris Palmer
43c78fd1a3 Anual image changes due to change of computer. 2021-12-11 13:01:57 +00:00
Martin Budden
8682d0a470 Allow configuration of teardrop angle. 2021-12-11 09:34:49 +00:00
Martin Budden
e71db80093 Improvements to core_xy
1. Better default parameters
2. Changed plain_idler_offset to work in x and y, to facilitate larger idler pulleys
2021-11-27 15:07:36 +00:00
Martin Budden
a280e1fcbd Added GT2x9 belt. 2021-11-27 11:06:56 +00:00
Martin Budden
b1ad206ce4 Rotated conical horihole. 2021-11-20 09:51:19 +00:00
Martin Budden
da55f86536 Added variant of drag chain without supports.
Unsupported drag chain has conical pin and corresponding horihole and is printed with cutout facing upwards.

Also made clearance a property of the drag chain so it can be altered for printing chain assemblies
2021-11-20 07:21:09 +00:00
Martin Budden
9790bdda11 Added function returning number of links in drag chain. 2021-11-16 05:41:16 +00:00
Chris Palmer
59c3f984c5 Updated changelog. 2021-11-13 18:35:06 +00:00
Chris Palmer
9c2dd1c37b Merge branch 'martinbudden-screw_socket_visibility' 2021-11-13 18:32:35 +00:00
Chris Palmer
74e569896b Updated images. 2021-11-13 18:32:16 +00:00
Chris Palmer
3a87d7afde Merge branch 'screw_socket_visibility' of https://github.com/martinbudden/NopSCADlib into martinbudden-screw_socket_visibility 2021-11-13 18:11:05 +00:00
Martin Budden
ed6f8cf5c0 Added shading to base of screw sockets to increase visibility. 2021-11-01 10:18:28 +00:00
Chris Palmer
1c9945d978 Updated changelog. 2021-10-29 12:38:48 +01:00
Chris Palmer
9464ad5dbf Fixed knob for pots with split shaft.
Changed the order of knob_for_pot() parameters.
2021-10-29 12:37:12 +01:00
Chris Palmer
370ad8a2d1 Updated changelog. 2021-10-28 13:15:02 +01:00
Martin Budden
4138ed438e Added ability to display camera field of view. 2021-08-09 15:10:59 +01:00
42 changed files with 375 additions and 200 deletions

View File

@@ -3,6 +3,81 @@
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
#### [v18.3.1](https://github.com/nophead/NopSCADlib/releases/tag/v18.3.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v18.3.0...v18.3.1 "diff with v18.3.0")
* 2022-01-10 [`317b485`](https://github.com/nophead/NopSCADlib/commit/317b485ee1c17ef8f8004014a54f1c6706201932 "show commit") [C.P.](# "Chris Palmer") Updated the image.
* 2022-01-11 [`ccf2b8e`](https://github.com/nophead/NopSCADlib/commit/ccf2b8e21b0b3a4d8ab72ea5cdecb0cdfb542e47 "show commit") [G.G.](# "Giampiero Gabbiani") Reverted PERF74x51
* 2022-01-08 [`99f277d`](https://github.com/nophead/NopSCADlib/commit/99f277de8d71f289d1a7340995d25309369e145c "show commit") [G.G.](# "Giampiero Gabbiani") Fixed offset calculations
* 2022-01-07 [`fe1ab5d`](https://github.com/nophead/NopSCADlib/commit/fe1ab5d59a5a4746a383111d1d2a558385f820f6 "show commit") [G.G.](# "Giampiero Gabbiani") Fixed grid origin offsets
### [v18.3.0](https://github.com/nophead/NopSCADlib/releases/tag/v18.3.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v18.2.0...v18.3.0 "diff with v18.2.0")
* 2022-01-10 [`49c2607`](https://github.com/nophead/NopSCADlib/commit/49c26079fea1be8eb4a69d7468fb12df4595ec4c "show commit") [C.P.](# "Chris Palmer") Added `M3x6_hex_pillar`.
* 2022-01-10 [`b5ee63b`](https://github.com/nophead/NopSCADlib/commit/b5ee63bfc40b9ee698d44f435e58cfbc49ec259c "show commit") [C.P.](# "Chris Palmer") Added more documentation for microswitches.
* 2022-01-10 [`a5bc80c`](https://github.com/nophead/NopSCADlib/commit/a5bc80c0e865335cde29db9203438fe4bc659f43 "show commit") [C.P.](# "Chris Palmer") Added `D_plug_d()` function.
* 2022-01-10 [`bf8014f`](https://github.com/nophead/NopSCADlib/commit/bf8014fba0ed630898037712d2fdc432d7966d97 "show commit") [C.P.](# "Chris Palmer") Added `tubing_ir()` function.
### [v18.2.0](https://github.com/nophead/NopSCADlib/releases/tag/v18.2.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v18.1.0...v18.2.0 "diff with v18.1.0")
* 2021-12-14 [`608f0b2`](https://github.com/nophead/NopSCADlib/commit/608f0b2db052b0c79597be39de5e89b9989e9270 "show commit") [C.P.](# "Chris Palmer") Simplified teardrop top length calculation.
* 2021-12-11 [`8682d0a`](https://github.com/nophead/NopSCADlib/commit/8682d0a4705ed2d85213d85702b5b9b039906f48 "show commit") [M.B.](# "Martin Budden") Allow configuration of teardrop angle.
### [v18.1.0](https://github.com/nophead/NopSCADlib/releases/tag/v18.1.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v18.0.0...v18.1.0 "diff with v18.0.0")
* 2021-12-14 [`abe1b1d`](https://github.com/nophead/NopSCADlib/commit/abe1b1db0157a86af14a68ec42bdaa3e079e73a3 "show commit") [C.P.](# "Chris Palmer") Updated readme.
* 2021-12-14 [`71f935d`](https://github.com/nophead/NopSCADlib/commit/71f935de8e24673a10707cfe434a2faaf3de1c28 "show commit") [M.B.](# "Martin Budden") Corrected FOV handling.
* 2021-08-09 [`4138ed4`](https://github.com/nophead/NopSCADlib/commit/4138ed438e1111bafbe3bee17021a922966c334b "show commit") [M.B.](# "Martin Budden") Added ability to display camera field of view.
## [v18.0.0](https://github.com/nophead/NopSCADlib/releases/tag/v18.0.0 "show release") Breaking Changes [...](https://github.com/nophead/NopSCADlib/compare/v17.10.0...v18.0.0 "diff with v17.10.0")
* 2021-12-12 [`970c538`](https://github.com/nophead/NopSCADlib/commit/970c5384960bb4c436cb789a1c5869c0a4adfaa5 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
* 2021-12-12 [`cec790e`](https://github.com/nophead/NopSCADlib/commit/cec790ec09befd2631734cda88f3254043955638 "show commit") [M.B.](# "Martin Budden") Fixed y-carriage plain pulley and test.
* 2021-11-27 [`e71db80`](https://github.com/nophead/NopSCADlib/commit/e71db80093e5131908dff4a6ecba02e5c213a7d8 "show commit") [M.B.](# "Martin Budden") Improvements to `core_xy`
1. Better default parameters
2. Changed `plain_idler_offset` to work in x and y, to facilitate larger idler pulleys
### [v17.10.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.10.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.9.0...v17.10.0 "diff with v17.9.0")
* 2021-12-12 [`c31f58a`](https://github.com/nophead/NopSCADlib/commit/c31f58a4fdf5163dc56b98e89f1a98d08cdfded2 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
* 2021-11-27 [`a280e1f`](https://github.com/nophead/NopSCADlib/commit/a280e1fcbd6fe068a186e5c9f609cff62b2974a4 "show commit") [M.B.](# "Martin Budden") Added GT2x9 belt.
### [v17.9.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.9.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.8.0...v17.9.0 "diff with v17.8.0")
* 2021-12-11 [`a2dfaef`](https://github.com/nophead/NopSCADlib/commit/a2dfaef2b51ffec3f048f0af569b39e8a7dbbeaf "show commit") [C.P.](# "Chris Palmer") Updated readme.
* 2021-11-16 [`9790bdd`](https://github.com/nophead/NopSCADlib/commit/9790bdda11573904bf87c655d1ab7b81736a45e0 "show commit") [M.B.](# "Martin Budden") Added function returning number of links in drag chain.
### [v17.8.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.8.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.7.2...v17.8.0 "diff with v17.7.2")
* 2021-12-11 [`c4895f8`](https://github.com/nophead/NopSCADlib/commit/c4895f84c7cff48baa14040c2759da15d2a165be "show commit") [C.P.](# "Chris Palmer") Updated image and readme.
* 2021-11-20 [`b1ad206`](https://github.com/nophead/NopSCADlib/commit/b1ad206ce4d29b61f3a9be15adde7f1a51c225b5 "show commit") [M.B.](# "Martin Budden") Rotated conical horihole.
* 2021-11-20 [`da55f86`](https://github.com/nophead/NopSCADlib/commit/da55f86536746657a1e105858109f177d24c362e "show commit") [M.B.](# "Martin Budden") Added variant of drag chain without supports.
Unsupported drag chain has conical pin and corresponding horihole and is printed with cutout facing upwards.
* Also made clearance a property of the drag chain so it can be altered for printing chain assemblies
* 2021-12-11 [`43c78fd`](https://github.com/nophead/NopSCADlib/commit/43c78fd1a38de87a210a64c3587bc994731b41c6 "show commit") [C.P.](# "Chris Palmer") Annual image changes due to change of computer.
#### [v17.7.2](https://github.com/nophead/NopSCADlib/releases/tag/v17.7.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v17.7.1...v17.7.2 "diff with v17.7.1")
* 2021-11-13 [`74e5698`](https://github.com/nophead/NopSCADlib/commit/74e569896bd9b4f98bcd7c84322cd358fee8941f "show commit") [C.P.](# "Chris Palmer") Updated images.
* 2021-11-01 [`ed6f8cf`](https://github.com/nophead/NopSCADlib/commit/ed6f8cf5c0877f7e8ad9323cc4fd3a6983a11080 "show commit") [M.B.](# "Martin Budden") Added shading to base of screw sockets to increase visibility.
#### [v17.7.1](https://github.com/nophead/NopSCADlib/releases/tag/v17.7.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v17.7.0...v17.7.1 "diff with v17.7.0")
* 2021-10-29 [`9464ad5`](https://github.com/nophead/NopSCADlib/commit/9464ad5dbf1c6befaa0059e7cc3f0988d5639173 "show commit") [C.P.](# "Chris Palmer") Fixed knob for pots with split shaft.
Changed the order of `knob_for_pot()` parameters.
### [v17.7.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.7.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.6.0...v17.7.0 "diff with v17.6.0")
* 2021-10-28 [`b424bea`](https://github.com/nophead/NopSCADlib/commit/b424bea622d5247fd1e2f1ddd51782aba55277e1 "show commit") [C.P.](# "Chris Palmer") Added printed knobs for pots.
* 2021-10-28 [`c8d9bb7`](https://github.com/nophead/NopSCADlib/commit/c8d9bb7d094408f70cb91354895856cb915cfe00 "show commit") [C.P.](# "Chris Palmer") Potentiometers now create a BOM entry and have a value specified.
### [v17.6.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.6.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.5.0...v17.6.0 "diff with v17.5.0")
* 2021-10-26 [`f5528c5`](https://github.com/nophead/NopSCADlib/commit/f5528c5a9a51abdd12443a677236ac8610206c20 "show commit") [C.P.](# "Chris Palmer") Single `7_segment` objects can now have multiple digits.
This is deduced from the digit size compared to the overall size.

View File

@@ -35,6 +35,7 @@ cnc_bit_r = is_undef($cnc_bit_r) ? 1.2 : $cnc_bit_r; // min
show_rays = is_undef($show_rays) ? false : $show_rays; // show camera sight lines and light direction
show_threads = is_undef($show_threads) ? false : $show_threads; // show screw threads
show_plugs = is_undef($show_plugs) ? false : $show_plugs; // plugs on headers
teardrop_angle = is_undef($teardrop_angle) ? 45 : $teardrop_angle; // teardrop angle
pp1_colour = is_undef($pp1_colour) ? rr_green : $pp1_colour;// printed part colour 1, RepRap logo colour
pp2_colour = is_undef($pp2_colour) ? crimson : $pp2_colour;// printed part colour 2
pp3_colour = is_undef($pp3_colour) ? "SteelBlue" : $pp3_colour;// printed part colour 3

Binary file not shown.

Before

Width:  |  Height:  |  Size: 945 KiB

After

Width:  |  Height:  |  Size: 945 KiB

View File

@@ -50,12 +50,13 @@ function box_sheets(type) = type[3]; //! Sheet type used for the sides
function box_top_sheet(type) = type[4]; //! Sheet type for the top
function box_base_sheet(type) = type[5]; //! Sheet type for the bottom
function box_feet(type) = type[6]; //! True to enable feet on the bottom bezel
function box_width(type) = type[7]; //! Internal width
function box_depth(type) = type[8]; //! Internal depth
function box_height(type) = type[9]; //! Internal height
function box_name(type) = type[7]; //! Name for projects with more than one box
function box_width(type) = type[8]; //! Internal width
function box_depth(type) = type[9]; //! Internal depth
function box_height(type) = type[10];//! Internal height
function box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = undef) = //! Construct a property list for a box.
concat([screw, is_undef(shelf_screw) ? screw : shelf_screw, wall, sheets, top_sheet, base_sheet, feet], size);
function box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = undef, name = "box") = //! Construct a property list for a box.
concat([screw, is_undef(shelf_screw) ? screw : shelf_screw, wall, sheets, top_sheet, base_sheet, feet, name], size);
function box_bezel_clearance(type) = bezel_clearance;
@@ -66,7 +67,7 @@ function box_washer(type) = screw_washer(box_screw(type));
function box_insert(type) = screw_insert(box_screw(type));
function box_shelf_insert(type) = screw_insert(box_shelf_screw(type));
function box_hole_inset(type) = washer_radius(box_washer(type)) + 1;
function box_hole_inset(type) = washer_radius(box_washer(type)) + 1; //! Screw inset from the corner of the internal dimensions
function box_insert_r(type) = insert_hole_radius(box_insert(type));
function box_insert_l(type) = insert_length(box_insert(type));
function box_boss_r(type) = ceil(corrected_radius(box_insert_r(type)) + box_wall(type));
@@ -91,6 +92,8 @@ function box_bezel_height(type, bottom) = //! Bezel height for top or bottom
let(t1 = sheet_thickness(box_base_sheet(type)), t2 = sheet_thickness(box_top_sheet(type)))
box_corner_rad(type) + box_profile_overlap(type) + (bottom ? max(t1, t2) : t2) - sheet_thickness(box_sheets(type));
function box_bc_name(type, suffix) = let(name = box_name(type)) name == "box" ? suffix : str(name, "_", suffix); // Backwards compatibale name
grill_hole = 5;
grill_gap = 1.9;
@@ -143,7 +146,7 @@ module box_corner_profile_2D(type) { //! The 2D shape of the corner profile.
module box_corner_profile(type) { //! Generates the corner profile STL for 3D printing.
length = box_height(type) - 2 * box_margin(type);
stl("box_corner_profile")
stl(str(box_name(type), "_corner_profile"))
difference() {
linear_extrude(length, center = true, convexity = 5)
box_corner_profile_2D(type);
@@ -192,7 +195,7 @@ module box_corner_profile_section(type, section, sections) { //! Generates inter
}
module box_corner_profile_sections(type, section, sections) { //! Generate four copies of a corner profile section
stl("box_corner_profile");
stl(str(box_name(type), "_corner_profile"));
offset = box_boss_r(type) + 1;
for(i = [0 : 3])
rotate(i * 90)
@@ -222,7 +225,7 @@ module box_bezel(type, bottom) { //! Generates top and bottom bezel STLs
height = box_bezel_height(type, bottom);
foot_extension = foot_height - height;
stl(bottom ? "bottom_bezel" : "top_bezel")
stl(box_bc_name(type, bottom ? "bottom_bezel" : "top_bezel"))
difference() {
w = box_width(type);
d = box_depth(type);
@@ -355,7 +358,6 @@ module box_bezel_section(type, bottom, rows, cols, x, y) { //! Generates interlo
translate([0, bw2 / 2, dh2 / 2])
cube([eps, bw2 - 2 * dowel_wall + 2 * extrusion_width, dh2], center = true);
}
}
}
@@ -440,7 +442,7 @@ module box_screw_hole_positions(type) {
}
module box_base_blank(type) { //! Generates a 2D template for the base sheet
dxf("box_base");
dxf(str(box_name(type), "_base"));
difference() {
sheet_2D(box_base_sheet(type), box_width(type), box_depth(type), box_sheet_r(type));
@@ -451,7 +453,7 @@ module box_base_blank(type) { //! Generates a 2D template for the base sheet
}
module box_top_blank(type) { //! Generates a 2D template for the top sheet
dxf("box_top");
dxf(str(box_name(type), "_top"));
difference() {
sheet_2D(box_top_sheet(type), box_width(type), box_depth(type), box_sheet_r(type));
@@ -466,7 +468,7 @@ function subst_sheet(type, sheet) =
sheet ? assert(sheet_thickness(sheet) == sheet_thickness(s)) sheet : s;
module box_shelf_blank(type, sheet = false) { //! Generates a 2D template for a shelf sheet
dxf("box_shelf");
dxf(str(box_name(type), "_shelf"));
difference() {
sheet_2D(subst_sheet(type, sheet), box_width(type) - bezel_clearance, box_depth(type) - bezel_clearance, 1);
@@ -514,7 +516,7 @@ module box_shelf_bracket(type, screw_positions, wall = undef) { //! Generates a
square([lip, eps]);
}
stl("shelf_bracket")
stl(box_bc_name(type, "shelf_bracket"))
difference() {
union() {
linear_extrude(w)
@@ -567,25 +569,25 @@ module box_shelf_bracket_section(type, rows, cols, x, y) { //! Generates section
}
module box_left_blank(type, sheet = false) { //! Generates a 2D template for the left sheet, `sheet` can be set to override the type
dxf("box_left");
dxf(str(box_name(type), "_left"));
sheet_2D(subst_sheet(type, sheet), box_depth(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
}
module box_right_blank(type, sheet = false) { //! Generates a 2D template for the right sheet, `sheet` can be set to override the type
dxf("box_right");
dxf(str(box_name(type), "_right"));
sheet_2D(subst_sheet(type, sheet), box_depth(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
}
module box_front_blank(type, sheet = false) { //! Generates a 2D template for the front sheet, `sheet` can be set to override the type
dxf("box_front");
dxf(str(box_name(type), "_front"));
sheet_2D(subst_sheet(type, sheet), box_width(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
}
module box_back_blank(type, sheet = false) { //! Generates a 2D template for the back sheet, `sheet` can be set to override the type
dxf("box_back");
dxf(str(box_name(type), "_back"));
sheet_2D(subst_sheet(type, sheet), box_width(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
}

View File

@@ -23,7 +23,7 @@
// parameters to make the assembly views. E.g. module box_assembly() _box_assembly(box);
//
module _box_assembly(type, top = true, base = true, left = true, right = true, back = true, front = true, bezels = true, corners = 4)
assembly("box") {
assembly(box_name(type)) {
echo("Box:", box_width(type), box_depth(type), box_height(type));
t = sheet_thickness(box_sheets(type));

View File

@@ -158,14 +158,14 @@ module mouse_grommet_hole(r, h = 50, z = undef, expand = wall + clearance) //! M
square([2 * R, eps]);
}
function mouse_grommet_offset(r) = r + wall;
function mouse_grommet_offset(r) = r + wall; //! Offset of the wire from the ground
function mouse_grommet_length(r) = 2 * r + 2 * wall + 2 * overlap; //! Length of grommet given r
module mouse_grommet(r, thickness) { //! Make the STL for a mouse grommet
width = 2 * (wall + clearance) + thickness;
length = 2 * r + 2 * wall + 2 * overlap;
stl(str("mouse_grommet_", r * 10, "_", thickness))
stl(str("mouse_grommet_", r * 20, "_", thickness))
rotate([90, 0, 0])
union() {
for(side = [-1, 1])
@@ -193,10 +193,10 @@ module mouse_grommet_assembly(r, thickness)
mouse_grommet(r, thickness);
module ribbon_grommet_20_3_stl() ribbon_grommet(20, 3);
module mouse_grommet_15_3_stl() mouse_grommet(1.5, 3);
module mouse_grommet_20_3_stl() mouse_grommet(2, 3);
module mouse_grommet_25_3_stl() mouse_grommet(2.5, 3);
module mouse_grommet_30_3_stl() mouse_grommet(3, 3);
module mouse_grommet_30_3_stl() mouse_grommet(1.5, 3);
module mouse_grommet_40_3_stl() mouse_grommet(2, 3);
module mouse_grommet_50_3_stl() mouse_grommet(2.5, 3);
module mouse_grommet_60_3_stl() mouse_grommet(3, 3);
module round_grommet_bottom_30_stl() round_grommet_bottom(3);
module round_grommet_bottom_40_stl() round_grommet_bottom(4);

View File

@@ -35,18 +35,17 @@ include <../core.scad>
use <../utils/horiholes.scad>
use <../utils/maths.scad>
clearance = 0.1;
function drag_chain_name(type) = type[0]; //! The name to allow more than one in a project
function drag_chain_size(type) = type[1]; //! The internal size and link length
function drag_chain_travel(type) = type[2]; //! X travel
function drag_chain_wall(type) = type[3]; //! Side wall thickness
function drag_chain_bwall(type) = type[4]; //! Bottom wall
function drag_chain_twall(type) = type[5]; //! Top wall
function drag_chain_screw(type) = type[6]; //! Mounting screw for the ends
function drag_chain_screw_lists(type) = type[7]; //! Two lists of four bools to say which screws positions are used
function drag_chain_clearance(type) = type[6]; //! Clearance around joints
function drag_chain_supports(type) = type[7]; //! Whether to print version of chain with or without supports
function drag_chain_screw(type) = type[8]; //! Mounting screw for the ends
function drag_chain_screw_lists(type) = type[9]; //! Two lists of four bools to say which screws positions are used
function drag_chain_clearance() = clearance; //! Clearance around joints.
function drag_chain_radius(type) = //! The bend radius at the pivot centres
let(s = drag_chain_size(type))
@@ -56,12 +55,15 @@ function drag_chain_z(type) = //! Outside dimension of a 180 bend
let(os = drag_chain_outer_size(type), s = drag_chain_size(type))
2 * drag_chain_radius(type) + os.z;
function drag_chain(name, size, travel, wall = 1.6, bwall = 1.5, twall = 1.5, screw = M2_cap_screw, screw_lists = [[1,0,0,1],[1,0,0,1]]) = //! Constructor
[name, size, travel, wall, bwall, twall, screw, screw_lists];
function drag_chain(name, size, travel, wall = 1.6, bwall = 1.5, twall = 1.5, clearance = 0.1, supports = true, screw = M2_cap_screw, screw_lists = [[1,0,0,1],[1,0,0,1]]) = //! Constructor
[name, size, travel, wall, bwall, twall, clearance, supports, screw, screw_lists];
function drag_chain_outer_size(type) = //! Link outer dimensions
let(s = drag_chain_size(type), z = s.z + drag_chain_bwall(type) + drag_chain_twall(type))
[s.x + z, s.y + 4 * drag_chain_wall(type) + 2 * clearance, z];
[s.x + z, s.y + 4 * drag_chain_wall(type) + 2 * drag_chain_clearance(type), z];
function drag_chain_links(type) = //! Number of links in chain
ceil(drag_chain_travel(type) / drag_chain_size(type).x) + 4;
function screw_lug_radius(screw) = //! Radius of a screw lug
corrected_radius(screw_clearance_radius(screw)) + 3.1 * extrusion_width;
@@ -85,6 +87,7 @@ module drag_chain_screw_positions(type, end) { //! Place children at the screw p
r = screw_lug_radius(drag_chain_screw(type));
s = drag_chain_size(type);
os = drag_chain_outer_size(type);
clearance = drag_chain_clearance(type);
R = os.z / 2;
x0 = end ? R + norm([drag_chain_cam_x(type), R - drag_chain_twall(type)]) + clearance + r : r;
x1 = end ? os.x - r : os.x - 2 * R - clearance - r;
@@ -99,7 +102,7 @@ function drag_chain_cam_x(type) = // how far the cam sticks out
let(s = drag_chain_size(type),
r = drag_chain_outer_size(type).z / 2,
wall = drag_chain_wall(type),
cam_r = s.x - 2 * clearance - wall - r, // inner_x_normal - clearance - r
cam_r = s.x - 2 * drag_chain_clearance(type) - wall - r, // inner_x_normal - clearance - r
twall = drag_chain_twall(type)
) min(sqrt(max(sqr(cam_r) - sqr(r - twall), 0)), r);
@@ -111,8 +114,15 @@ module drag_chain_link(type, start = false, end = false, check_kids = true) { //
bwall = drag_chain_bwall(type);
twall = drag_chain_twall(type);
os = drag_chain_outer_size(type);
clearance = drag_chain_clearance(type);
supports = drag_chain_supports(type);
r = os.z / 2;
pin_r = r / 2;
// initial estimates of pin_r and pin_h
pin_r0 = r / 2 - 0.2;
pin_h0 = min(wall + clearance, 2 * pin_r0 - 1);
// for conical pin: ensure minimum radius of top of pin and pin does not overlap cutout
pin_r = supports ? r / 2 : min(r / 2 - 0.2, (os.z - 2 * twall - 3 * pin_h0 / 4 - 0.2) / 2);
pin_h = min(wall + clearance, 2 * pin_r - 1);
socket_x = r;
pin_x = socket_x + s.x;
@@ -123,44 +133,51 @@ module drag_chain_link(type, start = false, end = false, check_kids = true) { //
inner_x = start ? 0 : outer_normal_x - wall; // s.x - clearance - wall
roof_x_normal = 2 * r - twall;
roof_x = start ? 0 : roof_x_normal;
floor_x = start ? 0 : 2 * r;
cam_x = drag_chain_cam_x(type);
assert(r + norm([drag_chain_cam_x(type), r - drag_chain_twall(type)]) + clearance <= inner_x || start, "Link must be longer");
vflip(!supports)
difference() {
union() {
for(side = [-1, 1])
rotate([90, 0, 0]) {
// Outer cheeks
translate_z(side * (os.y / 2 - wall / 2))
linear_extrude(wall, center = true)
difference() {
difference() {
linear_extrude(wall, center = true)
hull() {
if(start)
square([eps, os.z]);
else
translate([socket_x, r])
rotate(180)
rotate(supports ? 180 : 0)
teardrop(r = r, h = 0);
translate([outer_end_x - eps, 0])
square([eps, os.z]);
}
if(!start)
translate([socket_x, r])
horihole(pin_r, r);
if(supports)
translate([socket_x, r, 0])
horihole(pin_r, r, wall + 2*eps);
else
translate([socket_x, r, -side * (wall / 2 + clearance)])
rotate(180)
hull() {
horihole(r = pin_r + pin_h / 2, z = r, h = eps);
translate_z(side * pin_h)
horihole(r = pin_r - pin_h / 2, z = r, h = eps);
}
}
// Inner cheeks
translate_z(side * (s.y / 2 + wall / 2))
translate_z(side * (s.y / 2 + wall / 2)) {
linear_extrude(wall, center = true)
difference() {
union() {
hull() {
if(!end) {
translate([pin_x, r])
rotate(180)
rotate(supports ? 180 : 0)
teardrop(r = r, h = 0);
translate([pin_x, twall])
@@ -186,31 +203,39 @@ module drag_chain_link(type, start = false, end = false, check_kids = true) { //
square(os.z);
}
}
// Pin
if(!end)
translate([pin_x, r, side * (s.y / 2 + wall + clearance)])
horicylinder(r = pin_r, z = r, h = 2 * wall);
// Pin
if(!end)
if(supports)
translate([pin_x, r, side * (wall / 2 + clearance)])
horicylinder(r = pin_r, z = r, h = 2 * wall + eps);
else
translate([pin_x, r, side * wall / 2])
vflip(side == -1)
cylinder(r1 = pin_r + pin_h / 2, r2 = pin_r - pin_h / 2, h = pin_h + eps);
}
// Cheek joint
translate([inner_x, 0, side * (s.y / 2 + wall) - 0.5])
cube([outer_end_x - inner_x, os.z, 1]);
}
// Roof, actually the floor when printed
// Roof, actually the floor when printed with supports
roof_x = start ? 0 : roof_x_normal;
roof_end = end ? s.x + 2 * r : s.x + r - twall - clearance;
translate([roof_x, -s.y / 2 - 0.5])
cube([roof_end - roof_x , s.y + 1, twall]);
translate([roof_x, -s.y / 2 - wall, 0]) {
cube([roof_end - roof_x, s.y + 2 * wall, twall]);
translate([0, -wall, 0])
cube([s.x - roof_x - clearance, s.y + 4 * wall, twall]);
}
translate([roof_x, -os.y / 2 + 0.5])
cube([s.x - clearance - roof_x, os.y - 1, twall]);
// Floor, actually the roof when printed
// Floor, actually the roof when printed with supports
floor_x = start ? 0 : 2 * r;
floor_end = end ? s.x + 2 * r : s.x + r;
translate([floor_x, -s.y / 2 - wall, os.z - bwall])
translate([floor_x, -s.y / 2 - wall, os.z - bwall]) {
cube([floor_end - floor_x, s.y + 2 * wall, bwall]);
translate([floor_x, -os.y / 2 + 0.5, os.z - bwall])
cube([s.x - floor_x - clearance, os.y -1, bwall]);
translate([0, -wall, 0])
cube([s.x - floor_x - clearance, s.y + 4 * wall, bwall]);
}
if(start || end) {
drag_chain_screw_positions(type, end)
@@ -223,16 +248,16 @@ module drag_chain_link(type, start = false, end = false, check_kids = true) { //
}
children();
}
}
} // end union
if(start || end)
translate_z(-eps)
drag_chain_screw_positions(type, end)
rotate($a)
poly_cylinder(r = screw_clearance_radius(drag_chain_screw(type)), h = os.z + 2 * eps, center = false);
} // end difference
}
if(show_supports() && !end) {
if(supports && show_supports() && !end) {
for(side = [-1, 1]) {
w = 2.1 * extrusion_width;
translate([s.x + r + cam_x - w / 2, side * (s.y / 2 + wall / 2), twall / 2])
@@ -255,16 +280,15 @@ module _drag_chain_assembly(type, pos = 0, render = false) {
s = drag_chain_size(type);
x = (1 + exploded()) * s.x;
r = drag_chain_radius(type) * x / s.x;
travel = drag_chain_travel(type);
links = ceil(travel / s.x);
actual_travel = links * s.x;
links = drag_chain_links(type);
actual_travel = (links - 4) * s.x;
z = drag_chain_outer_size(type).z;
zb = z / 2; // z of bottom track
c = [actual_travel / 2 + pos / 2, 0, r + zb]; // centre of bend
points = [ // Calculate list of hinge points
for(i = 0, p = [0, 0, z / 2 + 2 * r]; i < links + 5;
for(i = 0, p = [0, 0, z / 2 + 2 * r]; i < links + 1;
i = i + 1,
dx = p.z > c.z ? x : -x,
p = max(p.x + dx, p.x) <= c.x ? p + [dx, 0, 0] // Straight sections
@@ -277,11 +301,12 @@ module _drag_chain_assembly(type, pos = 0, render = false) {
module link(n) // Position and colour link with origin at the hinge hole
translate([-z / 2, 0, -z / 2]) {
stl_colour(n < 0 || n == npoints - 1 ? pp3_colour : n % 2 ? pp1_colour : pp2_colour)
render_if(render)
drag_chain_link(type, start = n == -1, end = n == npoints - 1, check_kids = false)
let($fasteners = 0)
children();
vflip(!drag_chain_supports(type))
stl_colour(n < 0 || n == npoints - 1 ? pp3_colour : n % 2 ? pp1_colour : pp2_colour)
render_if(render)
drag_chain_link(type, start = n == -1, end = n == npoints - 1, check_kids = false)
let($fasteners = 0)
children();
let($fasteners = 1) children();
}

View File

@@ -52,7 +52,7 @@ function knob(name = "knob", top_d = 12, bot_d = 15, height = 18, shaft_length,
name, top_d, bot_d, height, corner_r, shaft_d, shaft_length, flat_d, flat_h, screw, skirt, recess, pointer
];
function knob_for_pot(pot, thickness, z = 1, shaft_length = undef, top_d = 12, bot_d = 15, skirt = [20, 2], pointer = false, corner_r = 2, height = 0, washer = true) = //! Construct a knob to fit specified pot
function knob_for_pot(pot, thickness, z = 1, washer = true, top_d = 12, bot_d = 15, height = 0, shaft_length = undef, skirt = [20, 2], pointer = false, corner_r = 2, screw = M3_grub_screw) = //! Construct a knob to fit specified pot
let(s = pot_shaft(pot),
washer = washer && pot_washer(pot) ? pot_washer(pot) : [0, 0],
nut = pot_nut(pot) ? pot_nut(pot) : [pot_thread_d(pot) * cos(30), pot_thread_h(pot) - thickness],
@@ -68,6 +68,7 @@ function knob_for_pot(pot, thickness, z = 1, shaft_length = undef, top_d = 12, b
bot_d = bot_d,
height = height,
corner_r = corner_r,
screw = screw,
skirt = skirt,
pointer = pointer,
shaft_d = s.x,
@@ -83,11 +84,11 @@ module knob(type, supports = true) { //! Generate the STL for a knob
r_bot = knob_bot_d(type) / 2;
h = knob_height(type);
r = knob_corner_r(type);
sr = knob_shaft_d(type) / 2 + clearance;
screw = knob_screw(type);
sr = knob_shaft_d(type) / 2 + (screw ? clearance : 0);
top_wall = h - knob_shaft_len(type);
fr = knob_flat_d(type) - sr + 2 * clearance;
fh = knob_flat_h(type);
screw = knob_screw(type);
skirt = knob_skirt(type);
recess = knob_recess(type);
pointer = knob_pointer(type);
@@ -125,8 +126,9 @@ module knob(type, supports = true) { //! Generate the STL for a knob
difference() {
poly_circle(sr);
translate([-sr, fr])
square([2 * sr, sr]);
if(fr > 0)
translate([-sr, fr])
square([2 * sr, sr]);
}
if(h > fh)
@@ -153,14 +155,17 @@ module knob(type, supports = true) { //! Generate the STL for a knob
//! Knob with grub screw in place
module knob_assembly(type) explode(40, explode_children = true) { //! Assembly with the grub screw in place
fr = knob_flat_d(type) - knob_shaft_d(type) / 2;
sr = knob_shaft_d(type) / 2;
fr = knob_flat_d(type) < sr ? knob_flat_d(type) - sr : sr;
r_top = knob_top_d(type) / 2;
r_bot = knob_bot_d(type) / 2;
screw_length = screw_shorter_than(min(r_top, r_bot) - fr);
screw = knob_screw(type);
stl_colour(pp1_colour) render() knob(type, supports = false);
translate([0, (fr + screw_length), knob_screw_z(type)])
rotate([90, 0, 180])
screw(knob_screw(type), screw_length);
if(screw)
translate([0, (fr + screw_length), knob_screw_z(type)])
rotate([90, 0, 180])
screw(screw, screw_length);
}

View File

@@ -356,6 +356,7 @@ Individual teeth are not drawn, instead they are represented by a lighter colour
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 128mm |
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 552mm |
| 2 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 556mm |
| 1 | `belt(GT2x9, [ ... ])` | Belt GT2 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 |
@@ -441,6 +442,7 @@ Individual teeth are not drawn, instead they are represented by a lighter colour
<a name="Blowers"></a>
## 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.
@@ -677,6 +679,7 @@ PCB cameras.
|:--- |:--- |
| `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 |
@@ -684,7 +687,7 @@ PCB cameras.
### Modules
| Module | Description |
|:--- |:--- |
| `camera(type, show_lens = true)` | Draw specified PCB camera |
| `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)
@@ -874,6 +877,7 @@ D-connectors. Can be any number of ways, male or female, solder buckets, PCB mou
| `d_connector_holes(type)` | Place children at the screw hole positions |
| `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)
@@ -1959,7 +1963,9 @@ UK 13A sockets at the moment.
## Microswitches
Used for limit switches. Currently only the button type is supported as the lever and roller types are less accurate.
The switch is drawn with the button at the nominal operation point. This can be plus or minus `microswitch_op_tol(type)`.
The origin of the switch is in the center of the body. `microswitch_button_pos()` is the offset to tip of the button at its operating point.
The switch is drawn with the button at the nominal operation point. This actual trigger point can be plus or minus `microswitch_op_tol(type)`.
When the button is released it comes out by a maximum of `microswitch_fp_max(type)` from the nominal operating point.
@@ -2668,6 +2674,7 @@ Threaded pillars. Each end can be male or female.
| ---:|:--- |:---|
| 1 | `pillar(M3x13_hex_pillar)` | Pillar hex M/F M3x13 |
| 1 | `pillar(M3x20_hex_pillar)` | Pillar hex M/F M3x20 |
| 1 | `pillar(M3x6_hex_pillar)` | Pillar hex M/F M3x6 |
| 1 | `pillar(M3x10_nylon_hex_pillar)` | Pillar hex nylon M/F M3x10 |
| 1 | `pillar(M3x20_nylon_hex_pillar)` | Pillar hex nylon M/F M3x20 |
| 1 | `pillar(M2x16_brass_pillar)` | Pillar nurled F/M M2x16 |
@@ -4067,6 +4074,7 @@ Tubing and sleeving. The internal diameter can be forced to stretch it over some
### Functions
| Function | Description |
|:--- |:--- |
| `tubing_ir(type)` | Inside radius |
| `tubing_or(type)` | Outside radius |
### Modules
@@ -4329,8 +4337,8 @@ Just a BOM entry at the moment and cable bundle size functions for holes, plus c
| `cable_radius(cable)` | Radius of a bundle of wires, see <http://mathworld.wolfram.com/CirclePacking.html>. |
| `cable_width(cable)` | Width in flat clip |
| `cable_wire_size(cable)` | Size of each wire in a bundle |
| `cable_wires(cable)` | Number of wires in a bindle |
| `wire_hole_radius(cable)` | Radius of a hole to accept a bundle of wires |
| `cable_wires(cable)` | Number of wires in a bundle |
| `wire_hole_radius(cable)` | Radius of a hole to accept a bundle of wires, rounded up to standard metric drill size |
### Modules
| Module | Description |
@@ -4422,6 +4430,7 @@ Normally the side sheets are the same type but they can be overridden individual
| `box_depth(type)` | Internal depth |
| `box_feet(type)` | True to enable feet on the bottom bezel |
| `box_height(type)` | Internal height |
| `box_name(type)` | Name for projects with more than one box |
| `box_screw(type)` | Screw type to be used at the corners |
| `box_sheets(type)` | Sheet type used for the sides |
| `box_shelf_screw(type)` | Screw type to hold a shelf |
@@ -4432,9 +4441,10 @@ Normally the side sheets are the same type but they can be overridden individual
### Functions
| Function | Description |
|:--- |:--- |
| `box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = undef)` | Construct a property list for a box. |
| `box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = undef, name = "box")` | Construct a property list for a box. |
| `box_bezel_height(type, bottom)` | Bezel height for top or bottom |
| `box_corner_gap(type)` | Gap between box_sheets at the corners to connect inside and outside profiles |
| `box_hole_inset(type)` | Screw inset from the corner of the internal dimensions |
| `box_inset(type)` | How much the bezel intrudes on the specified width and length, away from the corners |
| `box_intrusion(type)` | Corner profile intrusion |
| `box_margin(type)` | How much the bezel intrudes on the specified height |
@@ -4622,6 +4632,12 @@ of conductive panels, an extra layer of insulation.
[tests/cable_grommets.scad](tests/cable_grommets.scad) Code for this example.
### Functions
| Function | Description |
|:--- |:--- |
| `mouse_grommet_length(r)` | Length of grommet given r |
| `mouse_grommet_offset(r)` | Offset of the wire from the ground |
### Modules
| Module | Description |
|:--- |:--- |
@@ -4638,7 +4654,7 @@ of conductive panels, an extra layer of insulation.
### Printed
| Qty | Filename |
| ---:|:--- |
| 1 | mouse_grommet_50_3.stl |
| 1 | mouse_grommet_100_3.stl |
| 1 | ribbon_grommet_20_3.stl |
| 1 | round_grommet_bottom_60.stl |
| 1 | round_grommet_top_60_3.stl |
@@ -4940,10 +4956,12 @@ to the assembly, for example to add inserts.
| Function | Description |
|:--- |:--- |
| `drag_chain_bwall(type)` | Bottom wall |
| `drag_chain_clearance(type)` | Clearance around joints |
| `drag_chain_name(type)` | The name to allow more than one in a project |
| `drag_chain_screw(type)` | Mounting screw for the ends |
| `drag_chain_screw_lists(type)` | Two lists of four bools to say which screws positions are used |
| `drag_chain_size(type)` | The internal size and link length |
| `drag_chain_supports(type)` | Whether to print version of chain with or without supports |
| `drag_chain_travel(type)` | X travel |
| `drag_chain_twall(type)` | Top wall |
| `drag_chain_wall(type)` | Side wall thickness |
@@ -4951,8 +4969,8 @@ to the assembly, for example to add inserts.
### Functions
| Function | Description |
|:--- |:--- |
| `drag_chain(name, size, travel, wall = 1.6, bwall = 1.5, twall = 1.5, screw = M2_cap_screw, screw_lists = [[1,0,0,1],[1,0,0,1]])` | Constructor |
| `drag_chain_clearance()` | Clearance around joints. |
| `drag_chain(name, size, travel, wall = 1.6, bwall = 1.5, twall = 1.5, clearance = 0.1, supports = true, screw = M2_cap_screw, screw_lists = [[1,0,0,1],[1,0,0,1]])` | Constructor |
| `drag_chain_links(type)` | Number of links in chain |
| `drag_chain_outer_size(type)` | Link outer dimensions |
| `drag_chain_radius(type)` | The bend radius at the pivot centres |
| `drag_chain_z(type)` | Outside dimension of a 180 bend |
@@ -5326,7 +5344,7 @@ The STL includes a support membrane that needs to be cut out and a thread needs
| Function | Description |
|:--- |:--- |
| `knob(name = "knob", top_d = 12, bot_d = 15, height = 18, shaft_length, skirt = [20, 2], pointer = false, corner_r = 2, screw = M3_grub_screw, shaft_d, flat_d, flat_h, recess)` | Constructor |
| `knob_for_pot(pot, thickness, z = 1, shaft_length = undef, top_d = 12, bot_d = 15, skirt = [20, 2], pointer = false, corner_r = 2, height = 0, washer = true)` | Construct a knob to fit specified pot |
| `knob_for_pot(pot, thickness, z = 1, washer = true, top_d = 12, bot_d = 15, height = 0, shaft_length = undef, skirt = [20, 2], pointer = false, corner_r = 2, screw = M3_grub_screw)` | Construct a knob to fit specified pot |
### Modules
| Module | Description |
@@ -5344,9 +5362,9 @@ The STL includes a support membrane that needs to be cut out and a thread needs
| 1 | `potentiometer(imperial_pot)` | Potentiometer imperial_pot |
| 1 | `potentiometer(imperial_pot_x2)` | Potentiometer imperial_pot_x2 |
| 1 | `potentiometer(metric_pot)` | Potentiometer metric_pot |
| 1 | `screw(M3_grub_screw, 4)` | Screw M3 grub x 4mm |
| 2 | `screw(M3_grub_screw, 5)` | Screw M3 grub x 5mm |
| 2 | `screw(M3_grub_screw, 6)` | Screw M3 grub x 6mm |
| 1 | `screw(M3_grub_screw, 3)` | Screw M3 grub x 3mm |
| 2 | `screw(M3_grub_screw, 4)` | Screw M3 grub x 4mm |
| 1 | `screw(M3_grub_screw, 6)` | Screw M3 grub x 6mm |
### Printed
| Qty | Filename |
@@ -6065,9 +6083,9 @@ allows flexible positioning of the motors.
### Modules
| Module | Description |
|:--- |:--- |
| `coreXY(type, size, pos, separation, x_gap, plain_idler_offset = 0, upper_drive_pulley_offset, lower_drive_pulley_offset, show_pulleys = false, left_lower = false)` | Wrapper module to draw both belts of a coreXY setup |
| `coreXY_belts(type, carriagePosition, coreXYPosBL, coreXYPosTR, separation, x_gap = 20, upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false)` | Draw the coreXY belts |
| `coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = 0, drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false)` | Draw one belt of a coreXY setup |
| `coreXY(type, size, pos, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false)` | Wrapper module to draw both belts of a coreXY setup |
| `coreXY_belts(type, carriagePosition, coreXYPosBL, coreXYPosTR, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false)` | Draw the coreXY belts |
| `coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = [0, 0], drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false)` | Draw one belt of a coreXY setup |
![core_xy](tests/png/core_xy.png)
@@ -6075,7 +6093,7 @@ allows flexible positioning of the motors.
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 728mm |
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 824mm |
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 790mm |
| 7 | `pulley(GT2x16_toothed_idler)` | Pulley GT2 idler 16 teeth |
| 3 | `pulley(GT2x16_plain_idler)` | Pulley GT2 idler smooth 9.63mm |
| 2 | `pulley(GT2x20ob_pulley)` | Pulley GT2OB 20 teeth |

View File

@@ -82,6 +82,7 @@ def codify(word, url):
def fixup_comment(comment, url):
comment = comment.replace('cnc_bit+_r', 'cnc_bit_r')
""" markup code words and fix new paragraphs """
result = ''
word = ''
@@ -161,6 +162,6 @@ if __name__ == '__main__':
# Print commits excluding merges
if not c.comment.startswith('Merge branch') and not c.comment.startswith('Merge pull') and not re.match(r'U..ated changelog.*', c.comment):
if not c.comment.startswith('Merge branch') and not c.comment.startswith('Merge pull') and not re.match(r'U..ated chang.*log.*', c.comment):
print('* %s [`%s`](%s "show commit") %s %s\n' % (c.date, c.hash[:7], url + '/commit/' + c.hash, initials(c.author), fixup_comment(c.comment, url)), file = file)
do_cmd(('codespell -w -L od ' + filename).split())

View File

@@ -30,22 +30,25 @@ module coreXY_belts_test() {
plain_idler = coreXY_plain_idler(coreXY_type);
toothed_idler = coreXY_toothed_idler(coreXY_type);
pos = [100, 50];
coreXYPosBL = [0, 0, 0];
coreXYPosTR = [200, 150, 0];
separation = [0, coreXY_coincident_separation(coreXY_type).y, pulley_height(plain_idler) + washer_thickness(M3_washer)];
pos = [100, 50];
x_gap = 10;
upper_drive_pulley_offset = [40, 10];
plain_idler_offset = [10, 5];
upper_drive_pulley_offset = [40, 0];
lower_drive_pulley_offset = [0, 0];
coreXY_belts(coreXY_type,
carriagePosition = pos,
coreXYPosBL = coreXYPosBL,
coreXYPosTR = coreXYPosTR,
separation = separation,
x_gap = 10,
upper_drive_pulley_offset = upper_drive_pulley_offset,
lower_drive_pulley_offset = lower_drive_pulley_offset,
pos,
coreXYPosBL,
coreXYPosTR,
separation,
x_gap,
plain_idler_offset,
upper_drive_pulley_offset,
lower_drive_pulley_offset,
show_pulleys = true);
@@ -56,18 +59,18 @@ module coreXY_belts_test() {
// add the screws for the upper drive offset idler pulleys if required
if (upper_drive_pulley_offset.x > 0) {
translate(coreXY_drive_plain_idler_offset(coreXY_type))
translate_z(-pulley_offset(plain_idler))
translate(coreXY_drive_plain_idler_offset(coreXY_type) + plain_idler_offset)
translate([0, -upper_drive_pulley_offset.y, -pulley_offset(plain_idler)])
screw(M3_cap_screw, 20);
translate(coreXY_drive_toothed_idler_offset(coreXY_type))
translate_z(-pulley_offset(toothed_idler))
translate([0, -upper_drive_pulley_offset.y, -pulley_offset(toothed_idler)])
screw(M3_cap_screw, 20);
} else if (upper_drive_pulley_offset.x < 0) {
translate([-pulley_od(plain_idler), coreXY_drive_plain_idler_offset(coreXY_type).y])
translate_z(-pulley_offset(plain_idler))
translate([-pulley_od(plain_idler), coreXY_drive_plain_idler_offset(coreXY_type).y + plain_idler_offset.y])
translate([0, -upper_drive_pulley_offset.y, -pulley_offset(plain_idler)])
screw(M3_cap_screw, 20);
translate([2*coreXY_drive_pulley_x_alignment(coreXY_type), coreXY_drive_toothed_idler_offset(coreXY_type).y])
translate_z(-pulley_offset(toothed_idler))
translate([2*coreXY_drive_pulley_x_alignment(coreXY_type) + plain_idler_offset.x, coreXY_drive_toothed_idler_offset(coreXY_type).y])
translate([0, -upper_drive_pulley_offset.y, -pulley_offset(toothed_idler)])
screw(M3_cap_screw, 20);
}
}
@@ -79,18 +82,18 @@ module coreXY_belts_test() {
// add the screws for the lower drive offset idler pulleys if required
if (lower_drive_pulley_offset.x < 0) {
translate([-coreXY_drive_plain_idler_offset(coreXY_type).x, coreXY_drive_plain_idler_offset(coreXY_type).y])
translate_z(-pulley_offset(plain_idler))
translate([-coreXY_drive_plain_idler_offset(coreXY_type).x - plain_idler_offset.x, coreXY_drive_plain_idler_offset(coreXY_type).y + plain_idler_offset.y])
translate([0, -lower_drive_pulley_offset.y, -pulley_offset(plain_idler)])
screw(M3_cap_screw, 20);
translate(coreXY_drive_toothed_idler_offset(coreXY_type))
translate_z(-pulley_offset(toothed_idler))
translate([0, -lower_drive_pulley_offset.y, -pulley_offset(toothed_idler)])
screw(M3_cap_screw, 20);
} else if (lower_drive_pulley_offset.x > 0) {
translate([pulley_od(plain_idler), coreXY_drive_plain_idler_offset(coreXY_type).y])
translate_z(-pulley_offset(plain_idler))
translate([pulley_od(plain_idler), coreXY_drive_plain_idler_offset(coreXY_type).y + plain_idler_offset.y])
translate([0, -lower_drive_pulley_offset.y, -pulley_offset(plain_idler)])
screw(M3_cap_screw, 20);
translate([-2*coreXY_drive_pulley_x_alignment(coreXY_type), coreXY_drive_toothed_idler_offset(coreXY_type).y])
translate_z(-pulley_offset(toothed_idler))
translate([-2*coreXY_drive_pulley_x_alignment(coreXY_type) - plain_idler_offset.x, coreXY_drive_toothed_idler_offset(coreXY_type).y])
translate([0, -lower_drive_pulley_offset.y, -pulley_offset(toothed_idler)])
screw(M3_cap_screw, 20);
}
}
@@ -118,13 +121,13 @@ module coreXY_belts_test() {
translate([coreXYPosBL.x, coreXY_toothed_idler_offset(coreXY_type).y, 0])
screw(M3_cap_screw, 20);
// add the screw for the left Y carriage plain idler
translate([coreXYPosBL.x + separation.x + coreXY_plain_idler_offset(coreXY_type).x, separation.y + coreXY_plain_idler_offset(coreXY_type).y, separation.z])
translate([coreXYPosBL.x + separation.x + coreXY_plain_idler_offset(coreXY_type).x + (upper_drive_pulley_offset.x == 0 ? 0 : plain_idler_offset.x), separation.y + coreXY_plain_idler_offset(coreXY_type).y, separation.z])
screw(M3_cap_screw, 20);
// add the screw for the right Y carriage toothed idler
translate([coreXYPosTR.x + separation.x, coreXY_toothed_idler_offset(coreXY_type).y, separation.z])
screw(M3_cap_screw, 20);
// add the screw for the right Y carriage plain idler
translate([coreXYPosTR.x - coreXY_plain_idler_offset(coreXY_type).x, separation.y + coreXY_plain_idler_offset(coreXY_type).y, 0])
translate([coreXYPosTR.x - coreXY_plain_idler_offset(coreXY_type).x - (lower_drive_pulley_offset.x == 0 ? 0 : plain_idler_offset.x), separation.y + coreXY_plain_idler_offset(coreXY_type).y, 0])
screw(M3_cap_screw, 20);
}
}

View File

@@ -20,7 +20,7 @@ z = 1; // [0: 5]
thickness = 3; // [0: 5]
shaft_length = 10;
include <../utils/core/core.scad>
include <../core.scad>
use <../printed/knob.scad>
use <../utils/layout.scad>
@@ -31,7 +31,8 @@ knobs = [for(i = [0 : len(potentiometers) - 1]) let(p = potentiometers[i])
top_d = [10, 12, 20, 16, 16 ][i],
bot_d = [10, 15, 20, 20, 20 ][i],
skirt = [false, [20, 2], false, [27, 1.5], [27, 1.5]][i],
pointer = [false, false, [14, [1, 5], 2], [13.5, [1, 1], 3], [13.5, [1, 3], 3]][i]
pointer = [false, false, [14, [1, 5], 2], [13.5, [1, 1], 3], [13.5, [1, 3], 3]][i],
screw = let(s = pot_shaft(p)) s.y > s.x / 2 ? M3_grub_screw : false
)];

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 71 KiB

View File

@@ -34,15 +34,18 @@ module teardrop(h, r, center = true, truncate = true, chamfer = 0, chamfer_both_
mirror([side, 0, 0])
intersection() {
hull()
translate([offset, 0]) {
circle4n(R);
translate([offset, 0]) {
circle4n(R);
if(truncate)
translate([0, R / 2])
square([2 * R * (sqrt(2) - 1), R], center = true);
else
polygon([[0, 0], [eps, 0], [0, R * sqrt(2)]]);
}
if (teardrop_angle > 0) {
x = R * tan(teardrop_angle / 2);
if(truncate)
translate([0, R / 2])
square([2 * x, R], center = true);
else
polygon([[0, 0], [eps, 0], [0, R + x * tan(min(teardrop_angle, 90 - eps))]]);
}
}
translate([0, -2 * R])
square([R, 4 * R]);
}

View File

@@ -30,7 +30,6 @@
//! allows flexible positioning of the motors.
//
include <../utils/core/core.scad>
include <../vitamins/belts.scad>
include <../vitamins/pulleys.scad>
@@ -69,7 +68,7 @@ function coreXY_drive_plain_idler_offset(type) = //! Offset of plain drive idler
[ coreXY_plain_idler_offset(type).x, -(pulley_od(coreXY_plain_idler(type)) + pulley_od(coreXY_drive_pulley(type))) / 2, 0 ];
module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = 0, drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false) { //! Draw one belt of a coreXY setup
module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = [0, 0], drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false) { //! Draw one belt of a coreXY setup
// y-carriage toothed pulley
p0_type = coreXY_toothed_idler(type);
@@ -91,20 +90,20 @@ module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_off
// toothed idler for offset stepper motor drive pulley
p3t_type = coreXY_toothed_idler(type);
p3t = [ -size.x / 2 + (drive_pulley_offset.x > 0 ? 0 : 2 * coreXY_drive_pulley_x_alignment(type)),
size.y / 2 + coreXY_drive_pulley_x_alignment(type) + drive_pulley_offset.y
p3t = [ -size.x / 2 + (drive_pulley_offset.x > 0 ? 0 : plain_idler_offset.x + 2 * coreXY_drive_pulley_x_alignment(type)),
size.y / 2 + coreXY_drive_pulley_x_alignment(type)
];
// y-carriage plain pulley
p4_type = coreXY_plain_idler(type);
p4 = [ -size.x / 2 + pulley_od(p4_type) / 2 + pulley_od(p3d_type) / 2 + coreXY_drive_pulley_x_alignment(type) + plain_idler_offset,
p4 = [ -size.x / 2 + pulley_od(p4_type) / 2 + pulley_od(p3d_type) / 2 + coreXY_drive_pulley_x_alignment(type) + (drive_pulley_offset.x == 0 ? 0 : plain_idler_offset.x),
-size.y / 2 + pulley_od(p4_type) / 2 + pos.y + separation_y / 2
];
// plain idler for offset stepper motor drive pulley
p3p_type = p4_type;
p3p = [ drive_pulley_offset.x > 0 ? p4.x : -p0.x - pulley_od(p0_type),
size.y / 2 - pulley_od(p3p_type) / 2 - pulley_od(p3d_type) / 2 + drive_pulley_offset.y
size.y / 2 - pulley_od(p3p_type) / 2 - pulley_od(p3d_type) / 2 + plain_idler_offset.y
];
// Start and end points
@@ -180,7 +179,7 @@ module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_off
tooth_colour = lower_belt ? coreXY_lower_tooth_colour(type) : coreXY_upper_tooth_colour(type));
}
module coreXY(type, size, pos, separation, x_gap, plain_idler_offset = 0, upper_drive_pulley_offset, lower_drive_pulley_offset, show_pulleys = false, left_lower = false) { //! Wrapper module to draw both belts of a coreXY setup
module coreXY(type, size, pos, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false) { //! Wrapper module to draw both belts of a coreXY setup
translate([size.x / 2 - separation.x / 2, size.y / 2, -separation.z / 2]) {
// lower belt
hflip(!left_lower)
@@ -195,10 +194,10 @@ module coreXY(type, size, pos, separation, x_gap, plain_idler_offset = 0, upper_
}
}
module coreXY_belts(type, carriagePosition, coreXYPosBL, coreXYPosTR, separation, x_gap = 20, upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false) { //! Draw the coreXY belts
module coreXY_belts(type, carriagePosition, coreXYPosBL, coreXYPosTR, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false) { //! Draw the coreXY belts
assert(coreXYPosBL.z == coreXYPosTR.z);
coreXYSize = coreXYPosTR - coreXYPosBL;
translate(coreXYPosBL)
coreXY(type, coreXYSize, [carriagePosition.x - coreXYPosBL.x, carriagePosition.y - coreXYPosBL.y], separation = separation, x_gap = x_gap, plain_idler_offset = 0, upper_drive_pulley_offset = upper_drive_pulley_offset, lower_drive_pulley_offset = lower_drive_pulley_offset, show_pulleys = show_pulleys, left_lower = left_lower);
coreXY(type, coreXYSize, [carriagePosition.x - coreXYPosBL.x, carriagePosition.y - coreXYPosBL.y], separation, x_gap, plain_idler_offset, upper_drive_pulley_offset, lower_drive_pulley_offset, show_pulleys, left_lower);
}

View File

@@ -30,6 +30,7 @@ T5x6 = ["T", 5, 6, 2.2, 1.2, 0.5];
T5x10 = ["T", 5, 10, 2.2, 1.2, 0.5];
T2p5x6 =["T", 2.5, 6, 1.7, 0.7, 0.3];
GT2x6 = ["GT", 2.0, 6, 1.38, 0.75, 0.254];
GT2x9 = ["GT", 2.0, 9, 1.38, 0.75, 0.254];
belts = [T5x6, T5x10, T2p5x6, GT2x6];
belts = [T5x6, T5x10, T2p5x6, GT2x6, GT2x9];
use <belt.scad>

View File

@@ -20,6 +20,8 @@
//
//! 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.
//
include <../utils/core/core.scad>
use <../utils/rounded_cylinder.scad>
use <../utils/quadrant.scad>
@@ -45,8 +47,10 @@ function blower_wall_left(type) = type[15]; //! Left side wall thickness
function blower_wall_right(type) = type[17]; //! Right wall thickness (for square fans)
function blower_casing_is_square(type) = blower_depth(type) < 15; //! True for square radial fans, false for spiral shape radial blowers
function blower_exit_offset(type) = blower_casing_is_square(type) ? blower_length(type) / 2 : blower_exit(type) / 2; //! Offset of exit's centre from the edge
function blower_exit_offset(type) = //! Offset of exit's centre from the edge
blower_casing_is_square(type) ? len(blower_screw_holes(type)) > 2 ? blower_length(type) / 2
: blower_wall_left(type) + blower_exit(type) / 2
: blower_exit(type) / 2;
fan_colour = grey(20);
module blower_fan(type, casing_is_square) {
@@ -100,6 +104,7 @@ module blower_square(type) { //! Draw a square blower
// cut out the inside, leaving the corners
translate([hole_count == 2 ? wall_left : corner_inset + wall_left, -eps])
square([blower_exit(type), width / 2], center = false);
translate(blower_axis(type))
circle(d = blower_bore(type) + 1);
} else {
@@ -225,6 +230,9 @@ module blower(type) { //! Draw specified blower
blower_fan(type, is_square);
}
*translate([blower_exit(type) / 2 + blower_exit_offset(type), 0])
rotate(180)
#cube([blower_exit(type), 30, depth]);
}
module blower_hole_positions(type) //! Translate children to screw hole positions

View File

@@ -28,6 +28,7 @@ function camera_lens_offset(type) = type[3]; //! Offset of the lens center fro
function camera_lens(type) = type[4]; //! Stack of lens parts, can be round, rectangular or rounded rectangular, with optional tapered aperture
function camera_connector_pos(type) = type[5]; //! The flex connector block for the camera itself's position
function camera_connector_size(type)= type[6]; //! The flex connector block for the camera itself's size
function camera_fov(type) = type[7]; //! The field of view of the camera lens
module camera_lens(type, offset = 0, show_lens = true) //! Draw the lens stack, with optional offset for making a clearance hole
color(grey(20))
@@ -57,7 +58,7 @@ module camera_lens(type, offset = 0, show_lens = true) //! Draw the lens stack,
}
}
module camera(type, show_lens = true) { //! Draw specified PCB camera
module camera(type, show_lens = true, fov_distance = 0, fov = undef) { //! Draw specified PCB camera
vitamin(str("camera(", type[0], "): ", type[1]));
pcb = camera_pcb(type);
@@ -66,6 +67,18 @@ module camera(type, show_lens = true) { //! Draw specified PCB camera
translate_z(pcb_thickness(pcb)) {
camera_lens(type, show_lens = show_lens);
if (show_lens&& fov_distance > 0) {
lens = camera_lens(type);
fov = is_undef(fov) ? camera_fov(type) : fov;
if (is_list(fov))
#translate_z(lens[2][0].z) // note: use of # is deliberate, to show highlighted field of view
translate(camera_lens_offset(type))
hull() {
cube([lens[1][1]/2, lens[1][1]/2, eps], center=true);
translate_z(fov_distance)
cube([2 * fov_distance * tan(fov.x / 2), 2 * fov_distance * tan(fov.y / 2), eps], center=true);
}
}
conn = camera_connector_size(type);
if(conn) {

View File

@@ -32,7 +32,8 @@ rpi_camera_v1 = ["rpi_camera_v1", "Raspberry Pi camera V1", rpi_camera_v1_pcb, [
[[0, 0, 4], 7.5 / 2],
[[0, 0, 5], 5.5 / 2, [1.5/2, 2/2, 0.5]],
],
[0, 12 - 1.5 - 2.5], [8, 5, 1]
[0, 12 - 1.5 - 2.5], [8, 5, 1],
[54, 41] // FOV
];
rpi_camera_v2_pcb = ["", "", 25, 23.862, 1, 2, 2.2, 0, "green", false, [[2, -2], [-2, -2], [2, -14.5], [-2, -14.5]],
@@ -47,7 +48,8 @@ rpi_camera_v2 = ["rpi_camera_v2", "Raspberry Pi camera V2", rpi_camera_v2_pcb, [
[[0, 0, 4], 7.5 / 2],
[[0, 0, 5], 5.5 / 2, [1.5/2, 2/2, 0.5]],
],
[-13.8 + 12.5, 23.862 / 2 - 4.7], [8.5, 4, 1]
[-13.8 + 12.5, 23.862 / 2 - 4.7], [8.5, 4, 1],
[62.2, 48.8] // FOV
];
rpi_camera_pcb = ["", "", 36, 36, 1.6, 0, 3.2, 0, "green", false, [[3.5, -3.5], [-3.5, -3.5], [3.5, 3.5], [-3.5, 3.5]],

View File

@@ -72,6 +72,16 @@ module d_pillar() { //! Draw a pillar for a D-connector
female_metric_thread(screw, pitch, height, false, colour = d_pillar_colour);
}
module d_plug_D(length, width, rad) { //! D plug D shape
d = width / 2 - rad;
offset = d * sin(10);
hull()
for(x = [-1, 1], y = [-1, 1])
translate([x * (length / 2 - rad) + y * x * offset, y * (width / 2 - rad)])
circle(rad);
}
module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specified D plug, which can be IDC, PCB or plain solder bucket
hole_r = 3.05 / 2;
dwall = 0.5;
@@ -89,16 +99,6 @@ module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specifi
vitamin(str(socket ? "d_socket(" : "d_plug(", type[0], arg(pcb, false, "pcb"), arg(idc, false, "idc"),
"): D-type ", pins, " way ", desc, socket ? " socket" : " plug"));
module D(length, width, rad) {
d = width / 2 - rad;
offset = d * sin(10);
hull()
for(x = [-1, 1], y = [-1, 1])
translate([x * (length / 2 - rad) + y * x * offset, y * (width / 2 - rad)])
circle(rad);
}
module pin_positions()
for($i = [1 : pins])
translate([($i - (pins + 1) / 2) * 2.77 / 2, ($i % 2 - 0.5) * 2.84])
@@ -117,14 +117,14 @@ module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specifi
linear_extrude(front_height, convexity = 5)
difference() {
D(d_length, d_width, 2.5);
D(d_length - 2 * dwall, d_width - 2 * dwall, 2.5 - dwall);
d_plug_D(d_length, d_width, 2.5);
d_plug_D(d_length - 2 * dwall, d_width - 2 * dwall, 2.5 - dwall);
}
if(!idc)
rotate([0,180,0])
hflip()
linear_extrude(back_height, convexity = 5)
D(d_lengths(type)[0] + 2 * dwall, d_widths(type)[0] + 2 * dwall, 2.5 + dwall);
d_plug_D(d_lengths(type)[0] + 2 * dwall, d_widths(type)[0] + 2 * dwall, 2.5 + dwall);
}
//
@@ -134,12 +134,12 @@ module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specifi
translate_z(d_flange_thickness(type) + eps)
rotate([0, 180, 0])
linear_extrude(back_height + 1 + d_flange_thickness(type), convexity = 5)
D(d_length - dwall, d_width - dwall, 2.5 - dwall/2);
d_plug_D(d_length - dwall, d_width - dwall, 2.5 - dwall/2);
if(socket)
linear_extrude(front_height - eps, convexity = 5)
difference() {
D(d_length - dwall, d_width - dwall, 2.5 - dwall/2);
d_plug_D(d_length - dwall, d_width - dwall, 2.5 - dwall/2);
pin_positions()
circle(r = 0.7);

View File

@@ -20,7 +20,9 @@
//
//! Used for limit switches. Currently only the button type is supported as the lever and roller types are less accurate.
//!
//! The switch is drawn with the button at the nominal operation point. This can be plus or minus `microswitch_op_tol(type)`.
//! The origin of the switch is in the center of the body. `microswitch_button_pos()` is the offset to tip of the button at its operating point.
//!
//! The switch is drawn with the button at the nominal operation point. This actual trigger point can be plus or minus `microswitch_op_tol(type)`.
//!
//! When the button is released it comes out by a maximum of `microswitch_fp_max(type)` from the nominal operating point.
//

View File

@@ -721,11 +721,11 @@ MP1584EN = ["MP1584EN", "MP1584EN 3A buck converter", 22, 17, 1.2, 0, 1, [2, 2],
[]
];
PERF80x20 = ["PERF80x20", "Perfboard 80 x 20mm", 80, 20, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.87, 3.49]];
PERF80x20 = ["PERF80x20", "Perfboard 80 x 20mm", 80, 20, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.71, 3.65]];
PERF70x50 = ["PERF70x50", "Perfboard 70 x 50mm", 70, 50, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.87, 3.49]];
PERF70x50 = ["PERF70x50", "Perfboard 70 x 50mm", 70, 50, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.79, 3.41]];
PERF70x30 = ["PERF70x30", "Perfboard 70 x 30mm", 70, 30, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.87, 3.49]];
PERF70x30 = ["PERF70x30", "Perfboard 70 x 30mm", 70, 30, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.79, 3.57]];
PERF60x40 = ["PERF60x40", "Perfboard 60 x 40mm", 60, 40, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.87, 3.49]];

View File

@@ -30,6 +30,7 @@
// d r r d d
//
M2x16_brass_pillar = ["M2x16_brass_pillar", "nurled", 2, 16, 3.17, 3.17, 0, 0, brass, brass, 3,-3];
M3x6_hex_pillar = ["M3x6_hex_pillar", "hex", 3, 6, 5/cos(30), 5/cos(30), 6, 6, brass, brass, -5, 6];
M3x13_hex_pillar = ["M3x13_hex_pillar", "hex", 3, 13, 5/cos(30), 5/cos(30), 6, 6, "silver", silver, -6, 6];
M3x20_hex_pillar = ["M3x20_hex_pillar", "hex", 3, 20, 5/cos(30), 5/cos(30), 6, 6, "silver", silver, -8, 8];
M3x20_nylon_pillar = ["M3x20_nylon_pillar", "nylon", 3, 20, 8, 5/cos(30), 0, 6, "white", brass, -6, 6];
@@ -38,6 +39,6 @@ M3x20_nylon_hex_pillar = ["M3x20_nylon_hex_pillar", "hex nylon", 3, 20, 8/cos(30
M3x10_nylon_hex_pillar = ["M3x10_nylon_hex_pillar", "hex nylon", 3, 10,5.5/cos(30),5.5/cos(30),6, 6, grey(20), grey(20), -6, 6];
pillars = [M2x16_brass_pillar, M3x13_hex_pillar, M3x20_hex_pillar, M3x20_nylon_pillar, M4x17_nylon_pillar, M3x10_nylon_hex_pillar, M3x20_nylon_hex_pillar];
pillars = [M2x16_brass_pillar, M3x6_hex_pillar, M3x13_hex_pillar, M3x20_hex_pillar, M3x20_nylon_pillar, M4x17_nylon_pillar, M3x10_nylon_hex_pillar, M3x20_nylon_hex_pillar];
use <pillar.scad>

View File

@@ -211,7 +211,7 @@ module potentiometer(type, thickness = 3, shaft_length = undef, value = false) {
color(shaft[4])
vflip()
cylinder(d = shaft.x, h = gap);
cylinder(d = shaft.x, h = gap);
}
}

View File

@@ -129,21 +129,26 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
head_t = rad / 5;
head_height = head_rad + head_t;
rotate_extrude()
difference() {
polygon([[0, 0], [head_rad, 0], [head_rad, -head_t], [0, -head_height]]);
translate([0, -socket_depth + eps])
square([socket_rad, 10]);
}
translate_z(-socket_depth)
linear_extrude(socket_depth)
color(colour) {
rotate_extrude()
difference() {
circle(socket_rad + 0.1);
polygon([[0, 0], [head_rad, 0], [head_rad, -head_t], [0, -head_height]]);
children();
translate([0, -socket_depth + eps])
square([socket_rad, 10]);
}
translate_z(-socket_depth)
linear_extrude(socket_depth)
difference() {
circle(socket_rad + 0.1);
children();
}
}
color(colour * 0.9)
translate_z(-socket_depth)
cylinder(h=2 * eps, r=socket_rad, $fn = 6);
}
explode(length + 10) {
@@ -160,6 +165,9 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
}
}
color(colour * 0.9)
translate_z(head_height - socket_depth)
cylinder(h=2 * eps, r=socket_rad, $fn = 6);
shaft();
}
if(head_type == hs_grub) {
@@ -179,6 +187,9 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
translate_z(-length)
cylinder(r = r, h = length - socket_depth);
}
color(colour * 0.8)
translate_z(head_height - socket_depth)
cylinder(h=2 * eps, r=socket_rad, $fn = 6);
}
if(head_type == hs_hex) {
color(colour)
@@ -207,6 +218,9 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
square([socket_width, 2 * socket_rad], center = true);
}
}
color(colour * 0.9)
translate_z(head_height - socket_depth)
cylinder(h=2 * eps, r=socket_rad + eps);
shaft();
}
@@ -234,6 +248,9 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
circle(socket_rad, $fn = 6);
}
}
color(colour * 0.9)
translate_z(head_height - socket_depth)
cylinder(h=2 * eps, r=socket_rad, $fn = 6);
shaft();
}
@@ -241,19 +258,17 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
socket_rad = 0.6 * head_rad;
socket_depth = 0.3 * head_rad;
socket_width = 1;
color(colour)
cs_head(socket_rad, socket_depth) {
square([2 * socket_rad, socket_width], center = true);
square([socket_width, 2 * socket_rad], center = true);
}
cs_head(socket_rad, socket_depth) {
square([2 * socket_rad, socket_width], center = true);
square([socket_width, 2 * socket_rad], center = true);
}
shaft(socket_depth);
}
if(head_type == hs_cs_cap) {
color(colour)
cs_head(socket_rad, socket_depth)
circle(socket_rad, $fn = 6);
cs_head(socket_rad, socket_depth)
circle(socket_rad, $fn = 6);
shaft(socket_depth);
}

View File

@@ -29,6 +29,7 @@ function tubing_id(type) = type[3]; //! Inside diameter
function tubing_colour(type) = type[4]; //! Colour
function tubing_or(type) = tubing_od(type) / 2; //! Outside radius
function tubing_ir(type) = tubing_id(type) / 2; //! Inside radius
module tubing(type, length = 15, forced_id = 0, center = true) { //! Draw specified tubing with optional forced internal diameter
original_od = tubing_od(type);
@@ -50,4 +51,3 @@ module tubing(type, length = 15, forced_id = 0, center = true) { //! Draw specif
circle(d = id);
}
}

View File

@@ -32,13 +32,13 @@ module ribbon_cable(ways, length) //! Add ribbon cable to the
//
// Cable sizes
//
function cable_wires(cable) = cable[0]; //! Number of wires in a bindle
function cable_wires(cable) = cable[0]; //! Number of wires in a bundle
function cable_wire_size(cable) = cable[1]; //! Size of each wire in a bundle
// numbers from http://mathworld.wolfram.com/CirclePacking.html
function cable_radius(cable) = [0, 1, 2, 2.15, 2.41, 2.7, 3, 3, 3.3][cable_wires(cable)] * cable_wire_size(cable) / 2; //! Radius of a bundle of wires, see <http://mathworld.wolfram.com/CirclePacking.html>.
function wire_hole_radius(cable) = ceil(2 * cable_radius(cable) +1) / 2; //! Radius of a hole to accept a bundle of wires
function wire_hole_radius(cable) = ceil(4 * cable_radius(cable) + 1) / 4; //! Radius of a hole to accept a bundle of wires, rounded up to standard metric drill size
function cable_bundle(cable) = //! Arrangement of a bundle in a flat cable clip
[[0,0], [1,1], [2,1], [2, 0.5 + sin(60)], [2,2], [3, 0.5 + sin(60)], [3,2]][cable_wires(cable)];
@@ -49,11 +49,11 @@ function cable_height(cable) = cable_bundle(cable)[1] * cable_wire_size(cable);
module mouse_hole(cable, h = 100, teardrop = false) { //! A mouse hole to allow a panel to go over a wire bundle.
r = wire_hole_radius(cable);
if(teardrop)
vertical_tearslot(r = r, l = 2 * r, h = h, plus = true);
else
rotate(90)
slot(r, 2 * r, h = h);
if(teardrop)
vertical_tearslot(r = r, l = 2 * r, h = h, plus = true);
else
rotate(90)
slot(r, 2 * r, h = h);
}
module cable_tie_holes(cable_r, h = 100) { //! Holes to thread a ziptie through a panel to make a cable tie.