1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-01-17 05:28:14 +01:00

Butt_box star_washers() property renamed bbox_star_washers().

This commit is contained in:
Chris Palmer 2022-01-26 18:49:00 +00:00
parent ef06aa4387
commit ac58524b85
2 changed files with 7 additions and 6 deletions

View File

@ -46,9 +46,9 @@ function bbox_span(type) = type[4]; //! Maximum span between fixing blocks
function bbox_width(type) = type[5]; //! Internal width
function bbox_depth(type) = type[6]; //! Internal depth
function bbox_height(type) = type[7]; //! Internal height
function bbox_name(type) = type[8] ? type[8] : "bbox"; //! Optional name if there is more than one box in a project
function bbox_skip_blocks(type)= type[9] ? type[9] : []; //! List of fixing blocks to skip, used to allow a hinged panel for example
function star_washers(type) = type[10] ? type[10] : is_undef(type[10]); //! Set to false to remove star washers.
function bbox_name(type) = type[8]; //! Optional name if there is more than one box in a project
function bbox_skip_blocks(type)= type[9]; //! List of fixing blocks to skip, used to allow a hinged panel for example
function bbox_star_washers(type)= type[10];//! Set to false to remove star washers.
function bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true) = //! Construct the property list for a butt_box
[ screw, sheets, base_sheet, top_sheet, span, size.x, size.y, size.z, name, skip_blocks, star_washers ];
@ -231,6 +231,7 @@ module _bbox_assembly(type, top = true, base = true, left = true, right = true,
t = sheet_thickness(bbox_sheets(type));
bt = sheet_thickness(bbox_base_sheet(type));
tt = sheet_thickness(bbox_top_sheet(type));
star_washers = bbox_star_washers(type);
function is_missing_screw(p) = p.y > depth / 2 - 1 ? !back : false;
@ -240,13 +241,13 @@ module _bbox_assembly(type, top = true, base = true, left = true, right = true,
let(q = transform([0, 0, 0], p), thickness = q.z > 0 ? tt : bt)
multmatrix(p)
fastened_corner_block_assembly(is_missing_screw(q) && ((q.z > 0) != (q.x > 0)) ? 0 : t, bbox_screw(type), thickness,
is_missing_screw(q) && ((q.z > 0) == (q.x > 0)) ? 0 : t, star_washers = star_washers(type));
is_missing_screw(q) && ((q.z > 0) == (q.x > 0)) ? 0 : t, star_washers = star_washers);
h = height / 2 - 1;
for(p = fixing_block_positions(type))
let(q = transform([0, 0, 0], p), thickness = q.z > h ? tt : q.z < -h ? bt : t)
multmatrix(p)
fastened_fixing_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness2 = thickness, star_washers = star_washers(type));
fastened_fixing_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness2 = thickness, star_washers = star_washers);
for(x = [-1, 1])
translate([x * (width / 2 + t / 2 + eps + 25 * exploded()), 0])

View File

@ -4579,9 +4579,9 @@ Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
| `bbox_sheets(type)` | Sheet type for the sides |
| `bbox_skip_blocks(type)` | List of fixing blocks to skip, used to allow a hinged panel for example |
| `bbox_span(type)` | Maximum span between fixing blocks |
| `bbox_star_washers(type)` | Set to false to remove star washers. |
| `bbox_top_sheet(type)` | Sheet type for the top |
| `bbox_width(type)` | Internal width |
| `star_washers(type)` | Set to false to remove star washers. |
### Functions
| Function | Description |