Skip to content

Instantly share code, notes, and snippets.

@Stemer114
Stemer114 / polyhole_half.scad
Last active September 13, 2015 19:23
polyhole half
/* this module makes use of the polyhole library function by nophead (MCAD library)
* MCAD Library - Polyholes Copyright 2011 Nophead (of RepRap fame)
* It is licensed under the terms of Creative Commons Attribution 3.0 Unported.
* https://github.com/SolidCode/MCAD/blob/master/polyholes.scad
*/
module polyhole_half(
h=10,
d=10
)
{
@Stemer114
Stemer114 / nut_trap_metric.scad
Last active October 23, 2016 14:31
nut traps metric (predefined, no params necessary)
//metric nut traps (M3 .. M4)
//see https://gist.github.com/Stemer114
// you can use the param functions for e.g. translation ops
// (access to height, thickness etc.)
function nut_trap_eps() = 0.1; //epsilon environment for non-manifold differences
function nut_trap_m3_w() = 5.5; //M3 wrench size
function nut_trap_m3_h() = 3; //M3 nut thickness
function nut_trap_m3nyloc_h() = 4.1; //M3 nyloc nut thickness
function nut_trap_m4_w() = 7; //M4 .. (and so on)
@Stemer114
Stemer114 / countersunk_screw.scad
Created October 23, 2016 14:27
countersunk screw
//counter-sunk screw
//(standing upside down on its head)
//defaults are for 3x20mm torx screw
module countersunk_screw(
l=20, //total length (including head)
dH = 6, //head dia
lH = 3, //head length
dB = 3.2, //bolt dia (with tolerance)
lS = 0 //support thickness if any (set this to layer thickness for upside down printing)
)
@Stemer114
Stemer114 / slot_hole_asymmetric.scad
Created October 23, 2016 14:49
slot hole (asymmetric)
// slot hole, asymmetric (different dias at ends)
module slot_hole_asymmetric(
w1 = 5, //dia left
w2 = 5, //dia right (if different)
l = 20, //length
h = 5 //thickness
)
{
hull() {
//left
@Stemer114
Stemer114 / stacked_polyholes.scad
Created October 28, 2016 22:05
two polyholes (l1, d1 and l2, d2) stacked on top of each other, with optional support layer in between
//two polyholes (d1, h1 and d2, h2) stacked on top of each other
//can be used for modelling cutouts for cylinder head screws, bearings with axle bore etc.
//out of solid components
module stacked_polyholes(
d1 = 5, //first polyhole (bottom)
l1 = 10,
d2 = 10, //second polyhole (stacked on top)
l2 = 20,
lS = 0 //optional support layer in betwenn (set this to layer thickness for upside down printing)
)
@Stemer114
Stemer114 / polyhole_hollow.scad
Last active May 14, 2017 22:05
polyhole with hollow interior (hollow column)
/* this module makes use of the polyhole library function by nophead (MCAD library)
* MCAD Library - Polyholes Copyright 2011 Nophead (of RepRap fame)
* It is licensed under the terms of Creative Commons Attribution 3.0 Unported.
* https://github.com/SolidCode/MCAD/blob/master/polyholes.scad
*/
function polyhole_hollow_eps() = 0.1; //epsilon environment for non-manifold differences
module polyhole_hollow(
h=10,
do=10, //outer diameter
di=8 //inner diameter