<commit_before>use <MCAD/nuts_and_bolts.scad>

guiding_length = 10;
x = 2;
space = 15;


difference(){
union(){
	hull(){
	translate([space +guiding_length/2,0,0]) cube(size=[15,10,guiding_length], center = true);
	translate([x, 0, x]) sphere(3);
	}

	hull(){
		translate([0,0,space+guiding_length/2]) rotate([0,90,0])cube(size=[15,10,guiding_length], center = true);
		translate([x, 0, x]) sphere(3);
	}
}

	translate([space +guiding_length/2,0,0]) cylinder(r=3.25, h=10*guiding_length, center = true);
	translate([0,0,space+guiding_length/2]) rotate([0,90,0])cylinder(r=3.25, h=10*guiding_length, center = true);

//space for nut
	rotate([0,-90,0])
union(){translate([space +guiding_length/2+4.5,0, 0]) rotate([0,90,0]) translate([0,0,-1.25])  nutHole(3);
 translate([space +guiding_length/2+2.5,0, 0]) rotate([0,90,0]) translate([0,0,-1.25]) nutHole(3);

	translate([space +guiding_length/2+5,0, 0]) rotate([0,90,0]) cylinder(r=1.5, h=15, center=true);}

	translate([space +guiding_length/2+4.5,0, 0]) rotate([0,90,0]) translate([0,0,-1.25])  nutHole(3);
	translate([space +guiding_length/2+2.5,0, 0]) rotate([0,90,0]) translate([0,0,-1.25])  nutHole(3);
	translate([space +guiding_length/2+5,0, 0]) rotate([0,90,0]) cylinder(r=1.5, h=15, center=true);

//Cube to visualize
	//cube(space +guiding_length/2+7);

}

//cube(size=[sqrt(guiding_length
<commit_msg>Adapt piece to 3D printing Cut piece in two parts to be joined Avoid "echafaudage" Sligtly increase hole for potentiometer<commit_after>guiding_length = 10;
x = 2;
space = 16;
potentiometer_diameter = 6.6;
alpha = 2/3;

total_length = guiding_length*3/2+space;

// Bottom part
difference(){
	union(){
		cube(size=[total_length,guiding_length,guiding_length], center = true);
	}

	translate([total_length/2-guiding_length/2,0,0]) cylinder(r=potentiometer_diameter/2, h=10*guiding_length, center = true);
	translate([-total_length/2+guiding_length/2+guiding_length*(1-alpha)/2,0,0]) cube(size=[alpha*guiding_length, alpha*guiding_length, 2*guiding_length],center = true) ;
}


// Top part to be inserted at 90deg
translate([0,1.5*guiding_length,0])
union(){
difference(){
	union(){
		cube(size=[total_length,guiding_length,guiding_length], center = true);
	}

	translate([total_length/2-guiding_length/2,0,0]) cylinder(r=potentiometer_diameter/2, h=10*guiding_length, center = true);

	difference(){
	translate([-total_length/2+guiding_length/2-1,0,0]) cube(size=[guiding_length+2, guiding_length+2, 2*guiding_length],center = true) ;
	translate([-total_length/2+guiding_length/2,0,-guiding_length*(1-alpha)/2]) cube(size=[guiding_length, alpha*guiding_length, alpha*guiding_length],center = true) ;
}
}
}




{'fraction_non_alphanumeric': 0.19227886056971513, 'fraction_numerical': 0.07083958020989506, 'mean_word_length': 7.137195121951219, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4764249', 'n_tokens_mistral': 1159, 'n_tokens_neox': 1063, 'n_words': 166}