Skip to content

Instantly share code, notes, and snippets.

@robbintt
Last active July 7, 2016 23:43
Show Gist options
  • Save robbintt/aaa7ea33c195d14d051ac15894c0fed6 to your computer and use it in GitHub Desktop.
Save robbintt/aaa7ea33c195d14d051ac15894c0fed6 to your computer and use it in GitHub Desktop.
A draft of my wedding band done in OpenSCAD
// OpenSCAD works in units mm
res=360*5; // working resolution
// res=360*2; // descriptive resolution
// ** DEFINE RING VARIABLES **
thickness = 2.1; // 2.1mm "thick" ring thickness
height = 5; // 5mm ring height (aka width, the cylinder height)
diam_inner = 19.35; // wikipedia ring size 9.5 == 19.35mm
radius_inner = diam_inner / 2;
diam_outer = diam_inner + (thickness * 2);
radius_outer = diam_outer / 2;
plaster_tolerance = 0.05; // see reference, Precision Casting Book
// let's use safe tolerance == 300% of the actual tolerance
safe_plaster_tolerance = plaster_tolerance * 3;
// ** END DEFINE RING VARIABLES **
// This difference subtracts the negative bezels from the ring.
difference() {
// Define pipe section using ring variables. A basic ring.
difference(){
cylinder(h=5, r=radius_outer, center=true, $fn=res);
cylinder(h=5, r=radius_inner, center=true, $fn=res);
}
// The inner bezel must be a negative quarter circle cutout.
// It must be rotate_extruded with an x-translation of the inner radius
// and a z-translation of 1/2 ring height minus the quarter circle height.
// The bezel should be a very small amount
// The detail tolerance of the plaster is 0.05mm
// The ring thickness is 2.1mm x 5mm
// the radius of the circle describes the length of the bezel
// We will use double the plaster tolerance to describe the
// actual circle. A 1/4 square section of this circle is used.
bezel_circle_diameter = 2 * safe_plaster_tolerance;
bezel_circle_radius = bezel_circle_diameter / 2; // for easy reading
bezel_pos_height = height / 2 - bezel_circle_radius;
bezel_neg_height = -1 * bezel_pos_height;
bezel_inner = radius_inner + bezel_circle_radius;
bezel_outer = radius_outer - bezel_circle_radius;
// top outer bezel
rotate_extrude($fn=res) {
translate([bezel_outer, bezel_pos_height, 0])
difference(){
square(bezel_circle_diameter);
circle(d=bezel_circle_diameter);
}
}
// bottom outer bezel
rotate_extrude($fn=res) {
translate([bezel_outer, bezel_neg_height, 0])
rotate([180,0,0])
difference(){
square(bezel_circle_diameter);
circle(d=bezel_circle_diameter);
}
}
// top inner bezel
rotate_extrude($fn=res) {
translate([bezel_inner, bezel_pos_height, 0])
rotate([0,180,0])
difference(){
square(bezel_circle_diameter);
circle(d=bezel_circle_diameter);
}
}
// bottom inner bezel
rotate_extrude($fn=res) {
translate([bezel_inner, bezel_neg_height, 0])
rotate([180,0,270])
difference(){
square(bezel_circle_diameter);
circle(d=bezel_circle_diameter);
}
}
}
//// sample inner bezel
//rotate_extrude($fn=res) {
// translate([10.725,0,0])
// rotate([0,180,0])
// intersection(){
// square(5);
// circle(d=5);
// }
//}
//
//// sample outer bezel
//rotate_extrude($fn=res) {
// translate([10.725,0,0])
// intersection(){
// square(5);
// circle(d=5);
// }
//}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment