Skip to content

Instantly share code, notes, and snippets.

@xkstein
Last active November 8, 2022 08:27
Show Gist options
  • Select an option

  • Save xkstein/95b5fec80e6f70e31d3c5ee6e8adfd66 to your computer and use it in GitHub Desktop.

Select an option

Save xkstein/95b5fec80e6f70e31d3c5ee6e8adfd66 to your computer and use it in GitHub Desktop.

Flexture Corner Spring

This script should make corner retention springs.

The variables in this script correspond to the measurements indicated in this image

Drawing Indicating Dimensions

Background

This is a copy of a flexture design shown in that great Amy Makes Stuff Flexture Board video.

The idea is that the flexture presses on the edge of an object to retain it, giving it a sort of "press-fit" feel with much higher tolerance. She laser cut hers out of delrin, which is a great material for this, but I want to include this in prints made from PLA (and PETG and ABS later), which is way less good for this.

Hopefully this openscad script to iterate with quickly to meet a given design spec and maybe try to characterize some of the properties of these springs at some point.

Future Work

  • Characterize some of the springs (maybe)
  • Experiement with other geometries for springs
ARM_LENGTH = 8.3;
ARM_WALL_WIDTH = 0.8;
GAP = 0.6;
HEIGHT = 5.0;
$ARM_WIDTH = 2 * ARM_WALL_WIDTH + GAP;
TOOTH_DEPTH = 1;
TOOTH_WIDTH = 1.2;
TOOTH_INSET = 1.0;
BASE = true;
BASE_NECK_WIDTH = 4.0;
HOLE_R = 2.1;
HOLE_SPACING = 10;
HOLE_KERF = 5;
$BASE_LENGTH = 2 * (HOLE_KERF + HOLE_R) + HOLE_SPACING;
$BASE_WIDTH = 2 * (HOLE_KERF + HOLE_R);
module boomerang(arm_length, arm_width, height, crotch_radius = 0)
{
arm_box_length = arm_length - (arm_width / 2);
union () {
cube([arm_box_length, arm_width, height]);
translate([arm_box_length, arm_width / 2, 0])
cylinder(h = height, r = arm_width / 2, $fn=100);
mirror([1, -1, 0]) {
cube([arm_box_length, arm_width, height]);
translate([arm_box_length, arm_width / 2, 0])
cylinder(h = height, r = arm_width / 2, $fn=100);
}
if(crotch_radius != 0) {
translate([arm_width, arm_width, 0])
difference() {
translate([-arm_width / 2, -arm_width / 2, 0])
cube([crotch_radius + arm_width / 2, crotch_radius + arm_width / 2, height]);
translate([crotch_radius, crotch_radius, -1])
cylinder(h = height + 2, r = crotch_radius, $fn=100);
}
}
}
}
//boomerang(ARM_LENGTH, 2 * ARM_WALL_WIDTH + GAP, HEIGHT, TOOTH_DEPTH);
union () {
difference () {
boomerang(ARM_LENGTH, $ARM_WIDTH, HEIGHT, TOOTH_DEPTH);
translate([ARM_WALL_WIDTH, ARM_WALL_WIDTH, -1])
boomerang(ARM_LENGTH - 2 * ARM_WALL_WIDTH, GAP, HEIGHT + 2, TOOTH_DEPTH);
}
translate([ARM_LENGTH - $ARM_WIDTH / 2 - TOOTH_INSET - TOOTH_WIDTH, $ARM_WIDTH, 0])
cube([TOOTH_WIDTH, TOOTH_DEPTH, HEIGHT]);
mirror([1, -1, 0]) {
translate([ARM_LENGTH - $ARM_WIDTH / 2 - TOOTH_INSET - TOOTH_WIDTH, $ARM_WIDTH, 0])
cube([TOOTH_WIDTH, TOOTH_DEPTH, HEIGHT]);
}
if (BASE) {
difference () {
rotate([0, 0, 45]) {
union () {
translate([0, 0, HEIGHT / 2])
cube([BASE_NECK_WIDTH, BASE_NECK_WIDTH, HEIGHT], center = true);
translate([-$BASE_WIDTH / 2, 0, HEIGHT / 2]) {
difference() {
cube([$BASE_WIDTH, $BASE_LENGTH, HEIGHT], center = true);
translate([0, HOLE_SPACING / 2, 0])
cylinder(h = HEIGHT + 2, r = HOLE_R, center = true, $fn=100);
translate([0, -HOLE_SPACING / 2, 0])
cylinder(h = HEIGHT + 2, r = HOLE_R, center = true, $fn=100);
}
}
}
}
translate([ARM_WALL_WIDTH / 2, ARM_WALL_WIDTH / 2, -1])
cube([$BASE_WIDTH, $BASE_WIDTH, HEIGHT + 2]);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment