<commit_before>$fn = 250;

R = 50;
ballShell = 3;
supportX = 35;
supportY = 8;
supportZ = 60;
mik = 2;
sThickness = 5;
supportBaseHeight = 5;
baseHeight = 31;

module box(Xdim, Ydim, Zdim, thickness, application)
//Creates a box, dimensions are internal
{
	difference() {
		//translate([10,0,-thickness])
		cube([Xdim + thickness, Ydim + thickness, Zdim], center = true);
		translate([0, 0, thickness / 2]) cube([Xdim, Ydim, Zdim], center = true);
		if(application == "servo")
	{
		translate([-Xdim/2,0,-0.5*Zdim])cube([5,Ydim+2*thickness,Zdim/2+thickness], center=true);	
		translate([+Xdim/2,0,-0.5*Zdim])cube([5,Ydim+2*thickness,Zdim/2+thickness], center=true);
		translate([+Xdim/2,0,0])cube([thickness/2,0.3*Ydim,Zdim], center=true);
		translate([-Xdim/2,0,0])cube([thickness/2,0.3*Ydim,Zdim], center=true);		
	}
	}
}

module support() {
	difference() {
		union() {
			intersection() {
				sphere(R);
				translate([-R, -R+(supportY+sThickness)/2, 0])  cube([500, 25, 200], center = true);
			}

		}
	}

	translate([0, -R+(supportY+sThickness/2), -supportZ/2]) {
		minkowski() {
			box(supportX, supportY, supportZ, sThickness , "none");
			cylinder(r = mik, h = 1);
			//rotate([90,0,0])cylinder(r = mik, h = 1);
		}
	}
}

module base() {
translate([0, 0, -supportZ])
		minkowski() {
			cylinder(r= R+mik, h= supportBaseHeight);
		rotate([90,0,0])cylinder(r = mik, h = 1);
}
}



sphere(R);
support();
mirror([0, 10, 0]) support();
//need to understnad -2 in  2*R-5-mik-2
base();

translate([0, 0, -supportZ-supportBaseHeight-baseHeight])
difference(){
{difference(){
	minkowski() {
cylinder(r= R+6, h = baseHeight);		
rotate([90,0,0])cylinder(r = mik, h = 1);
}

translate([0, 0, 5])cylinder(r= (R+mik)/2, h = 10*baseHeight);		
}
translate([0, 0, 5])cylinder(r= R+mik+2, h = 10*baseHeight);		


}

translate([0, 0, 17-3])	box(24.5, 13, 17, 3,"servo");}<commit_msg>new 3dmodel<commit_after>$fn = 150;

R = 50;
ballShell = 3;
supportX = 0.7*R;
supportY = 0.15*R;
supportZ = 1.25*R;
mik = 2;
sThickness = 5;
supportBaseHeight = 5;
baseHeight = 31;

module box(Xdim, Ydim, Zdim, thickness, application)
//Creates a box, dimensions are internal
{
	difference() {
		//translate([10,0,-thickness])
		cube([Xdim + thickness, Ydim + thickness, Zdim], center = true);
		translate([0, 0, thickness / 2]) cube([Xdim, Ydim, Zdim], center = true);
		if(application == "servo")
	{
		translate([-Xdim/2,0,-0.5*Zdim])cube([5,Ydim+2*thickness,Zdim/2+thickness], center=true);	
		translate([+Xdim/2,0,-0.5*Zdim])cube([5,Ydim+2*thickness,Zdim/2+thickness], center=true);
		translate([+Xdim/2,0,0])cube([thickness/2,0.3*Ydim,Zdim], center=true);
		translate([-Xdim/2,0,0])cube([thickness/2,0.3*Ydim,Zdim], center=true);		
	}
	}
}

module support() {
	difference() {
		union() {
			intersection() {
				sphere(R);
				translate([-R, -R+(supportY+sThickness)/2, 0])  cube([500, 25, 200], center = true);
			}

		}
	}

	translate([0, -R+(supportY+sThickness/2), -supportZ/2]) {
		minkowski() {
			box(supportX, supportY, supportZ, sThickness , "none");
			cylinder(r = mik, h = 1);
			//rotate([90,0,0])cylinder(r = mik, h = 1);
		}
	}
}

module base() {
translate([0, 0, -supportZ])
		minkowski() {
			cylinder(r= R+mik, h= supportBaseHeight);
		rotate([90,0,0])cylinder(r = mik, h = 1);
}
}



sphere(R);
support();
mirror([0, 10, 0]) support();
bottom();
base();
module bottom() {
	translate([0, 0, -supportZ - supportBaseHeight - baseHeight]){
	difference() {

		difference() {
			minkowski() {
				cylinder(r = R + 6, h = baseHeight);
				rotate([90, 0, 0]) cylinder(r = mik, h = 1);
			}

			translate([0, 0, 5]) cylinder(r = (R + mik)-2*sThickness, h = 10 * baseHeight);
		}
	translate([0, 0, baseHeight-supportBaseHeight]) cylinder(r = R + mik + 2, h = 10*supportBaseHeight);
	}
	 
translate([0, 0, 17 - 3]) box(24.5, 13, 17, 3, "servo");
}

}
{'fraction_non_alphanumeric': 0.21648408972352634, 'fraction_numerical': 0.059728742827334376, 'mean_word_length': 4.3337969401947145, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6161627', 'n_tokens_mistral': 1879, 'n_tokens_neox': 1621, 'n_words': 313}