Wireframe Chair
by Mach3 ·
Chairs are adorable. Some are not too convenient to seat on, though...
Interactive Preview & Customizer
3D preview with browser-based OpenSCAD rendering on parameter changes.

Width at the armrests
step 10
Total chair depth
step 10
Front seat rim height
step 10
Total chair height
step 10
Base thickness of the struts
step 1
Flatness ratio (smaller = flatter)
step 0.1
Quality of the rounded joints
step 8
WASM compiler loads on first parameter change.
Prompt
design this chair. use gray color.
OpenSCAD Code
/* [Global] */
// Width at the armrests
chair_width = 580; // [400:10:900]
// Total chair depth
chair_depth = 600; // [400:10:900]
// Front seat rim height
seat_height = 450; // [300:10:600]
// Total chair height
total_height = 820; // [600:10:1000]
/* [Frame Profile] */
// Base thickness of the struts
strut_size = 22; // [10:1:40]
// Flatness ratio (smaller = flatter)
flatness = 0.45; // [0.1:0.1:1.0]
// Quality of the rounded joints
quality = 32; // [16:8:64]
/* [Colors] */
frame_color = [0.65, 0.65, 0.65];
/* [Hidden] */
$fn = quality;
w = chair_width;
d = chair_depth;
sh = seat_height;
th = total_height;
r = strut_size / 2;
// Vertex Mapping [X, Y, Z]
vertices = [
// 0-3: FLOOR BASE
[ w*0.48, -d*0.4, 0], [ -w*0.48, -d*0.4, 0], [ -w*0.42, d*0.35, 0], [ w*0.42, d*0.35, 0],
// 4-9: SEAT RIM (8 and 9 are critical transitions)
[ w*0.35, -d*0.35, sh], [ -w*0.35, -d*0.35, sh], [ -w*0.48, -d*0.05, sh+80], [ w*0.48, -d*0.05, sh+80], [ -w*0.25, d*0.25, sh+20], [ w*0.25, d*0.25, sh+20],
// 10: SEAT CENTER
[ 0, -d*0.05, sh-20],
// 11-13: BACKREST TOP
[ -w*0.35, d*0.45, th-30], [ w*0.35, d*0.45, th-30], [ 0, d*0.5, th],
// 14: BACKREST CENTER
[ 0, d*0.48, sh+220],
// 15: FRONT MID RIM
[ 0, -d*0.35, sh],
// 16-17: LEG X-INTERSECTIONS
[ w*0.33, -d*0.05, sh*0.5], [ -w*0.33, -d*0.05, sh*0.5]
];
// Structural categorization
edges_legs = [[0, 4], [1, 5], [2, 8], [3, 9], [0, 3], [1, 2], [0, 16], [3, 16], [4, 16], [9, 16], [1, 17], [2, 17], [5, 17], [8, 17], [0, 15], [1, 15]];
edges_seat = [[4, 15], [5, 15], [5, 6], [6, 8], [8, 9], [9, 7], [7, 4], [4, 10], [5, 10], [6, 10], [8, 10], [9, 10], [7, 10], [15, 10]];
edges_back = [[8, 11], [9, 12], [11, 13], [12, 13], [8, 14], [9, 14], [11, 14], [12, 14], [13, 14], [6, 11], [7, 12]];
module oriented_node(idx, type) {
p = vertices[idx];
translate(p) {
// Nodes 6-9 are transitions where seat (Z-flat) meets backrest (Y-flat)
// We use a less flattened node here to prevent ends sticking out
if (idx == 6 || idx == 7 || idx == 8 || idx == 9) {
scale([1.15, 0.8, 0.8]) sphere(r = r);
} else if (type == "backrest") {
scale([1.1, flatness, 1.1]) sphere(r = r);
} else {
scale([1.1, 1.1, flatness]) sphere(r = r);
}
}
}
module oriented_strut(i1, i2, type) {
hull() {
oriented_node(i1, type);
oriented_node(i2, type);
}
}
module build_chair() {
color(frame_color) {
// Render Struts
for (e = edges_legs) oriented_strut(e[0], e[1], "legs");
for (e = edges_seat) oriented_strut(e[0], e[1], "seat");
for (e = edges_back) oriented_strut(e[0], e[1], "backrest");
// Render Nodes at all intersections for seamless miter joints
for (i = [0:17]) {
// Determine type for nodes that aren't transition nodes
t = (i >= 11 && i <= 14) ? "backrest" : "seat";
oriented_node(i, t);
}
}
}
build_chair();