From 02791c40ac063e6c743b3fbd6187334322183d93 Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Mon, 18 May 2020 15:28:26 +0100 Subject: [PATCH] pbox_outer_shape() added and pbox_screw_positions() documented. --- printed/printed_box.scad | 7 +++++-- readme.md | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/printed/printed_box.scad b/printed/printed_box.scad index 5b2ed34..bf196a7 100644 --- a/printed/printed_box.scad +++ b/printed/printed_box.scad @@ -78,7 +78,7 @@ function pbox_screw_inset(type) = //! How far the base screws are inset R = pbox_radius(type) ) max(r, R - (R - r) / sqrt(2)); -module pbox_screw_positions(type) { +module pbox_screw_positions(type) { //! Place children at base screw positions foot = pbox_foot(type); inset = pbox_screw_inset(type); for(x = [-1, 1], y = [-1, 1]) @@ -127,6 +127,9 @@ module pbox_inner_shape(type) { rounded_square([w, d], rad, center = true); } +module pbox_outer_shape(type) //! 2D outer shape of the box + offset(pbox_wall(type) / 2) pbox_mid_shape(type); + module pbox_base(type) { //! Generate the STL for the base stl(str(pbox_name(type),"_base")); t = pbox_base(type); @@ -161,7 +164,7 @@ module pbox(type) { //! Generate the STL for the main case difference() { union() { linear_extrude(total_height) - offset(wall / 2) pbox_mid_shape(type); + pbox_outer_shape(type); if($children > 2) children(2); diff --git a/readme.md b/readme.md index e078d7e..536e238 100644 --- a/readme.md +++ b/readme.md @@ -4705,6 +4705,8 @@ It can also have printed feet on the base with the screws doubling up to hold th | ```pbox_base(type)``` | Generate the STL for the base | | ```pbox_base_screws(type, thickness = 0)``` | Place the screws and feet | | ```pbox_inserts(type)``` | Place the inserts for the base screws | +| ```pbox_outer_shape(type)``` | 2D outer shape of the box | +| ```pbox_screw_positions(type)``` | Place children at base screw positions | ![printed_box](tests/png/printed_box.png)