Skip to content

Instantly share code, notes, and snippets.

@danhigham
Last active January 22, 2023 16:06
Show Gist options
  • Save danhigham/e9e6d70ba4c03687e66138fb47545110 to your computer and use it in GitHub Desktop.
Save danhigham/e9e6d70ba4c03687e66138fb47545110 to your computer and use it in GitHub Desktop.
Festool OpenSCAD
/*
Model: Basic cone hose converter
Author: Dan Higham
*/
$fa = 1;
$fs = 0.4;
//PARAMS
cone_length = 35;
lip_length = 2;
bottom_size = 32;
bottom_length = 25;
//END PARAMS
$vpt = [0, 0, 100];
$vpr = [50, 0, 360 * $t];
$vpd = 500;
converter();
// 40mm_festool_plug();
// create the bottom part
use <write.scad>
module converter() {
thickness = 4;
top_size = 23.875 ;
difference() {
cylinder(bottom_length, bottom_size, bottom_size, center = false);
translate([0, 0, -.001])
cylinder(bottom_length + 0.003, bottom_size-thickness, bottom_size-thickness, center = false);
}
//create a lip
translate([0, 0, bottom_length])
difference() {
cylinder(lip_length, bottom_size + 2, bottom_size + 2, center = false);
translate([0, 0, -.001])
cylinder(lip_length + 0.003, bottom_size-thickness, bottom_size-thickness, center = false);
}
// create the cone
translate([0, 0, bottom_length + 2])
difference() {
cylinder(cone_length, bottom_size, top_size, center = false);
translate([0, 0, -.001])
cylinder(cone_length + 0.003, bottom_size-thickness, top_size-thickness, center = false);
}
translate([0, 0, bottom_length + cone_length + lip_length + 25])
rotate([0,180,0])
40mm_festool_plug();
}
module 40mm_festool_plug() {
//shell
inner_rad = 19.875;
outer_rad = inner_rad + 4;
height = 25;
bayonet_depth = 2;
bayonet_step1_width = 11.75;
bayonet_step1_height = 15;
bayonet_step2_width = 15.25;
bayonet_step2_height = 10;
bayonet_step2_step_up = 1.75;
CubePoints = [
[ 0, 0, bayonet_step2_step_up ], //0
[ bayonet_step2_width, 0, 0 ], //1
[ bayonet_step2_width, inner_rad+bayonet_depth, 0 ], //2
[ 0, inner_rad+bayonet_depth, bayonet_step2_step_up ], //3
[ 0, 0, bayonet_step2_height ], //4
[ bayonet_step2_width, 0, bayonet_step2_height ], //5
[ bayonet_step2_width, inner_rad+bayonet_depth, bayonet_step2_height ], //6
[ 0, inner_rad+bayonet_depth, bayonet_step2_height ]]; //7
CubeFaces = [
[0,1,2,3], // bottom
[4,5,1,0], // front
[7,6,5,4], // top
[5,6,2,1], // right
[6,7,3,2], // back
[7,4,0,3]]; // left
module inner() {
difference() {
difference() {
union() {
translate([-(bayonet_step1_width / 2), 0, -.001]) //lower part of bayonet (step1)
cube([bayonet_step1_width, inner_rad+bayonet_depth, bayonet_step1_height], center=false);
translate([-bayonet_step2_width, 0, (bayonet_step1_height - bayonet_step2_height)])
polyhedron( CubePoints, CubeFaces );
}
translate([0, 0, -.002])
cylinder(height+.002, inner_rad-.001, inner_rad-.001, center = false);
}
difference() {
cylinder(height, inner_rad+bayonet_depth+1, inner_rad+bayonet_depth+1, center = false);
translate([0, 0, -.002])
cylinder(height+0.002, inner_rad+bayonet_depth, inner_rad+bayonet_depth, center = false);
}
}
}
difference() {
union() {
difference() {
difference() {
cylinder(height, outer_rad, outer_rad, center = false);
translate([0, 0, -.001])
cylinder(height + .002, inner_rad, inner_rad, center = false);
}
for ( i = [0 : 2] ){
rotate([0, 0, i*120])
inner();
}
}
difference() {
cylinder(height, outer_rad, outer_rad, center = false);
translate([0, 0, -.001])
cylinder(height + .002, inner_rad+bayonet_depth, inner_rad+bayonet_depth, center = false);
}
}
writecylinder("customdustparts.com",[0,0,0],radius=outer_rad,height=15,rotate=0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment