Add comments

This commit is contained in:
maride 2017-12-20 20:02:39 +01:00
parent 482350fb1b
commit b30e6d533a

View File

@ -1,6 +1,9 @@
round_psu_cable_plane(300, 200, 5, 20, 20, 10, 40, 90, 90, 90);
RESOLUTION=36;
/*
* Simple, base angular plane with four holes
*/
module base_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y) {
difference() {
// base square
@ -18,6 +21,9 @@ module base_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y) {
}
}
/*
* base_plane(...) with rounded edges, using helper function __radius_cutout(...)
*/
module round_base_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y, radius) {
difference() {
base_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y);
@ -37,6 +43,9 @@ module round_base_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y
}
}
/*
* Rounded base plane with cutout for the PSU
*/
module round_psu_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y, radius, psu_width, psu_height) {
difference() {
round_base_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y, radius);
@ -45,6 +54,10 @@ module round_psu_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y,
square([psu_width, psu_height]);
}
}
/*
* Rounded base plane with cutout for cables
*/
module round_cable_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y, radius, cable_width, cable_height) {
difference() {
round_base_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y, radius);
@ -54,6 +67,9 @@ module round_cable_plane(width, height, hole_size, hole_spacing_x, hole_spacing_
}
}
/*
* Base plane with combined cutouts: for PSU and for cables
*/
module round_psu_cable_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y, radius, psu_width, psu_height, cable_width, cable_height) {
intersection() {
round_psu_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y, radius, psu_width, psu_height);
@ -61,6 +77,9 @@ module round_psu_cable_plane(width, height, hole_size, hole_spacing_x, hole_spac
}
}
/*
* Helper function for round edges
*/
module __radius_cutout(radius) {
difference() {
translate([radius/2, radius/2, 0])