...
 
Commits (1)
This diff is collapsed.
This diff is collapsed.
$fn=65;
// copied from https://openhome.cc/eGossip/OpenSCAD/TextCircle.html
module revolve_text(radius, chars, whitespace=0) {
PI = 3.14159;
circumference = 3.2 * PI * radius;
chars_len = len(chars) + whitespace;
font_size = circumference / chars_len;
step_angle = 360 / chars_len;
for(i = [0 : chars_len - 1]) {
rotate(-i * step_angle)
translate([0, radius + font_size / 2, 0])
text(chars[i],
font = "Cantarell:style=Extra Bold",
size = font_size,
valign = "center", halign = "center"
);
}
}
difference() {
color([0,0,0]) linear_extrude(3) circle(d=35);
translate([0,0,-0.5]) linear_extrude(4) circle(d=25);
translate([0,0,2]) linear_extrude(2) rotate([0,0,110])
revolve_text(13.5, "Federated Networks Association - feneas.org ");
translate([-12,-8.5,0]) cylinder(d=4, h=3);
}
color([0.1,0.2,0.9]) linear_extrude(1) circle(d=25);
color([0.06,0.38,0.14])
linear_extrude(2) scale([0.052,0.052,0]) include <Feneas-abstract.scad>
// Parametric lens cap
// Height of "threaded" part (smaller cylinder)
threadHeight = 2;
// Height of "cap" part
topHeight = 4;
// Height of springs
springHeight = 2;
// Clearance
gap = 1;
// Wall thickness
wall = 1.5;
// Size of springs in y direction.
springY = 15;
// Thickness of springs
springThickness = 1;
// Distance the clip will stick out past the lens
travel = 2;
// Lenscap diameter. On my printer setting to 76 works well for a 77mm lens
diameter = 54;
// Lenscap outer diameter.
capDiameter = 58;
// Size of holes for studs
holeDiameter = 6;
// Number of studs
numStuds = 2; // [2,3]
// Which part do you want? Note that selecing combined will generate unprintable stl
part = 0; // [0:all,1:top,2:springs,3:caps,4:combined]
// How far apart do you want the parts in the stl
partSpacing = 10;
lensRadius = diameter/2;
overhang = (capDiameter - diameter)/2;
channelWidth=lensRadius;
springBase = threadHeight+topHeight-(springHeight+wall+gap);
springLength=springY-2*springThickness;
springWidth=(lensRadius-springLength)/2-springThickness-gap;
// Total height is topHeight + threadHeight
// Clearance for glass is topHeight - (gap + springHeight)
// Circle smoothness - expressed as *1 to hide them from customizer
$fs = 0.5 *1;
$fn = 0 *1;
$fa = 0.01 *1;
module feneas_text() {
rotate([180,0,0]) {
translate([0,-3,0]) {
linear_extrude(2)
text("FEN", size=7, font="Cantarell:style=Extra Bold");
}
translate([0,-10,0]) {
linear_extrude(2)
text("EAS", size=7, font="Cantarell:style=Extra Bold");
}
translate([0,-17,0]) {
linear_extrude(2)
text("ORG", size=7, font="Cantarell:style=Extra Bold");
}
}
}
module feneas() {
$fn=64;
color([0.06,0.38,0.14]) linear_extrude(0.5) scale([0.052,0.052,0])
include <Feneas-abstract.scad>
translate([0,0,-0.5]) color([0,0,0]) linear_extrude(1) scale([0.052,0.052,0])
include <Feneas-abstract-lines.scad>
}
module spring()
{
block=springThickness*4;
translate([0,0,springBase])
{
translate([0, springThickness])
difference()
{
union()
{
cube([springWidth,springLength,springHeight]);
translate([springWidth,springLength/2])
cylinder(r=springLength/2, h=springHeight);
}
translate([-springWidth,springThickness])
cube([springWidth*2,springLength-springThickness*2,springHeight]);
translate([springWidth,springLength/2])
cylinder(r=(springLength-springThickness*2)/2, h=springHeight);
}
translate([-block/2,-block/2]) cube([block,block,springHeight]);
translate([-block/2,springY-block/2]) cube([block,block,springHeight]);
}
}
//channel for sliding through;
module slideChannel(w=channelWidth)
{
side = w/1.44;
stretch = 1.5;// value of 1 will leave the channel at 45 degrees, higher numbers reduce the slope
translate([0,0,(threadHeight+topHeight-springBase)/2+springBase])
scale([1,1,stretch])
rotate([0,45,0])
cube([side,4*lensRadius,side],true);
}
module clips()
{
module oneClip()
{
translate([0,travel,0])
difference()
{
intersection()
{
capShape();
slideChannel();
}
translate([-lensRadius,-2*lensRadius+springY-travel,-lensRadius])
cube([2*lensRadius,2*lensRadius,2*lensRadius]);
translate([0,0,springBase + springHeight + (wall+gap)/2])
cube([channelWidth,lensRadius+2*travel,wall+gap],true);
cylinder(h=springBase, r=lensRadius-wall);
// translate([-(lensRadius+overhang),-(lensRadius+overhang), 0])
// cube([(lensRadius+overhang)*2, (lensRadius+overhang)*2, springBase]);
}
}
oneClip();
mirror([0,1,0]) oneClip();
}
module frame()
{
topThickness = wall;
union()
{
difference()
{
capShape();
slideChannel(channelWidth+gap);
translate([0,0,(threadHeight+topHeight-topThickness)/2]) cube([channelWidth+wall*5,2,threadHeight+topHeight-topThickness],true);
difference()
{
cylinder(r=lensRadius-wall, h=threadHeight+topHeight-topThickness);
translate([0,0,(threadHeight+topHeight)/2]) cube([channelWidth+wall*4,lensRadius*2,threadHeight+topHeight],true);
}
cylinder(r=lensRadius-wall, h=springBase);
translate([-(channelWidth)/2, -lensRadius-overhang, 0])
cube([channelWidth, (lensRadius+overhang)*2, springBase]);
}
// Centre
translate([0,0,threadHeight+topHeight-topThickness/2]) cube([channelWidth,lensRadius,topThickness],true);
// Centre crossbrace
translate([0,0,springBase + springHeight + gap/2]) cube([channelWidth+wall*2,2,gap],true);
}
}
module capShape(){
union(){
cylinder(r=lensRadius, h=threadHeight+topHeight);
translate([0,0,threadHeight])
cylinder(r=lensRadius+overhang, r2=lensRadius+overhang-0.5, h=topHeight);
}
}
module lensCapBase()
{
color([1,0,0])
{
spring();
rotate([0,0,180]) spring();
mirror([0,1,0]) spring();
rotate([0,0,180]) mirror([0,1,0]) spring();
}
color([0,0,1]) clips();
translate([0,0,springBase + springHeight/2]) cube([channelWidth+wall*2,2,springHeight],true);
}
module lensCapBase1()
{
holex = lensRadius+travel-holeDiameter;
difference()
{
lensCapBase();
translate([-lensRadius-overhang-travel-2, -lensRadius-overhang-travel-2, threadHeight+topHeight-wall-gap])
cube([(lensRadius+overhang+travel+2)*2, (lensRadius+overhang+travel+2)*2, wall+gap]);
translate([-channelWidth/4, -holex, springBase]) hole();
translate([channelWidth/4, -holex, springBase]) hole();
translate([-channelWidth/4, holex, springBase]) hole();
translate([channelWidth/4, holex, springBase]) hole();
if (numStuds==3)
{
translate([0,-lensRadius/2-travel-holeDiameter, springBase]) hole();
translate([0,lensRadius/2+travel+holeDiameter, springBase]) hole();
}
}
}
module stud()
{
difference()
{
union()
{
translate([0,0,springHeight*1/3]) cylinder(r=holeDiameter/2 - 0.25,h=springHeight*2/3);
cylinder(r2=holeDiameter/2 + 0.25,r=holeDiameter/2 - 0.25,h=springHeight*1/3);
}
translate([0,0,springHeight/2]) cube([1.5,8,springHeight],true);
}
}
module hole()
{
union()
{
translate([0,0,springHeight/2]) cylinder(r=holeDiameter/2,h=springHeight/2);
cylinder(r=holeDiameter/2 +1,h=springHeight/2);
}
}
module lensCapBase2()
{
holex = lensRadius+travel-holeDiameter;
difference()
{
lensCapBase();
translate([-lensRadius-overhang-travel-2, -lensRadius-overhang-travel-2, 0])
cube([(lensRadius+overhang+travel+2)*2, (lensRadius+overhang+travel+2)*2, threadHeight+topHeight-wall-gap]);
}
translate([-channelWidth/4, -holex, springBase]) stud();
translate([channelWidth/4, -holex, springBase]) stud();
translate([-channelWidth/4, holex, springBase]) stud();
translate([channelWidth/4, holex, springBase]) stud();
if (numStuds==3)
{
translate([0,-lensRadius/2-travel-holeDiameter, springBase]) stud();
translate([0,lensRadius/2+travel+holeDiameter, springBase]) stud();
}
}
module lensCapTop()
{
color([0,1,0]) frame();
}
module crossSection(){
difference(){
lensCap();
translate([0,0,-lensRadius])cube(2*lensRadius);
}
}
/*
mirror([0,0,1]) {
if (part==0)
{
translate([0,0,0]) lensCapTop();
translate([capDiameter/2+channelWidth/2+partSpacing,0,springBase]) lensCapBase1();
translate([0,capDiameter/2+channelWidth/2+partSpacing,0]) rotate([0,0,90]) lensCapBase2();
}
else if (part==4)
{
lensCapTop();
lensCapBase1();
lensCapBase2();
}
else if (part==1)
lensCapTop();
else if (part==2)
lensCapBase1();
else if (part==3)
lensCapBase2();
}
*/
mirror([0,0,1]) {
difference() {
translate([0,0,0]) color([0,0,0]) lensCapTop();
translate([-12,0,topHeight+1]) linear_extrude(2) circle(d=25);
translate([2,-6,topHeight+3]) feneas_text();
}
translate([-12,0,topHeight+1.5]) rotate([180,0,90]) feneas();
//translate([capDiameter/2+channelWidth/2+partSpacing,0,springBase]) lensCapBase1();
//translate([0,capDiameter/2+channelWidth/2+partSpacing,0]) rotate([0,0,90]) lensCapBase2();
}
// Parametric lens cap
// Height of "threaded" part (smaller cylinder)
threadHeight = 2;
// Height of "cap" part
topHeight = 4;
// Height of springs
springHeight = 2;
// Clearance
gap = 1;
// Wall thickness
wall = 1.5;
// Size of springs in y direction.
springY = 15;
// Thickness of springs
springThickness = 1;
// Distance the clip will stick out past the lens
travel = 2;
// Lenscap diameter. On my printer setting to 76 works well for a 77mm lens
diameter = 54;
// Lenscap outer diameter.
capDiameter = 58;
// Size of holes for studs
holeDiameter = 6;
// Number of studs
numStuds = 2; // [2,3]
// Which part do you want? Note that selecing combined will generate unprintable stl
part = 0; // [0:all,1:top,2:springs,3:caps,4:combined]
// How far apart do you want the parts in the stl
partSpacing = 10;
lensRadius = diameter/2;
overhang = (capDiameter - diameter)/2;
channelWidth=lensRadius;
springBase = threadHeight+topHeight-(springHeight+wall+gap);
springLength=springY-2*springThickness;
springWidth=(lensRadius-springLength)/2-springThickness-gap;
// Total height is topHeight + threadHeight
// Clearance for glass is topHeight - (gap + springHeight)
// Circle smoothness - expressed as *1 to hide them from customizer
$fs = 0.5 *1;
$fn = 0 *1;
$fa = 0.01 *1;
module feneas_text() {
rotate([180,0,0]) {
translate([0,-3,0]) {
linear_extrude(2)
text("FENEAS", size=9, font="Cantarell:style=Extra Bold");
}
translate([0,-13,0]) {
linear_extrude(2)
text("ORG", size=9, font="Cantarell:style=Extra Bold");
}
}
}
module spring()
{
block=springThickness*4;
translate([0,0,springBase])
{
translate([0, springThickness])
difference()
{
union()
{
cube([springWidth,springLength,springHeight]);
translate([springWidth,springLength/2])
cylinder(r=springLength/2, h=springHeight);
}
translate([-springWidth,springThickness])
cube([springWidth*2,springLength-springThickness*2,springHeight]);
translate([springWidth,springLength/2])
cylinder(r=(springLength-springThickness*2)/2, h=springHeight);
}
translate([-block/2,-block/2]) cube([block,block,springHeight]);
translate([-block/2,springY-block/2]) cube([block,block,springHeight]);
}
}
//channel for sliding through;
module slideChannel(w=channelWidth)
{
side = w/1.44;
stretch = 1.5;// value of 1 will leave the channel at 45 degrees, higher numbers reduce the slope
translate([0,0,(threadHeight+topHeight-springBase)/2+springBase])
scale([1,1,stretch])
rotate([0,45,0])
cube([side,4*lensRadius,side],true);
}
module clips()
{
module oneClip()
{
translate([0,travel,0])
difference()
{
intersection()
{
capShape();
slideChannel();
}
translate([-lensRadius,-2*lensRadius+springY-travel,-lensRadius])
cube([2*lensRadius,2*lensRadius,2*lensRadius]);
translate([0,0,springBase + springHeight + (wall+gap)/2])
cube([channelWidth,lensRadius+2*travel,wall+gap],true);
cylinder(h=springBase, r=lensRadius-wall);
// translate([-(lensRadius+overhang),-(lensRadius+overhang), 0])
// cube([(lensRadius+overhang)*2, (lensRadius+overhang)*2, springBase]);
}
}
oneClip();
mirror([0,1,0]) oneClip();
}
module frame()
{
topThickness = wall;
union()
{
difference()
{
capShape();
slideChannel(channelWidth+gap);
translate([0,0,(threadHeight+topHeight-topThickness)/2]) cube([channelWidth+wall*5,2,threadHeight+topHeight-topThickness],true);
difference()
{
cylinder(r=lensRadius-wall, h=threadHeight+topHeight-topThickness);
translate([0,0,(threadHeight+topHeight)/2]) cube([channelWidth+wall*4,lensRadius*2,threadHeight+topHeight],true);
}
cylinder(r=lensRadius-wall, h=springBase);
translate([-(channelWidth)/2, -lensRadius-overhang, 0])
cube([channelWidth, (lensRadius+overhang)*2, springBase]);
}
// Centre
translate([0,0,threadHeight+topHeight-topThickness/2]) cube([channelWidth,lensRadius,topThickness],true);
// Centre crossbrace
translate([0,0,springBase + springHeight + gap/2]) cube([channelWidth+wall*2,2,gap],true);
}
}
module capShape(){
union(){
cylinder(r=lensRadius, h=threadHeight+topHeight);
translate([0,0,threadHeight])
cylinder(r=lensRadius+overhang, r2=lensRadius+overhang-0.5, h=topHeight);
}
}
module lensCapBase()
{
color([1,0,0])
{
spring();
rotate([0,0,180]) spring();
mirror([0,1,0]) spring();
rotate([0,0,180]) mirror([0,1,0]) spring();
}
color([0,0,1]) clips();
translate([0,0,springBase + springHeight/2]) cube([channelWidth+wall*2,2,springHeight],true);
}
module lensCapBase1()
{
holex = lensRadius+travel-holeDiameter;
difference()
{
lensCapBase();
translate([-lensRadius-overhang-travel-2, -lensRadius-overhang-travel-2, threadHeight+topHeight-wall-gap])
cube([(lensRadius+overhang+travel+2)*2, (lensRadius+overhang+travel+2)*2, wall+gap]);
translate([-channelWidth/4, -holex, springBase]) hole();
translate([channelWidth/4, -holex, springBase]) hole();
translate([-channelWidth/4, holex, springBase]) hole();
translate([channelWidth/4, holex, springBase]) hole();
if (numStuds==3)
{
translate([0,-lensRadius/2-travel-holeDiameter, springBase]) hole();
translate([0,lensRadius/2+travel+holeDiameter, springBase]) hole();
}
}
}
module stud()
{
difference()
{
union()
{
translate([0,0,springHeight*1/3]) cylinder(r=holeDiameter/2 - 0.25,h=springHeight*2/3);
cylinder(r2=holeDiameter/2 + 0.25,r=holeDiameter/2 - 0.25,h=springHeight*1/3);
}
translate([0,0,springHeight/2]) cube([1.5,8,springHeight],true);
}
}
module hole()
{
union()
{
translate([0,0,springHeight/2]) cylinder(r=holeDiameter/2,h=springHeight/2);
cylinder(r=holeDiameter/2 +1,h=springHeight/2);
}
}
module lensCapBase2()
{
holex = lensRadius+travel-holeDiameter;
difference()
{
lensCapBase();
translate([-lensRadius-overhang-travel-2, -lensRadius-overhang-travel-2, 0])
cube([(lensRadius+overhang+travel+2)*2, (lensRadius+overhang+travel+2)*2, threadHeight+topHeight-wall-gap]);
}
translate([-channelWidth/4, -holex, springBase]) stud();
translate([channelWidth/4, -holex, springBase]) stud();
translate([-channelWidth/4, holex, springBase]) stud();
translate([channelWidth/4, holex, springBase]) stud();
if (numStuds==3)
{
translate([0,-lensRadius/2-travel-holeDiameter, springBase]) stud();
translate([0,lensRadius/2+travel+holeDiameter, springBase]) stud();
}
}
module lensCapTop()
{
color([0,1,0]) frame();
}
module crossSection(){
difference(){
lensCap();
translate([0,0,-lensRadius])cube(2*lensRadius);
}
}
/*
mirror([0,0,1]) {
if (part==0)
{
translate([0,0,0]) lensCapTop();
translate([capDiameter/2+channelWidth/2+partSpacing,0,springBase]) lensCapBase1();
translate([0,capDiameter/2+channelWidth/2+partSpacing,0]) rotate([0,0,90]) lensCapBase2();
}
else if (part==4)
{
lensCapTop();
lensCapBase1();
lensCapBase2();
}
else if (part==1)
lensCapTop();
else if (part==2)
lensCapBase1();
else if (part==3)
lensCapBase2();
}
*/
mirror([0,0,1]) {
difference() {
translate([0,0,0]) color([0,0,0]) lensCapTop();
translate([-24,-4,topHeight+3]) feneas_text();
}
//translate([capDiameter/2+channelWidth/2+partSpacing,0,springBase]) lensCapBase1();
//translate([0,capDiameter/2+channelWidth/2+partSpacing,0]) rotate([0,0,90]) lensCapBase2();
}