Skip to content

Instantly share code, notes, and snippets.

@lolobosse
Last active August 29, 2015 14:24
Show Gist options
  • Save lolobosse/28e3b39e5d4525e60ddc to your computer and use it in GitHub Desktop.
Save lolobosse/28e3b39e5d4525e60ddc to your computer and use it in GitHub Desktop.
radiusOfMotorShape = 2.5;
radiusOfLinkToMotor = radiusOfMotorShape + 1;
radiusOfHoleInTheMiddleOfBigPlatform = radiusOfLinkToMotor + 1;
radiusOfScrewToFixToMotor = 1.5;
// See: http://www.tid-inox.com/visserie/934a4,41.html
// M3
ePartOfTheThingToCatch = 6.01;
m = 3;
diameterOfLittleHole = (ePartOfTheThingToCatch) + 0.3;
diameterOfBigHole = diameterOfLittleHole + 2;
outerDiameterOfTheBigCylinder = 80;
thicknessBigCylinder = 5;
innerDiameterOfTheBigCylinder = outerDiameterOfTheBigCylinder - thicknessBigCylinder;
heightBigCylinder = 20;
// Make the little one smaller but big enough not to have some pieces which goes under.
innerDiameterOfTheLittleCylinder = innerDiameterOfTheBigCylinder - m - 1;
toBeMovedforTest = 0;
angle = -25;
bigCylinder();
smallCylinder();
test = true;
// Je viens de commencer avec ce soft mais c'est carrément mieux que toutes les autres merdes faites à la souris...
// Je ne sais pas exactement comment gérer la tige qui doit aller au moteur
// Tu dois faire le système de couplage au moteur à part si tu trouves une meilleure solution
// TODO: Le trou dans le petit cylindre
// TODO: Le support de toute cette merde (le fait que ça ne soit pas droit complique encore un peu plus les choses)
// TODO: Les axes sur la plateforme qui bouge, je pense qu'avec une addition de polygone c'est faisable
// Bon courage
module bigCylinder(){
if (test){
rotate([0,angle,0]){
BigCylinderCreator();
}
}else{
BigCylinderCreator();
}
}
module smallCylinder(){
union(){
if (test){
rotate([0,angle,0]){
SmallCylinderCreator();
}
}
else{
SmallCylinderCreator();
}
}
}
module SmallCylinderCreator(){
difference(){
translate([0,toBeMovedforTest,10])
cylinder(r=innerDiameterOfTheLittleCylinder/2, h=3);
translate([(innerDiameterOfTheBigCylinder-12)/2,toBeMovedforTest,-1])
cylinder(r=diameterOfLittleHole/2, 30);
}
difference(){
translate([0,0,-39])
cylinder(r=radiusOfLinkToMotor, h=50);
translate([0,0,-40])
cylinder(r=radiusOfMotorShape+0.3, h=30);
translate([-10,0,-30]){
rotate([0,90,0])
cylinder(r=radiusOfScrewToFixToMotor, h=50);}
}
}
module BigCylinderCreator(){
difference(){
difference(){
cylinder(h=heightBigCylinder, r=outerDiameterOfTheBigCylinder/2);
translate([0,0,3])
cylinder(h=heightBigCylinder+1, r=innerDiameterOfTheBigCylinder/2);
}
// Just to be sure that the hole ist clear, we make it start from the bottom
translate([(innerDiameterOfTheBigCylinder-12)/2,0,-1])
// Height is whatever
cylinder(r=diameterOfBigHole/2, h=30);
// Height is whatever
translate([0,0,-1])
cylinder(r=radiusOfHoleInTheMiddleOfBigPlatform, h=30);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment