Graphics Reference
In-Depth Information
To keep the model parametric, you will also add additional variables for
cubeWidth , cubeHeight , and cubeLength . You will use these variables as
the values for the three-value array discussed earlier. In addition, note
that cubeLength is calculated by multiplying ringSize by 2. This ensures
that the the cube cutouts will always penetrate through the ring band,
regardless of the size of the ring or bracelet.
The next step is to create additional rectangular cubes and use rotate
each one by 45 degrees to have them evenly spaced around the entire
ring band.
This time I will first show you the code, then explain the new lines:
// Parametric Variables - change these to modify your ring
//
ringSize=16.24; // width of your finger
ringHeight=6; // height of ring
ringThickness=2; // thickness of ring
cubeWidth=2.5; // width of the cube cutouts
cubeHeight=3.5; // height of the cube cutouts
cubeLength=ringSize*2; // length of the cube cutouts
\$fn=100; //set the resolution for the model to "high"
// subtract the inside of ring from outside
difference(){
// subtract the squares from the band
difference(){ //
// outside of ring
//
cylinder(h=ringHeight,r=(ringSize+1)/2+ringThickness,center=true);
// square shapes subtracted from the ring, rotated around the band
//
rotate([0,0,0]) //
cube([cubeLength,cubeWidth,cubeHeight],center=true); //
rotate([0,0,45])
cube([cubeLength,cubeWidth,cubeHeight],center=true);
rotate([0,0,90])
cube([cubeLength,cubeWidth,cubeHeight],center=true);
rotate([0,0,135])
cube([cubeLength,cubeWidth,cubeHeight],center=true);
rotate([0,0,-90])
cube([cubeLength,cubeWidth,cubeHeight],center=true);
rotate([0,0,-45])
cube([cubeLength,cubeWidth,cubeHeight],center=true);
rotate([0,0,-135])
cube([cubeLength,cubeWidth,cubeHeight],center=true);
}
// inside of ring
cylinder(h=ringHeight+10,r=(ringSize+1)/2,center=true);
}   Search WWH ::

Custom Search