Preface There are good HSW OpenSCAD customizers out there as well as libraries to generate attachments, some I collected in this collection . What I found lacking was the ability to generate attachments on a grid and the ability to subtract HSW walls from another shape.
So I implemented the things I felt were missing, as a library to be able to re-use the functionality, and I figured I'd share it here as well as it will be a dependency for some of my models. This is the first OpenSCAD library I shared, and I'm still learning plenty. So if you used this in a project, I'd love to take a gander, consider adding it as a remix. If you have any constructive feedback, leave it in the comments.
About OpenSCAD library for basic HSW modelling:
HSW wallsingle hex grid defined by X/Y size or hex count infilled variant negative variant attachment (fastener) hexsingle fastener grid defined by X/Y size or hex count Installation This is an OpenSCAD library, OpenSCAD is required to make use of it. Read more about OpenSCAD libraries .
Install the BOSL2 library (dependency).Add this file to the OpenSCAD library path:Linux: $HOME/.local/share/OpenSCAD/libraries/ Mac OS X: $HOME/Documents/OpenSCAD/libraries/ Windows: My Documents\OpenSCAD\libraries\ Examples Single HSW hex use <hsw.scad>
hex();hex() options:
HSW hex grid by hex count use <hsw.scad>
hex_grid(count_x=3, count_y=5)hex_grid() options:
size_x: size [mm] of grid X axis size_y: size [mm] of grid Y axiscount_x: size (number of hex) of grid X axis count_y: size (number of hex) of grid Y axisfill: fill in hex. Values: true / false negative: use to subtract from shape to achieve HSW grid. Values: true / false HSW hex grid by size use <hsw.scad>
hex_grid(size_x=80, size_y=50);Subtract HSW grid from shape use <hsw.scad>
difference() {
cuboid([80,100,8], chamfer=1);
hex_grid(count_x=3, count_y=7, negative=true);
}HSW grid with infill use <hsw.scad>
hex_grid(count_x=4, count_y=4, fill=true);Single attachment use <hsw.scad>
attachment();attachment() options:
hex_diameter: diameter of the attachment. Default: 15.2. Range: [15.0:0.1:16.0]length: length of the attachment (on Z axis). Default: 8. Range: [7:0.1:200]chamfer: chamfer on top and bottom of the attachment. Default: 1. Range: [7.5:0.01:8.0]Single attachment with custom length, no chamfer use <hsw.scad>
attachment(length=20, chamfer=0);
Grid of attachments by count use <hsw.scad>
attachment_grid(count_x=3, count_y=3);attachment_grid() options:
hex_diameter: diameter of the attachment. Default: 15.2. Range: [15.0:0.1:16.0]length: length of the attachment (on Z axis). Default: 8. Range: [7:0.1:200]chamfer: chamfer on top and bottom of the attachment. Default: 1. Range: [7.5:0.01:8.0]size_x: size [mm] of grid X axis size_y: size [mm] of grid Y axiscount_x: size (number of attachment) of grid X axis count_y: size (number of attachment) of grid Y axis Add attachments to model use <BOSL2/std.scad>
use <hsw.scad>
size_x=30;
size_y=64;
down((size_x/2)+4)
attachment_grid(size_x=(size_x - 10), size_y=(size_y - 10), length=10);
difference() {
ycyl(d=size_x, l=size_y, $fn=64);
back(4)
ycyl(d=size_x-8, l=size_y-8, $fn=64);
}
Changelog 0.1.0 - 2025-09-27: initial version Tags
The author remixed this model.
Differences of the remix compared to the original Implements HSW wall and atachments as OpenSCAD library to supplement existing libraries and facilitate custom wall size and part modelling using OpenSCAD.