Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

badly behaving jscad file

View gist:8274288
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
function getParameterDefinitions(){
return [
{
"name" : "showBuildPlate"
,"type" : "choice"
,"values" : [
"none"
,"ToM"
]
,"initial" : "none"
,"caption" : "Show build plate"
}
,{
"name" : "part"
,"type" : "choice"
,"values" : [
"dremelFork"
,"upright"
]
,"initial" : "dremelFork"
,"caption" : "part type"
}
 
,{
"name" : "maxDremelDiameter"
,"type" : "float"
,"initial" : 52
,"caption" : "maximum dremel diameter"
}
,{
"name" : "forkHolderDiameter"
,"type" : "float"
,"initial" : 6.25 * 2
,"caption" : "diameter of fork torus"
}
,{
"name" : "forkAxisHeight"
,"type" : "float"
,"initial" : 20
,"caption" : "canister diameter"
}
,{
"name" : "forkBoltDiameter"
,"type" : "float"
,"initial" : 5/16 * 25.4 * 1.03
,"caption" : "Diameter of fork bolt"
}
,{
"name" : "forkBoltWall"
,"type" : "float"
,"initial" : 3
,"caption" : "Diameter of fork bolt"
}
 
 
];
 
}
 
 
function main(params){
var ret = [];
if("dremelFork" == params.part){
var cubeThickness = params.forkBoltDiameter + params.forkBoltWall * 2;
 
var base = union(
torus({
"ri" : params.forkHolderDiameter / 2
,"ro" : (params.forkHolderDiameter + params.maxDremelDiameter) / 2
,"fni" : params.forkHolderDiameter * 2
,"fno" : (params.forkHolderDiameter + params.maxDremelDiameter) * 2
})
,CSG.cube({
"center" : [
-(params.forkHolderDiameter + params.maxDremelDiameter) / 2 - params.forkAxisHeight / 2,
0,
cubeThickness / 2
]
,"radius" : [params.forkAxisHeight / 2, cubeThickness / 2, cubeThickness / 2]
}).subtract(
rotate(-45, [0, 1, 0], CSG.cylinder({
"start" : [0, 0, -100]
,"end" : [0, 0, 100]
,"radius" : params.maxDremelDiameter / 2
,"resolution" : 2 * params.maxDremelDiameter
})).translate([params.forkHolderDiameter, 0 ,0])
)
 
);
 
var holes = union(
CSG.cube({
"center" : [100, 0, 0]
,"radius" : [100, 100, 100]
})
,CSG.cube({
"center" : [0, 0, -100]
,"radius" : [100, 100, 100]
})
,CSG.cylinder({
"start" : [100, 0, cubeThickness / 2]
,"end" : [-100, 0, cubeThickness / 2]
,"radius" : params.forkBoltDiameter / 2
,"resolution" : 2 * params.forkBoltDiameter
})
);
ret =[base.subtract(holes).center([true, true, false])];
}
 
if(params.showBuildPlate == "ToM")
ret.push(CAG.rectangle({"radius" : [60, 60]}));
 
return ret;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.