Disculpa, pero esta entrada está disponible sólo en Inglés Estadounidense. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.

I started to work writing some modules and transformations. Everything I’m working on is based in extrusions – At this point I want to assemble the model, but later on it will be easy to get the corresponding DXF files for the cuts.

As everything is code-based and parameterized, I could start to play with correct positioning thanks to some trigonometry. Here’s a GIF I made to visualize the movement of the top plate with the holes as the rotating points (arm will be added later)

Here the press is closed

Here the arm would be open at 70°

Coding in vim, getting updates in OpenSCAD…

The code can be found here, but a snapshot of it right now is the following:

$fa=12;

plateLength=215.9;
plateWidth=139.7;
thickness=15;
radDonut=10;
hole_diam=6.35;

baseLength = plateLength + radDonut*2;

topWidth = plateWidth - thickness*2;

// BASE
translate([0,thickness]){
	// Printing plate
	translate([0,thickness])
%	linear_extrude(thickness){
		square([plateLength,plateWidth]);
	}

	// Right piece
	extrudedRectPieceWithDonutBase();
	translate([0,thickness])
		extrudedRectPieceBase();

	// Left piece
	translate([0,plateWidth+thickness]){
		translate([0,thickness])
			extrudedRectPieceBase();
		translate([0,2*thickness])
			extrudedRectPieceWithDonutBase();
	}
}

// TOP
h = (thickness); 
l = plateLength/2 + radDonut;
r = sqrt(h*h + l*l); // Length of arm from donut to donut
a = 70; // Angle of elevation!
// Calculate displacement in x,z according to a
ztop = r*sin(a);
xtop = plateLength/2 + radDonut - r*cos(a);

translate([xtop,0,ztop])
translate([0,thickness,thickness]){
	//Plate
	translate([0,thickness*2])
	linear_extrude(thickness){
		square([plateLength,topWidth]);
	}

	translate([0,thickness*2]){
		// Right piece
		extrudedRectPieceWithDonutTop();
	}

	translate([0,thickness*3 + topWidth]){
		// Right piece
		extrudedRectPieceWithDonutTop();
	}
}

module extrudedRectPieceWithDonutTop(){
	rotate([90,0,0])
	linear_extrude(thickness){
		rectPieceWithDonut(thickness,plateLength,plateLength/2);
	}
}


module extrudedRectPieceBase(){
	rotate([90,0,0])
	linear_extrude(thickness){
		rectPiece(thickness,baseLength);
	}
}

module extrudedRectPieceWithDonutBase(){
	rotate([90,0,0])
	linear_extrude(thickness){
		rectPieceWithDonut(thickness,baseLength,baseLength-radDonut);
	}
}

module rectPiece(h,l){
	square([l,h]);
}


// Rectangular piece with a donutWithBase in a given position 
// h is height of the rectangle
// l is length of the rectangle
// ld is the position of the donutWithBase
// rDonut is the radius of the donut
// hole_d is the diameter of the hole
module rectPieceWithDonut(h,l,ld,rDonut=radDonut,hole_d=hole_diam){
	square([l,h]);
	translate([ld,h+rDonut]){
		donutWithBase(rDonut,hole_d);
	}
}

// Centered in the center of the hole
// Radius of the circle
// Diameter of the hole
module donutWithBase(radius,hole_d){
	diam = radius*2;
	difference(){
		union(){
			circle(d=diam);
			translate([-radius,-radius]){
				square([diam,radius]);
			}
		}
		circle(d=hole_d);

	}
}