Can now override the front panel width of a butt_box to make it wider.

This commit is contained in:
Chris Palmer 2019-10-22 15:36:37 +01:00
parent 8c51183ba6
commit dbc3c36f44
2 changed files with 2 additions and 3 deletions

View File

@ -169,7 +169,7 @@ module bbox_right_blank(type, sheet = false) { //! 2D template for the right sid
}
}
module bbox_front_blank(type, sheet = false) { //! 2D template for the front
module bbox_front_blank(type, sheet = false, width = 0) { //! 2D template for the front
dxf(str(bbox_name(type), "_front"));
t = sheet_thickness(bbox_sheets(type));
@ -178,7 +178,7 @@ module bbox_front_blank(type, sheet = false) { //! 2D template for the front
difference() {
translate([0, (bt - bb) / 2])
sheet_2D(subst_sheet(type, sheet), bbox_width(type) + 2 * t, bbox_height(type) + bb + bt);
sheet_2D(subst_sheet(type, sheet), max(bbox_width(type) + 2 * t, width), bbox_height(type) + bb + bt);
drill_holes(type, rotate([-90, 0, 0]) * translate([0, bbox_depth(type) / 2]));
}

View File

@ -3258,7 +3258,6 @@ Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
| ```bbox_base(type)``` | Default base, can be overridden to customise |
| ```bbox_base_blank(type)``` | 2D template for the base |
| ```bbox_front(type)``` | Default front, can be overridden to customise |
| ```bbox_front_blank(type, sheet = false)``` | 2D template for the front |
| ```bbox_front_blank(type, sheet = false, width = 0)``` | 2D template for the front |
| ```bbox_left(type)``` | Default left side, can be overridden to customise |
| ```bbox_left_blank(type, sheet = false)``` | 2D template for the left side |