init
This commit is contained in:
commit
4af1ff4cbf
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
*.stl
|
||||
*.gcode
|
||||
*.obj
|
1
3d/PLA_Temptower_200_-180.scad
Normal file
1
3d/PLA_Temptower_200_-180.scad
Normal file
|
@ -0,0 +1 @@
|
|||
import("C:/Users/orcan/Downloads/PLA Temptower 200-180 breaketest.stl");
|
425
3d/U_Box_V104_Test_Cleaned.scad
Normal file
425
3d/U_Box_V104_Test_Cleaned.scad
Normal file
|
@ -0,0 +1,425 @@
|
|||
|
||||
/*//////////////////////////////////////////////////////////////////
|
||||
- FB Aka Heartman/Hearty 2016 -
|
||||
- http://heartygfx.blogspot.com -
|
||||
- OpenScad Parametric Box -
|
||||
- CC BY-NC 3.0 License -
|
||||
////////////////////////////////////////////////////////////////////
|
||||
12/02/2016 - Fixed minor bug
|
||||
28/02/2016 - Added holes ventilation option
|
||||
09/03/2016 - Added PCB feet support, fixed the shell artefact on export mode.
|
||||
|
||||
*/////////////////////////// - Info - //////////////////////////////
|
||||
|
||||
// All coordinates are starting as integrated circuit pins.
|
||||
// From the top view :
|
||||
|
||||
// CoordD <--- CoordC
|
||||
// ^
|
||||
// ^
|
||||
// ^
|
||||
// CoordA ---> CoordB
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
////////// - Paramètres de la boite - Box parameters - /////////////
|
||||
|
||||
/* [Box dimensions] */
|
||||
// - Longueur - Length
|
||||
Length = 56+20;
|
||||
// - Largeur - Width
|
||||
Width = 65+20;
|
||||
// - Hauteur - Height
|
||||
Height = 30;
|
||||
// - Epaisseur - Wall thickness
|
||||
Thick = 2;//[2:5]
|
||||
|
||||
/* [Box options] */
|
||||
// - Diamètre Coin arrondi - Filet diameter
|
||||
Filet = 2;//[0.1:12]
|
||||
// - lissage de l'arrondi - Filet smoothness
|
||||
Resolution = 50;//[1:100]
|
||||
// - Tolérance - Tolerance (Panel/rails gap)
|
||||
m = 0.9;
|
||||
// Pieds PCB - PCB feet (x4)
|
||||
PCBFeet = 1;// [0:No, 1:Yes]
|
||||
// - Decorations to ventilation /music/Wintersun/music/Wintersunholes/music/Wintersun
|
||||
Vent = 0;// [0:No, 1:Yes]
|
||||
// - Decoration-Holes width (in mm)
|
||||
Vent_width = 1.5;
|
||||
|
||||
|
||||
|
||||
/* [PCB_Feet] */
|
||||
//All dimensions are from the center foot axis
|
||||
|
||||
// - Coin bas gauche - Low left corner X position
|
||||
PCBPosX = 0;
|
||||
// - Coin bas gauche - Low left corner Y position
|
||||
PCBPosY = 0;
|
||||
// - Longueur PCB - PCB Length
|
||||
PCBLength = 56;
|
||||
// - Largeur PCB - PCB Width
|
||||
PCBWidth = 65;
|
||||
// - Heuteur pied - Feet height
|
||||
FootHeight = 5;
|
||||
// - Diamètre pied - Foot diameter
|
||||
FootDia = 4;
|
||||
// - Diamètre trou - Hole diameter
|
||||
FootHole = 2.5;
|
||||
|
||||
|
||||
/* [STL element to export] */
|
||||
//Coque haut - Top shell
|
||||
TShell = 0;// [0:No, 1:Yes]
|
||||
//Coque bas- Bottom shell
|
||||
BShell = 1;// [0:No, 1:Yes]
|
||||
//Panneau avant - Front panel
|
||||
FPanL = 1;// [0:No, 1:Yes]
|
||||
//Panneau arrière - Back panel
|
||||
BPanL = 1;// [0:No, 1:Yes]
|
||||
|
||||
|
||||
|
||||
/* [Hidden] */
|
||||
// - Couleur coque - Shell color
|
||||
Couleur1 = "Orange";
|
||||
// - Couleur panneaux - Panels color
|
||||
Couleur2 = "OrangeRed";
|
||||
// Thick X 2 - making decorations thicker if it is a vent to make sure they go through shell
|
||||
Dec_Thick = Vent ? Thick*2 : Thick;
|
||||
// - Depth decoration
|
||||
Dec_size = Vent ? Thick*2 : 0.8;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/////////// - Boitier générique bord arrondis - Generic rounded box - //////////
|
||||
|
||||
module RoundBox($a=Length, $b=Width, $c=Height){// Cube bords arrondis
|
||||
$fn=Resolution;
|
||||
translate([0,Filet,Filet]){
|
||||
minkowski (){
|
||||
cube ([$a-(Length/2),$b-(2*Filet),$c-(2*Filet)], center = false);
|
||||
rotate([0,90,0]){
|
||||
cylinder(r=Filet,h=Length/2, center = false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}// End of RoundBox Module
|
||||
|
||||
|
||||
////////////////////////////////// - Module Coque/Shell - //////////////////////////////////
|
||||
|
||||
module Coque(){//Coque - Shell
|
||||
Thick = Thick*2;
|
||||
difference(){
|
||||
difference(){//sides decoration
|
||||
union(){
|
||||
difference() {//soustraction de la forme centrale - Substraction Fileted box
|
||||
|
||||
difference(){//soustraction cube median - Median cube slicer
|
||||
union() {//union
|
||||
difference(){//Coque
|
||||
RoundBox();
|
||||
translate([Thick/2,Thick/2,Thick/2]){
|
||||
RoundBox($a=Length-Thick, $b=Width-Thick, $c=Height-Thick);
|
||||
}
|
||||
}//Fin diff Coque
|
||||
difference(){//largeur Rails
|
||||
translate([Thick+m,Thick/2,Thick/2]){// Rails
|
||||
RoundBox($a=Length-((2*Thick)+(2*m)), $b=Width-Thick, $c=Height-(Thick*2));
|
||||
}//fin Rails
|
||||
translate([((Thick+m/2)*1.55),Thick/2,Thick/2+0.1]){ // +0.1 added to avoid the artefact
|
||||
RoundBox($a=Length-((Thick*3)+2*m), $b=Width-Thick, $c=Height-Thick);
|
||||
}
|
||||
}//Fin largeur Rails
|
||||
}//Fin union
|
||||
translate([-Thick,-Thick,Height/2]){// Cube à soustraire
|
||||
cube ([Length+100, Width+100, Height], center=false);
|
||||
}
|
||||
}//fin soustraction cube median - End Median cube slicer
|
||||
translate([-Thick/2,Thick,Thick]){// Forme de soustraction centrale
|
||||
RoundBox($a=Length+Thick, $b=Width-Thick*2, $c=Height-Thick);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
difference(){// wall fixation box legs
|
||||
union(){
|
||||
translate([3*Thick +5,Thick,Height/2]){
|
||||
rotate([90,0,0]){
|
||||
$fn=6;
|
||||
cylinder(d=16,Thick/2);
|
||||
}
|
||||
}
|
||||
|
||||
translate([Length-((3*Thick)+5),Thick,Height/2]){
|
||||
rotate([90,0,0]){
|
||||
$fn=6;
|
||||
cylinder(d=16,Thick/2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
translate([4,Thick+Filet,Height/2-57]){
|
||||
rotate([45,0,0]){
|
||||
cube([Length,40,40]);
|
||||
}
|
||||
}
|
||||
translate([0,-(Thick*1.46),Height/2]){
|
||||
cube([Length,Thick*2,10]);
|
||||
}
|
||||
} //Fin fixation box legs
|
||||
}
|
||||
|
||||
*union(){// outbox sides decorations
|
||||
|
||||
for(i=[0:Thick:Length/4]){
|
||||
|
||||
// Ventilation holes part code submitted by Ettie - Thanks ;)
|
||||
translate([10+i,-Dec_Thick+Dec_size,1]){
|
||||
cube([Vent_width,Dec_Thick,Height/4]);
|
||||
}
|
||||
translate([(Length-10) - i,-Dec_Thick+Dec_size,1]){
|
||||
cube([Vent_width,Dec_Thick,Height/4]);
|
||||
}
|
||||
translate([(Length-10) - i,Width-Dec_size,1]){
|
||||
cube([Vent_width,Dec_Thick,Height/4]);
|
||||
}
|
||||
translate([10+i,Width-Dec_size,1]){
|
||||
cube([Vent_width,Dec_Thick,Height/4]);
|
||||
}
|
||||
|
||||
|
||||
}// fin de for
|
||||
// }
|
||||
}//fin union decoration
|
||||
}//fin difference decoration
|
||||
|
||||
|
||||
union(){ //sides holes
|
||||
$fn=50;
|
||||
translate([3*Thick+5,20,Height/2+4]){
|
||||
rotate([90,0,0]){
|
||||
cylinder(d=2,20);
|
||||
}
|
||||
}
|
||||
translate([Length-((3*Thick)+5),20,Height/2+4]){
|
||||
rotate([90,0,0]){
|
||||
cylinder(d=2,20);
|
||||
}
|
||||
}
|
||||
translate([3*Thick+5,Width+5,Height/2-4]){
|
||||
rotate([90,0,0]){
|
||||
cylinder(d=2,20);
|
||||
}
|
||||
}
|
||||
translate([Length-((3*Thick)+5),Width+5,Height/2-4]){
|
||||
rotate([90,0,0]){
|
||||
cylinder(d=2,20);
|
||||
}
|
||||
}
|
||||
}//fin de sides holes
|
||||
|
||||
}//fin de difference holes
|
||||
}// fin coque
|
||||
|
||||
////////////////////////////// - Experiment - ///////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////// - Foot with base filet - /////////////////////////////
|
||||
module foot(FootDia,FootHole,FootHeight){
|
||||
Filet=2;
|
||||
color(Couleur1)
|
||||
translate([0,0,Filet-1.5])
|
||||
difference(){
|
||||
|
||||
difference(){
|
||||
//translate ([0,0,-Thick]){
|
||||
cylinder(d=FootDia+Filet,FootHeight-Thick, $fn=100);
|
||||
//}
|
||||
rotate_extrude($fn=100){
|
||||
translate([(FootDia+Filet*2)/2,Filet,0]){
|
||||
minkowski(){
|
||||
square(10);
|
||||
circle(Filet, $fn=100);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cylinder(d=FootHole,FootHeight+1, $fn=100);
|
||||
}
|
||||
}// Fin module foot
|
||||
|
||||
module Feet(){
|
||||
//////////////////// - PCB only visible in the preview mode - /////////////////////
|
||||
translate([3*Thick+2,Thick+5,FootHeight+(Thick/2)-0.5]){
|
||||
|
||||
%square ([PCBLength+10,PCBWidth+10]);
|
||||
translate([PCBLength/2,PCBWidth/2,0.5]){
|
||||
color("Olive")
|
||||
%text("PCB", halign="center", valign="center", font="Arial black");
|
||||
}
|
||||
} // Fin PCB
|
||||
|
||||
|
||||
////////////////////////////// - 4 Feet - //////////////////////////////////////////
|
||||
translate([3*Thick+7,Thick+10,Thick/2]){
|
||||
foot(FootDia,FootHole,FootHeight);
|
||||
}
|
||||
translate([(3*Thick)+PCBLength+7,Thick+10,Thick/2]){
|
||||
foot(FootDia,FootHole,FootHeight);
|
||||
}
|
||||
translate([(3*Thick)+PCBLength+7,(Thick)+PCBWidth+10,Thick/2]){
|
||||
foot(FootDia,FootHole,FootHeight);
|
||||
}
|
||||
translate([3*Thick+7,(Thick)+PCBWidth+10,Thick/2]){
|
||||
foot(FootDia,FootHole,FootHeight);
|
||||
}
|
||||
|
||||
} // Fin du module Feet
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
////////////////////// <- Holes Panel Manager -> ///////////////////////
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// <- Panel ->
|
||||
module Panel(Length,Width,Thick,Filet){
|
||||
scale([0.5,1,1])
|
||||
minkowski(){
|
||||
cube([Thick,Width-(Thick*2+Filet*2+m),Height-(Thick*2+Filet*2+m)]);
|
||||
translate([0,Filet,Filet])
|
||||
rotate([0,90,0])
|
||||
cylinder(r=Filet,h=Thick, $fn=100);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// <- Circle hole ->
|
||||
// Cx=Cylinder X position | Cy=Cylinder Y position | Cdia= Cylinder dia | Cheight=Cyl height
|
||||
module CylinderHole(OnOff,Cx,Cy,Cdia){
|
||||
if(OnOff==1)
|
||||
translate([Cx,Cy,-1])
|
||||
cylinder(d=Cdia,10, $fn=50);
|
||||
}
|
||||
// <- Square hole ->
|
||||
// Sx=Square X position | Sy=Square Y position | Sl= Square Length | Sw=Square Width | Filet = Round corner
|
||||
module SquareHole(OnOff,Sx,Sy,Sl,Sw,Filet){
|
||||
if(OnOff==1)
|
||||
minkowski(){
|
||||
translate([Sx+Filet/2,Sy+Filet/2,-1])
|
||||
cube([Sl-Filet,Sw-Filet,10]);
|
||||
cylinder(d=Filet,h=10, $fn=100);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// <- Linear text panel ->
|
||||
module LText(OnOff,Tx,Ty,Font,Size,Content){
|
||||
if(OnOff==1)
|
||||
translate([Tx,Ty,Thick+.5])
|
||||
linear_extrude(height = 0.5){
|
||||
text(Content, size=Size, font=Font);
|
||||
}
|
||||
}
|
||||
// <- Circular text panel->
|
||||
module CText(OnOff,Tx,Ty,Font,Size,TxtRadius,Angl,Turn,Content){
|
||||
if(OnOff==1) {
|
||||
Angle = -Angl / len(Content);
|
||||
translate([Tx,Ty,Thick+.5])
|
||||
for (i= [0:len(Content)-1] ){
|
||||
rotate([0,0,i*Angle+90+Turn])
|
||||
translate([0,TxtRadius,0]) {
|
||||
linear_extrude(height = 0.5){
|
||||
text(Content[i], font = Font, size = Size, valign ="baseline", halign ="center");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
////////////////////// <- New module Panel -> //////////////////////
|
||||
module FPanL(){
|
||||
difference(){
|
||||
color(Couleur2)
|
||||
Panel(Length,Width,Thick,Filet);
|
||||
|
||||
|
||||
*rotate([90,0,90]){
|
||||
color(Couleur2){
|
||||
// <- Cutting shapes from here ->
|
||||
SquareHole (1,20,20,15,10,1); //(On/Off, Xpos,Ypos,Length,Width,Filet)
|
||||
SquareHole (1,40,20,15,10,1);
|
||||
SquareHole (1,60,20,15,10,1);
|
||||
CylinderHole(1,27,40,8); //(On/Off, Xpos, Ypos, Diameter)
|
||||
CylinderHole(1,47,40,8);
|
||||
CylinderHole(1,67,40,8);
|
||||
SquareHole (1,20,50,80,30,3);
|
||||
CylinderHole(1,93,30,10);
|
||||
SquareHole (1,120,20,30,60,3);
|
||||
// <- To here ->
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*color(Couleur1){
|
||||
translate ([-.5,0,0])
|
||||
rotate([90,0,90]){
|
||||
// <- Adding text from here ->
|
||||
LText(1,20,83,"Arial Black",4,"Digital Screen");//(On/Off, Xpos, Ypos, "Font", Size, "Text")
|
||||
LText(1,120,83,"Arial Black",4,"Level");
|
||||
LText(1,20,11,"Arial Black",6," 1 2 3");
|
||||
CText(1,93,29,"Arial Black",4,10,180,0,"1 . 2 . 3 . 4 . 5 . 6");//(On/Off, Xpos, Ypos, "Font", Size, Diameter, Arc(Deg), Starting Angle(Deg),"Text")
|
||||
// <- To here ->
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////// <- Main part -> /////////////////////////
|
||||
|
||||
if(TShell==1)
|
||||
// Coque haut - Top Shell
|
||||
color( Couleur1,1){
|
||||
translate([0,Width,Height+0.2]){
|
||||
rotate([0,180,180]){
|
||||
Coque();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(BShell==1)
|
||||
// Coque bas - Bottom shell
|
||||
color(Couleur1){
|
||||
Coque();
|
||||
}
|
||||
|
||||
// Pied support PCB - PCB feet
|
||||
if (PCBFeet==1)
|
||||
// Feet
|
||||
translate([PCBPosX,PCBPosY,0]){
|
||||
Feet();
|
||||
}
|
||||
|
||||
// Panneau avant - Front panel <<<<<< Text and holes only on this one.
|
||||
//rotate([0,-90,-90])
|
||||
if(FPanL==1)
|
||||
translate([Length-(Thick*2+m/2),Thick+m/2,Thick+m/2])
|
||||
FPanL();
|
||||
|
||||
//Panneau arrière - Back panel
|
||||
if(BPanL==1)
|
||||
color(Couleur2)
|
||||
translate([Thick+m/2,Thick+m/2,Thick+m/2])
|
||||
Panel(Length,Width,Thick,Filet);
|
135
3d/mimix2s_cover.scad
Normal file
135
3d/mimix2s_cover.scad
Normal file
|
@ -0,0 +1,135 @@
|
|||
// Higher definition curves
|
||||
$fs = 1;
|
||||
|
||||
module roundedcube(size = [1, 1, 1], center = false, radius = 0.5, apply_to = "all") {
|
||||
// If single value, convert to [x, y, z] vector
|
||||
size = (size[0] == undef) ? [size, size, size] : size;
|
||||
|
||||
translate_min = radius;
|
||||
translate_xmax = size[0] - radius;
|
||||
translate_ymax = size[1] - radius;
|
||||
translate_zmax = size[2] - radius;
|
||||
|
||||
diameter = radius * 2;
|
||||
|
||||
module build_point(type = "sphere", rotate = [0, 0, 0]) {
|
||||
if (type == "sphere") {
|
||||
sphere(r = radius);
|
||||
} else if (type == "cylinder") {
|
||||
rotate(a = rotate)
|
||||
cylinder(h = diameter, r = radius, center = true);
|
||||
}
|
||||
}
|
||||
|
||||
obj_translate = (center == false) ?
|
||||
[0, 0, 0] : [
|
||||
-(size[0] / 2),
|
||||
-(size[1] / 2),
|
||||
-(size[2] / 2)
|
||||
];
|
||||
|
||||
translate(v = obj_translate) {
|
||||
hull() {
|
||||
for (translate_x = [translate_min, translate_xmax]) {
|
||||
x_at = (translate_x == translate_min) ? "min" : "max";
|
||||
for (translate_y = [translate_min, translate_ymax]) {
|
||||
y_at = (translate_y == translate_min) ? "min" : "max";
|
||||
for (translate_z = [translate_min, translate_zmax]) {
|
||||
z_at = (translate_z == translate_min) ? "min" : "max";
|
||||
|
||||
translate(v = [translate_x, translate_y, translate_z])
|
||||
if (
|
||||
(apply_to == "all") ||
|
||||
(apply_to == "xmin" && x_at == "min") || (apply_to == "xmax" && x_at == "max") ||
|
||||
(apply_to == "ymin" && y_at == "min") || (apply_to == "ymax" && y_at == "max") ||
|
||||
(apply_to == "zmin" && z_at == "min") || (apply_to == "zmax" && z_at == "max")
|
||||
) {
|
||||
build_point("sphere");
|
||||
} else {
|
||||
rotate =
|
||||
(apply_to == "xmin" || apply_to == "xmax" || apply_to == "x") ? [0, 90, 0] : (
|
||||
(apply_to == "ymin" || apply_to == "ymax" || apply_to == "y") ? [90, 90, 0] :
|
||||
[0, 0, 0]
|
||||
);
|
||||
build_point("cylinder", rotate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
mi = [151,75,8.25];
|
||||
inner = mi+[0.15,0.15,0.15];
|
||||
dicke = 1.5;
|
||||
outer = inner+2*[dicke,dicke,dicke];
|
||||
display = [147.95,67.85,1]+[0.15,0.15,0];
|
||||
|
||||
difference() {
|
||||
roundedcube(outer,true,4.5);
|
||||
roundedcube(inner,true,3.5);
|
||||
|
||||
// Gerippe
|
||||
union() {
|
||||
translate([3*146/8,68/4,0])
|
||||
roundedcube([64/2,64/2,outer[2]], true, 1.5, "z");
|
||||
translate([146/16,68/4,0])
|
||||
roundedcube([64/4,64/2,outer[2]], true, 1.5, "z");
|
||||
translate([146/16,-68/4,0])
|
||||
roundedcube([64/4,64/2,outer[2]], true, 1.5, "z");
|
||||
translate([3*146/16,3*68/8-1,0])
|
||||
roundedcube([64/4,64/4,outer[2]], true, 1.5, "z");
|
||||
translate([3*146/16,1-3*68/8,0])
|
||||
roundedcube([64/4,64/4,outer[2]], true, 1.5, "z");
|
||||
translate([3*146/16,3*68/8-1,0])
|
||||
roundedcube([64/4,64/4,outer[2]], true, 1.5, "z");
|
||||
translate([6*146/16,-68/8-1,0])
|
||||
roundedcube([64/2,64/4,outer[2]], true, 1.5, "z");
|
||||
translate([-146/8,68/4,0])
|
||||
roundedcube([64/2,64/2,outer[2]], true, 1.5, "z");
|
||||
translate([-146/8,-68/4,0])
|
||||
roundedcube([64/2,64/2,outer[2]], true, 1.5, "z");
|
||||
translate([-3*146/8,68/4,0])
|
||||
roundedcube([64/2,64/2,outer[2]], true, 1.5, "z");
|
||||
translate([-3*146/8,-68/4,0])
|
||||
roundedcube([64/2,64/2,outer[2]], true, 1.5, "z");
|
||||
}
|
||||
|
||||
// Display
|
||||
translate([0,0,inner[2]/2])
|
||||
roundedcube([inner[0]-3.5,67.85+0.15,outer[2]],true,inner[2]/2,"z");
|
||||
|
||||
// Kamera
|
||||
translate([inner[0]/2-20.5, -inner[1]/2+11.5, -inner[2]/2])
|
||||
roundedcube([25,11,10],true,5.5, "z");
|
||||
// Fingerprintreader
|
||||
echo(mi[0]/2-43.5);
|
||||
translate([31.5, 0, -outer[2]/2])
|
||||
cylinder(7, 7,false);
|
||||
|
||||
// Tasten
|
||||
translate([31.5,-inner[1]/2,0])
|
||||
roundedcube([38,10,3], true, 1.5, "y");
|
||||
|
||||
// USB
|
||||
translate([-inner[0]/2,0,0])
|
||||
roundedcube([10,13,7], true, 1.5, "x");
|
||||
|
||||
// Micro
|
||||
translate([-inner[0]/2,16.5,0])
|
||||
roundedcube([10,3,3], true, 1.5, "x");
|
||||
// Microarray
|
||||
translate([-inner[0]/2,-14,0])
|
||||
roundedcube([10,12,3], true, 1.5, "x");
|
||||
// Loch oben
|
||||
translate([inner[0]/2,19,0])
|
||||
roundedcube([10,3,3], true, 1.5, "x");
|
||||
|
||||
// Ausspahrung
|
||||
translate(inner*[[0, 0, 0],[0,0,0],[0,0,0.5]]) {
|
||||
roundedcube(inner*[[1.1,0,0],[0,0.8,0],[0,0,1]], true, inner[2]/2, "x");
|
||||
roundedcube(inner*[[0.9,0,0],[0,1.1,0],[0,0,1]], true, inner[2]/2, "y");
|
||||
}
|
||||
}
|
61
3d/roundedcube.scad
Normal file
61
3d/roundedcube.scad
Normal file
|
@ -0,0 +1,61 @@
|
|||
// Higher definition curves
|
||||
$fs = 0.01;
|
||||
|
||||
module roundedcube(size = [1, 1, 1], center = false, radius = 0.5, apply_to = "all") {
|
||||
// If single value, convert to [x, y, z] vector
|
||||
size = (size[0] == undef) ? [size, size, size] : size;
|
||||
|
||||
translate_min = radius;
|
||||
translate_xmax = size[0] - radius;
|
||||
translate_ymax = size[1] - radius;
|
||||
translate_zmax = size[2] - radius;
|
||||
|
||||
diameter = radius * 2;
|
||||
|
||||
module build_point(type = "sphere", rotate = [0, 0, 0]) {
|
||||
if (type == "sphere") {
|
||||
sphere(r = radius);
|
||||
} else if (type == "cylinder") {
|
||||
rotate(a = rotate)
|
||||
cylinder(h = diameter, r = radius, center = true);
|
||||
}
|
||||
}
|
||||
|
||||
obj_translate = (center == false) ?
|
||||
[0, 0, 0] : [
|
||||
-(size[0] / 2),
|
||||
-(size[1] / 2),
|
||||
-(size[2] / 2)
|
||||
];
|
||||
|
||||
translate(v = obj_translate) {
|
||||
hull() {
|
||||
for (translate_x = [translate_min, translate_xmax]) {
|
||||
x_at = (translate_x == translate_min) ? "min" : "max";
|
||||
for (translate_y = [translate_min, translate_ymax]) {
|
||||
y_at = (translate_y == translate_min) ? "min" : "max";
|
||||
for (translate_z = [translate_min, translate_zmax]) {
|
||||
z_at = (translate_z == translate_min) ? "min" : "max";
|
||||
|
||||
translate(v = [translate_x, translate_y, translate_z])
|
||||
if (
|
||||
(apply_to == "all") ||
|
||||
(apply_to == "xmin" && x_at == "min") || (apply_to == "xmax" && x_at == "max") ||
|
||||
(apply_to == "ymin" && y_at == "min") || (apply_to == "ymax" && y_at == "max") ||
|
||||
(apply_to == "zmin" && z_at == "min") || (apply_to == "zmax" && z_at == "max")
|
||||
) {
|
||||
build_point("sphere");
|
||||
} else {
|
||||
rotate =
|
||||
(apply_to == "xmin" || apply_to == "xmax" || apply_to == "x") ? [0, 90, 0] : (
|
||||
(apply_to == "ymin" || apply_to == "ymax" || apply_to == "y") ? [90, 90, 0] :
|
||||
[0, 0, 0]
|
||||
);
|
||||
build_point("cylinder", rotate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
288
display_halterung.scad
Normal file
288
display_halterung.scad
Normal file
|
@ -0,0 +1,288 @@
|
|||
include <BOSL/constants.scad>;
|
||||
use <BOSL/metric_screws.scad>;
|
||||
$fn=100;
|
||||
|
||||
pipe_diameter = 45.0;
|
||||
width = 15;
|
||||
thickness = 3.2;
|
||||
length = 100;
|
||||
pipenose_width = 10.0;
|
||||
pipenose_len = 8.0;
|
||||
device_position = 60;
|
||||
device_width = 36;
|
||||
device_screw_distance = 29;
|
||||
display_screw_diameter = 4.3;
|
||||
device_height = 9;
|
||||
device_depth = 3*thickness+display_screw_diameter;
|
||||
halterung_width = 47.1-4.3;
|
||||
halterung_screw_diameter = 5;
|
||||
halterung_screw_height_position = 14.5;
|
||||
|
||||
control_pipe_diameter = 18;
|
||||
control_pipe_length = 24;
|
||||
|
||||
gap = 0.8;
|
||||
mgap = 0.3;
|
||||
|
||||
screw_diameter = 6;
|
||||
|
||||
inner_diameter = pipe_diameter + 2*gap;
|
||||
outer_diameter = inner_diameter + 2*thickness;
|
||||
zwinge_unten_length = screw_diameter;
|
||||
zwinge_oben_length = width;
|
||||
|
||||
module schelle() {
|
||||
difference() {
|
||||
union() {
|
||||
// "Ring" (gefüllt)
|
||||
cylinder( h=width, d=outer_diameter, center=true);
|
||||
// Klemme unten
|
||||
*translate( [0, -inner_diameter/2-zwinge_unten_length/2, 0])
|
||||
//cube( [2*thickness+gap, zwinge_unten_length, width], center=true);
|
||||
rotate([90,0,90])
|
||||
linear_extrude( 2*thickness+gap, center=true)
|
||||
offset(5)
|
||||
square( [zwinge_unten_length, width-10], center=true);
|
||||
// Klemme oben
|
||||
translate( [0, inner_diameter/2+zwinge_oben_length/2-5, 0])
|
||||
//cube( [4*thickness+gap, zwinge_oben_length, width], center=true);
|
||||
rotate([90,0,90])
|
||||
linear_extrude( 4*thickness+gap, center=true)
|
||||
offset(5)
|
||||
square( [zwinge_oben_length, width-10], center=true);
|
||||
|
||||
// Aussparung Nase
|
||||
translate( [0, -thickness/2-inner_diameter/2, 0])
|
||||
linear_extrude( width, center=true)
|
||||
offset( thickness/2) {
|
||||
x = pipenose_len+thickness;
|
||||
polygon( [
|
||||
[-8-thickness/2, 2],
|
||||
[-5-thickness/2, 0],
|
||||
[ -thickness/2, -x],
|
||||
[ -thickness/2, -x-zwinge_unten_length],
|
||||
[ thickness/2, -x-zwinge_unten_length],
|
||||
[ thickness/2, -x],
|
||||
[ 5+thickness/2, 0],
|
||||
[ 8+thickness/2, 2],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// Ring übrig lassen
|
||||
cylinder( h=width+0.1, d=inner_diameter, center=true);
|
||||
|
||||
// gap zwischen der Klemmverschraubung
|
||||
x = outer_diameter+2*zwinge_unten_length+0.8;
|
||||
translate( [0, -x/2])
|
||||
cube( [gap, x, width+.1], center=true);
|
||||
// gap oben
|
||||
y = outer_diameter+2*zwinge_oben_length+0.8;
|
||||
translate( [0, y/2])
|
||||
cube( [gap+2*thickness, y, width+.1], center=true);
|
||||
|
||||
// Aussparung Nase
|
||||
translate( [0, -inner_diameter/2, 0])
|
||||
linear_extrude( width+0.1, center=true)
|
||||
polygon( [
|
||||
[-8, 2],
|
||||
[-5, -1],
|
||||
[-2, -pipenose_len],
|
||||
[ 0, -pipenose_len-mgap],
|
||||
[ 2, -pipenose_len],
|
||||
[ 5, -1],
|
||||
[ 8, 2],
|
||||
]);
|
||||
|
||||
// Schraubloch freihalten
|
||||
for( i = [1,0])
|
||||
mirror( [i,0,0])
|
||||
translate( [thickness, -outer_diameter/2-pipenose_len-thickness - 0.75*screw_diameter, -width/2-0.1])
|
||||
cube( [thickness, 1.5*screw_diameter, width+0.2]);
|
||||
// Schraubloch unten
|
||||
translate( [0, -outer_diameter/2-zwinge_unten_length/2-pipenose_len, 0])
|
||||
rotate( [0, 90, 0])
|
||||
cylinder( d=screw_diameter, h=10*thickness+gap+0.2, center=true);
|
||||
// Schraubloch oben
|
||||
translate( [0, inner_diameter/2+zwinge_oben_length-2*thickness, 0])
|
||||
rotate( [0, 90, 0])
|
||||
cylinder( d=screw_diameter, h=4*thickness+2*gap+0.2, center=true);
|
||||
}
|
||||
}
|
||||
|
||||
*intersection() {
|
||||
schelle();
|
||||
*translate( [outer_diameter/4+0.1, 0, -0.1])
|
||||
cube( [outer_diameter/2 + 0.2, outer_diameter+2*zwinge_unten_length+2*zwinge_oben_length, width+0.2], center=true);
|
||||
}
|
||||
|
||||
/*rotate([-5,0,0])*/ mirror([0,0,1])
|
||||
translate( [device_width+outer_diameter/2, -0.75*length/*outer_diameter/2+2*zwinge_oben_length*/, -width/2])
|
||||
difference() {
|
||||
union() {
|
||||
// Mittelholmen
|
||||
rotate( [90,0,90])
|
||||
linear_extrude( 2*thickness, center=true) {
|
||||
os = 3;
|
||||
w = width-os;
|
||||
l = length-os;
|
||||
n = os;
|
||||
offset(os)
|
||||
polygon( [
|
||||
//[-n, w],
|
||||
[-n+3, w],
|
||||
[-n, w-3],
|
||||
[-n, n],
|
||||
[ l-3, (n+w)/2],
|
||||
[ l-1, w],
|
||||
]);
|
||||
}
|
||||
|
||||
os = 10;
|
||||
// Auflageplatte
|
||||
*translate( [0, os, 0])
|
||||
linear_extrude(thickness)
|
||||
offset(-os) offset( 2*os)
|
||||
polygon( [
|
||||
[0, 0],
|
||||
[device_width/2, length-device_position-os],
|
||||
[0, length-device_position/2],
|
||||
[halterung_width/4-os, length-2*os],
|
||||
[-halterung_width/4+os, length-2*os],
|
||||
[0, length-device_position/2],
|
||||
[-device_width/2, length-device_position-os],
|
||||
]);
|
||||
|
||||
// neue Stützen
|
||||
translate( [0, length-device_position+thickness/2, -device_height-thickness]) {
|
||||
rotate( [10, 0, 0]) {
|
||||
difference() {
|
||||
union() {
|
||||
rotate( [90, 0, 0]) {
|
||||
linear_extrude( device_depth+2*display_screw_diameter, center=true) {
|
||||
t = thickness;
|
||||
h = device_height + width*0.9;
|
||||
w = device_width/2+os;
|
||||
polygon( [
|
||||
[ t, h],
|
||||
[ w, t],
|
||||
[ w, 0],
|
||||
[-w, 0],
|
||||
[-w, t],
|
||||
[-t, h]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
translate( [-(device_width-os+control_pipe_length)/2, 0/*-2*display_screw_diameter*/, device_height+2])
|
||||
rotate( [0, -90, 0])
|
||||
cylinder( d=control_pipe_diameter, h=control_pipe_length+device_width/2+os, center=true);
|
||||
}
|
||||
|
||||
for(i=[0,1])
|
||||
mirror([i,0,0]) {
|
||||
translate( [thickness, -display_screw_diameter, thickness])
|
||||
cube([device_width/2+os-thickness, 2*display_screw_diameter, device_height+width], center=false);
|
||||
|
||||
// Schraublöcher für Display
|
||||
translate( [device_width/2,0,0])
|
||||
rotate( [0, 180, 0])
|
||||
cylinder( d=display_screw_diameter, h=width, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Stützen zwischen Mittelholmen und Auflageplatte
|
||||
*for( i = [-display_screw_diameter, display_screw_diameter])
|
||||
translate( [0, length - device_position + thickness/2+i, 0])
|
||||
rotate( [90, 0, 0])
|
||||
linear_extrude( thickness) {
|
||||
t = thickness;
|
||||
h = (device_position/115)*(width-thickness)+thickness;
|
||||
w = device_width/2+0.68*os;
|
||||
polygon( [
|
||||
[ t, h],
|
||||
[ w, t-0.1],
|
||||
[-w, t-0.1],
|
||||
[-t, h]
|
||||
]);
|
||||
}
|
||||
|
||||
// Schraubplatte
|
||||
translate( [0, length, width]) {
|
||||
os = 5;
|
||||
w = halterung_width+thickness+screw_diameter/2;
|
||||
v = halterung_width-thickness-screw_diameter/2;
|
||||
h = halterung_screw_height_position-screw_diameter/2-os+thickness;
|
||||
g = h - halterung_screw_diameter;
|
||||
n = os;
|
||||
translate( [0, -2*thickness, -2*thickness])
|
||||
linear_extrude( 2*thickness)
|
||||
offset(-thickness)
|
||||
polygon( [
|
||||
[ 2*thickness, -v/2],
|
||||
[ 2*thickness, -v/2-thickness],
|
||||
[-2*thickness, -v/2-thickness],
|
||||
[-2*thickness, -v/2],
|
||||
[-0.5*v, -thickness],
|
||||
[-0.5*v-thickness, -thickness],
|
||||
[-0.5*v-thickness, thickness],
|
||||
[ 0.5*v+thickness, thickness],
|
||||
[ 0.5*v+thickness, -thickness],
|
||||
[ 0.5*v, -thickness]
|
||||
]);
|
||||
intersection() {
|
||||
c = w+2*os+0.2;
|
||||
translate( [-c/2+os, 0, -c+os])
|
||||
rotate( [90, 0, 0])
|
||||
linear_extrude( c)
|
||||
offset( os)
|
||||
square( [c-2*os, c-2*os]);
|
||||
rotate( [180, 80, -90])
|
||||
translate( [0,0,-2*thickness])
|
||||
linear_extrude( 2*thickness) {
|
||||
difference() {
|
||||
offset( -os)
|
||||
offset( 2*os)
|
||||
polygon( [
|
||||
[n , w/4], // unten rechts
|
||||
[g , w/2],
|
||||
[h , w/2], // oben rechts
|
||||
[h , v/2],
|
||||
[h/2, v/2],
|
||||
[h/2, -v/2],
|
||||
[h , -v/2],
|
||||
[h , -w/2],
|
||||
[g , -w/2],
|
||||
[n , -w/4]
|
||||
]);
|
||||
translate( [h-thickness, halterung_width/2])
|
||||
circle( d=halterung_screw_diameter);
|
||||
translate( [h-thickness, -halterung_width/2])
|
||||
circle( d=halterung_screw_diameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
translate( [0, length+0.25, pipe_diameter/2+width-4])
|
||||
rotate( [90, 0, 0])
|
||||
cylinder( r1=pipe_diameter/2, r2=pipe_diameter/2-4, h=4);
|
||||
|
||||
// Schraubloch vorne
|
||||
translate( [-width/2, 0, width/2])
|
||||
rotate( [0, 90, 0])
|
||||
cylinder( d=screw_diameter, h=width);
|
||||
|
||||
// Schraublöcher für Display
|
||||
*for( i=[1,-1])
|
||||
translate( [i*device_screws/2, length-device_position, width/2])
|
||||
rotate( [0, 180, 0])
|
||||
cylinder( d=display_screw_diameter, h=width);
|
||||
}
|
||||
|
||||
*translate([0, -2.5, 0])
|
||||
linear_extrude(1)
|
||||
square([5,5]);
|
93
frontlampe.scad
Normal file
93
frontlampe.scad
Normal file
|
@ -0,0 +1,93 @@
|
|||
include <3d/roundedcube.scad>;
|
||||
include <BOSL/constants.scad>;
|
||||
use <BOSL/metric_screws.scad>;
|
||||
|
||||
only = "outer";
|
||||
|
||||
function C(v1,v2) = [for(i=[0:len(v1)-1]) v1[i]*v2[i]];
|
||||
|
||||
function V(v) = [v.x, v.y, v.z, 1];
|
||||
function Vzero() = [0, 0, 0, 1];
|
||||
function V3d(v) = [v.x,v.y,v.z];
|
||||
function MIdent() = [
|
||||
[1,0,0,0],
|
||||
[0,1,0,0],
|
||||
[0,0,1,0],
|
||||
[0,0,0,1]];
|
||||
function MMove(d) = [
|
||||
[1,0,0,d.x],
|
||||
[0,1,0,d.y],
|
||||
[0,0,1,d.z],
|
||||
Vzero()];
|
||||
function MMoveX(x) = MMove([x,0,0]);
|
||||
function MMoveY(y) = MMove([0,y,0]);
|
||||
function MMoveZ(z) = MMove([0,0,z]);
|
||||
function MStretch(d) = [
|
||||
[d.x,0,0,0],
|
||||
[0,d.y,0,0],
|
||||
[0,0,d.z,0],
|
||||
Vzero()];
|
||||
function MStretchX(x) = MStretch([x,1,1]);
|
||||
function MStretchY(y) = MStretch([1,y,1]);
|
||||
function MStretchZ(z) = MStretch([1,1,z]);
|
||||
|
||||
innerdim = V([40, 30, 20]);
|
||||
thickness = 2;
|
||||
glass = 1;
|
||||
gap = 0.4;
|
||||
thickness_ = [thickness, thickness/2, thickness, 0];
|
||||
outerdim = innerdim+2*thickness_+[2*gap,2*gap,2*gap, 0];
|
||||
front = V([innerdim.x-thickness,0,innerdim.y-thickness]);
|
||||
|
||||
if(only!="inner") {
|
||||
rotate([only=="outer" ? -90 : 0,0,0]){
|
||||
union() {
|
||||
difference() {
|
||||
cube( V3d(outerdim), center=true);
|
||||
translate([0,-thickness,0])
|
||||
cube( V3d(MMoveY(2*thickness)*innerdim+[2*gap,2*gap,2*gap,1]), center=true);
|
||||
cube( V3d(MMove([-2*thickness+2*gap,4*thickness+2*gap,-2*thickness+2*gap])*innerdim), center=true);
|
||||
translate([0,-outerdim.y/2+thickness/2,-outerdim.z/2+0.5*thickness])
|
||||
cube([innerdim.x+2*gap,gap+1.1*thickness,1.1*thickness], center=true);
|
||||
translate( [0, 0, -innerdim.z/2-1])
|
||||
metric_nut(size=5, hole=false);
|
||||
screw(screwsize=5,screwlen=outerdim.z,headsize=5,headlen=0,countersunk=true);
|
||||
}
|
||||
color("blue")
|
||||
translate([0,outerdim.y/2-1.5-glass,outerdim.z/2-1.5*thickness])
|
||||
cube([innerdim.x,1,thickness], center=true);
|
||||
color("blue")
|
||||
translate([-innerdim.x/2,-outerdim.y/2+thickness+3.5,outerdim.z/2-2*thickness])
|
||||
difference() {
|
||||
cube([innerdim.x+2, 5, thickness]);
|
||||
translate([-0.5,1,0]) rotate([-60,0,0])
|
||||
cube([innerdim.x+1,5,5]);
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
if(only!="outer") {
|
||||
rotate([only=="inner" ? -90 : 0,0,0]){
|
||||
color("orange") difference() {
|
||||
union() {
|
||||
translate( [0, -innerdim.y/2, -0.5*thickness])
|
||||
cube( [innerdim.x, thickness, innerdim.z+thickness], center=true);
|
||||
translate( [0, -0.5*thickness, -innerdim.z/2+thickness/2])
|
||||
cube( [innerdim.x, innerdim.y, thickness], center=true);
|
||||
translate( [0, -outerdim.y/2+thickness+4, -outerdim.z/2+2.5*thickness])
|
||||
cube([innerdim.x,1,thickness], center=true);
|
||||
translate( [innerdim.x/2-thickness/2, -innerdim.y/2+thickness, innerdim.z/2-thickness/2])
|
||||
cube( [2,2,2], center=true);
|
||||
translate( [-innerdim.x/2+thickness/2, -innerdim.y/2+thickness, innerdim.z/2-thickness/2])
|
||||
cube( [2,2,2], center=true);
|
||||
translate( [innerdim.x/2-thickness/2, -innerdim.y/2+thickness, -innerdim.z/2+1.5*thickness])
|
||||
cube( [2,2,2], center=true);
|
||||
translate( [-innerdim.x/2+thickness/2, -innerdim.y/2+thickness, -innerdim.z/2+1.5*thickness])
|
||||
cube( [2,2,2], center=true);
|
||||
}
|
||||
translate( [0, 0, -innerdim.z/2-1])
|
||||
metric_nut(size=5, hole=false);
|
||||
}
|
||||
};
|
||||
};
|
165
frontlampe2.scad
Normal file
165
frontlampe2.scad
Normal file
|
@ -0,0 +1,165 @@
|
|||
use <BOSL/metric_screws.scad>;
|
||||
use <tht-leds/tht-leds.scad>;
|
||||
$fn=50;
|
||||
|
||||
gap = 0.24;
|
||||
screw_dia = 3;
|
||||
screw_gap = 0.6;
|
||||
screwhead_dia = 6;
|
||||
screwhead_hei = 3;
|
||||
screwhold_hei = 3.5;
|
||||
nutholder_dia = 5;
|
||||
nutholder_hei = 5;
|
||||
screwpos = 2;
|
||||
thickness = 1.2;
|
||||
sdiameter = 40;
|
||||
front = 4;
|
||||
devscrewhead_dia = 6;
|
||||
devscrew_dia = 4;
|
||||
|
||||
module threaded_insert( s = undef, d = undef, l = undef) {
|
||||
if( 3==s) threaded_insert( d = 4.6 , l = 4.6);
|
||||
else if( 4==s) threaded_insert( d = 6.3 , l = 6.35);
|
||||
else if( 5==s) threaded_insert( d = 7.1 , l = 9.5);
|
||||
else if( 6==s) threaded_insert( d = 8.7 , l = 12.7);
|
||||
else if( 8==s) threaded_insert( d = 10.24, l = 12.7);
|
||||
else {
|
||||
assert( is_undef(s), "Unknown size (expected 3 for M3, ...) or manual (d,l).");
|
||||
assert( is_num(d), "Diameter d (numeric) or size expected.");
|
||||
assert( is_num(l), "Length l (numeric) or size expected.");
|
||||
cylinder( d = d, h = l);
|
||||
}
|
||||
}
|
||||
|
||||
module ledz( d=5, h=5) {
|
||||
/*
|
||||
tht_led_5mm();
|
||||
translate([0,0,-screwhold_hei])
|
||||
cylinder( d=6, h=screwhold_hei);*/
|
||||
translate([0,0,-0.1])
|
||||
cylinder( d=d+gap, h=h+0.1);
|
||||
translate([0,0,-h])
|
||||
cylinder( d=d+gap+1, h=h);
|
||||
}
|
||||
|
||||
rotate( [0, 0, 180])
|
||||
translate( [0, 0, -2*thickness])
|
||||
difference() {
|
||||
union() {
|
||||
intersection() {
|
||||
cylinder( d=sdiameter, h=2*thickness);
|
||||
translate( [0,-sdiameter/2,0])
|
||||
cube( [sdiameter/2, sdiameter, 2*thickness]);
|
||||
}
|
||||
|
||||
translate( [0,0,-screwhold_hei])
|
||||
intersection() {
|
||||
cylinder( d=sdiameter, h=2*thickness+screwhold_hei);
|
||||
translate( [-thickness-gap,-sdiameter/2,0])
|
||||
cube( [sdiameter/2+thickness+gap, sdiameter, 2*thickness+screwhold_hei]);
|
||||
hull() {
|
||||
translate( [screwpos, 0, 0])
|
||||
cylinder( d=8, h=2*thickness+screwhold_hei);
|
||||
translate( [-thickness-gap, -8/2])
|
||||
cube( [2+gap, 8, 2*thickness+screwhold_hei]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Platz hinter den Leds müssen hinten frei bleiben
|
||||
|
||||
translate( [1, 0, 0])
|
||||
union() {
|
||||
for( i = [-14 : 7 : 14])
|
||||
if( 0 != i)
|
||||
translate( [3, i, 0]) {
|
||||
//tht_led_5mm();
|
||||
/*translate([0,0,-0.1])
|
||||
cylinder( d=5+gap, h=screwhold_hei+0.1);
|
||||
translate([0,0,-screwhold_hei])
|
||||
cylinder( d=6, h=screwhold_hei);*/
|
||||
ledz();
|
||||
}
|
||||
for( i = [-10.5 : 7 : 10.5])
|
||||
translate( [3+5.3, i, -1])
|
||||
ledz();
|
||||
for( i = [-6.5 : 6.5 : 6.5])
|
||||
translate( [3+5.3+5.3, i, -1])
|
||||
ledz();
|
||||
}
|
||||
|
||||
// screwhole
|
||||
mirror( [0, 0, 1])
|
||||
translate( [screwpos, 0, -2*thickness]) {
|
||||
translate( [0, 0, -0.1])
|
||||
cylinder( d=screw_dia+screw_gap, h=screwhold_hei+2*thickness+0.2);
|
||||
translate( [0, 0, -0.1])
|
||||
cylinder( d=screwhead_dia+screw_gap, h=screwhead_hei+0.1);
|
||||
}
|
||||
}
|
||||
|
||||
rotate( [0,-90,0])
|
||||
translate( [0, 0, 0]) {
|
||||
h = 2*thickness + screwhold_hei + front + gap;
|
||||
translate( [0, 0, -h+front+gap]) {
|
||||
difference() {
|
||||
translate( [0,0,-gap]) intersection() {
|
||||
d = sdiameter+2*gap+2*thickness;
|
||||
cylinder( d=d, h=h+gap);
|
||||
translate( [-gap-thickness,-d/2,0])
|
||||
cube( [d/2+gap+thickness, d, h+gap]);
|
||||
}
|
||||
translate( [0, 0, -0.1-gap])
|
||||
intersection() {
|
||||
d = sdiameter+2*gap;
|
||||
cylinder( d=d, h=h+gap+0.2);
|
||||
translate( [-gap,-d/2,0])
|
||||
cube( [d/2+gap, d, h+gap+0.2]);
|
||||
}
|
||||
d = thickness+gap;
|
||||
translate( [-d-0.1, -4-gap, -gap-0.1])
|
||||
cube( [d+0.2, 8+2*gap, h+gap+0.2]);
|
||||
|
||||
translate( [screwpos,0,0])
|
||||
mirror([0,0,1])
|
||||
threaded_insert(3);
|
||||
}
|
||||
|
||||
difference() {
|
||||
translate( [-gap-thickness, 0, -thickness])
|
||||
for( i = [0 : 1 : 90])
|
||||
rotate( [0,i,0])
|
||||
linear_extrude( 1)
|
||||
intersection() {
|
||||
d = sdiameter+2*gap+2*thickness;
|
||||
translate( [thickness+gap, 0])
|
||||
circle( d=d);
|
||||
translate( [0, -d/2])
|
||||
square( [d/2+gap+thickness, d]);
|
||||
}
|
||||
|
||||
translate( [0, 0, -10])
|
||||
rotate( [0, 90, 0]) {
|
||||
translate( [0,0,-thickness])
|
||||
cylinder( d=devscrew_dia, h = 3*thickness, center = true);
|
||||
linear_extrude( 30)
|
||||
hull() {
|
||||
circle( d = devscrewhead_dia);
|
||||
translate( [30,0])
|
||||
square( [1, devscrewhead_dia], center=true);
|
||||
}
|
||||
}
|
||||
translate( [screwpos,0,0])
|
||||
mirror([0,0,1])
|
||||
threaded_insert(3);
|
||||
}
|
||||
}
|
||||
|
||||
translate( [0, 0, -2*thickness - gap - screwhold_hei]) {
|
||||
translate( [sdiameter/2-0.8, -6, 0])
|
||||
cube( [1, 12, screwhold_hei]);
|
||||
for( i = [0, 1])
|
||||
mirror( [0, i, 0])
|
||||
translate( [-1, sdiameter/2 - 0.75, 0])
|
||||
cube( [8, 1, screwhold_hei]);
|
||||
}
|
||||
}
|
165
frontlampe3.scad
Normal file
165
frontlampe3.scad
Normal file
|
@ -0,0 +1,165 @@
|
|||
use <./threaded_insert.scad>;
|
||||
$fn=50;
|
||||
|
||||
gap = 0.24;
|
||||
mgap = 1.5*gap;
|
||||
length = 40;
|
||||
guard_diameter = 430;
|
||||
thickness = 1.2;
|
||||
sdiameter = 40;
|
||||
screw_dia = 3;
|
||||
screw_gap = 0.6;
|
||||
screwhead_dia = 6;
|
||||
screwhead_hei = 3;
|
||||
screwhold_hei = 3.5;
|
||||
nutholder_dia = 5;
|
||||
nutholder_hei = 5;
|
||||
screwpos = 4;
|
||||
front = 4;
|
||||
devscrewhead_dia = 6;
|
||||
devscrew_dia = 4;
|
||||
|
||||
function ease_in(v) = v^2;
|
||||
function ease_out(v) = 1 - v^2;
|
||||
function ease_inout(v) = (1-v^2)^4;
|
||||
|
||||
module rotate_in( rot, pos) {
|
||||
translate( -pos) rotate( rot) translate( pos) children();
|
||||
}
|
||||
|
||||
module ledz( d=5, h=5) {
|
||||
/*
|
||||
tht_led_5mm();
|
||||
translate([0,0,-screwhold_hei])
|
||||
cylinder( d=6, h=screwhold_hei);*/
|
||||
translate([0,0,-0.1])
|
||||
cylinder( d=d+gap, h=h+0.1);
|
||||
translate([0,0,-h])
|
||||
cylinder( d=d+gap+1, h=h);
|
||||
}
|
||||
|
||||
module half_cylinder( d, h, f=0, v=undef) {
|
||||
g = is_undef(v) ? f : v;
|
||||
hull() {
|
||||
intersection() {
|
||||
rotate( [0, 90, 0])
|
||||
cylinder( d=d, h=h);
|
||||
translate( [0, -d/2, g])
|
||||
cube( [h, d, 100*d]);
|
||||
}
|
||||
translate( [0, -d/2, g])
|
||||
cube( [h, d, 0.1]);
|
||||
}
|
||||
}
|
||||
|
||||
L = length; // Länge der Lampe (Nur gekrümmter Teil)
|
||||
W = sdiameter+2*thickness+2*mgap; // Breite der Lampe
|
||||
D = guard_diameter+mgap; // Schutzblechkreisdurchmesser
|
||||
U = PI*D; // Umfang Schutzblech
|
||||
S = 0.001;
|
||||
function x(i) = i * L;
|
||||
function y(i) = (1-i^2) * W * (1-i) + i * ((1-i)^2) * W;
|
||||
function z(i) = y(i) + i*W/8;
|
||||
function o(i) = i*180*L/U;
|
||||
|
||||
union() {
|
||||
l = front+screwhold_hei;
|
||||
difference() {
|
||||
//minkowski() {
|
||||
difference() {
|
||||
union() {
|
||||
resolution = 1/50;
|
||||
for( i = [0 : resolution : 1]) {
|
||||
hull() {
|
||||
rotate_in( [0, o(i), 0], [0, 0, D])
|
||||
half_cylinder( y(i), S, v=-thickness-2*mgap);
|
||||
rotate_in( [0, o(i+resolution), 0], [0, 0, D])
|
||||
half_cylinder( y(i+resolution), S, v=-thickness-2*mgap);
|
||||
}
|
||||
}
|
||||
translate( [-l, 0, 0])
|
||||
half_cylinder( W, l, v=-thickness-2*mgap);
|
||||
}
|
||||
|
||||
// Schraubloch
|
||||
translate( [9, 0, 0])
|
||||
cylinder( d = devscrewhead_dia, h = 30);
|
||||
}
|
||||
//cube(1);
|
||||
//}
|
||||
|
||||
translate( [-0.0001,0,screwpos])
|
||||
rotate( [0, 90, 0])
|
||||
threaded_insert( 3, gap=gap);
|
||||
|
||||
translate( [-l, 0, 0])
|
||||
translate( [-0.1,0])
|
||||
half_cylinder( sdiameter+2*mgap, l+0.2, v=-mgap);
|
||||
|
||||
// Schraubloch
|
||||
translate( [9, 0, 0]) {
|
||||
translate( [0,0,-3*thickness+0.1])
|
||||
cylinder( d = devscrew_dia, h = 3*thickness);
|
||||
cylinder( d = devscrewhead_dia, h = 30);
|
||||
}
|
||||
}
|
||||
|
||||
// Auflagestege
|
||||
*rotate( [0,-90,0]) {
|
||||
translate( [sdiameter/2-0.8, -6, 0])
|
||||
cube( [1, 12, screwhold_hei]);
|
||||
for( i = [0, 1])
|
||||
mirror( [0, i, 0])
|
||||
translate( [-1, sdiameter/2 - 0.75, 0])
|
||||
cube( [8, 1, screwhold_hei]);
|
||||
}
|
||||
}
|
||||
|
||||
rotate( [0, 90, 0]) mirror( [0,0,1]) translate( [5*thickness,0,front+screwhold_hei-2*thickness])
|
||||
//translate([-screwhold_hei,0,0]) rotate( [0,-90,0])
|
||||
difference() {
|
||||
union() {
|
||||
intersection() {
|
||||
cylinder( d=sdiameter, h=2*thickness);
|
||||
translate( [0,-sdiameter/2,0])
|
||||
cube( [sdiameter/2, sdiameter, 2*thickness]);
|
||||
}
|
||||
|
||||
translate( [0,0,-screwhold_hei])
|
||||
intersection() {
|
||||
cylinder( d=sdiameter, h=2*thickness+screwhold_hei);
|
||||
translate( [-thickness-gap,-sdiameter/2,0])
|
||||
cube( [sdiameter/2+thickness+gap, sdiameter, 2*thickness+screwhold_hei]);
|
||||
hull() {
|
||||
translate( [screwpos, 0, 0])
|
||||
cylinder( d=8, h=2*thickness+screwhold_hei);
|
||||
*translate( [-thickness-gap, -8/2])
|
||||
cube( [2+gap, 8, 2*thickness+screwhold_hei]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Platz hinter den Leds müssen hinten frei bleiben
|
||||
|
||||
translate( [1, 0, 0])
|
||||
union() {
|
||||
for( i = [-15, -8, 8, 15])
|
||||
if( 0 != i)
|
||||
translate( [3, i, 0])
|
||||
ledz();
|
||||
for( i = [-12, -4.5, 4.5, 12])
|
||||
translate( [3+5.3, i, 0])
|
||||
ledz();
|
||||
for( i = [-7.5, 0, 7.5])
|
||||
translate( [3+5.3+5.3, i, 0])
|
||||
ledz();
|
||||
}
|
||||
|
||||
// screwhole
|
||||
mirror( [0, 0, 1])
|
||||
translate( [screwpos, 0, -2*thickness]) {
|
||||
translate( [0, 0, -0.1])
|
||||
cylinder( d=screw_dia+screw_gap, h=screwhold_hei+2*thickness+0.2);
|
||||
translate( [0, 0, -0.1])
|
||||
cylinder( d=screwhead_dia+screw_gap, h=screwhead_hei+0.1);
|
||||
}
|
||||
}
|
55
guard.scad
Normal file
55
guard.scad
Normal file
|
@ -0,0 +1,55 @@
|
|||
include <BOSL/constants.scad>;
|
||||
use <BOSL/metric_screws.scad>;
|
||||
|
||||
inner_diameter = 410;
|
||||
inner_width = 40;
|
||||
thickness = 4;
|
||||
inner_curve_diameter = 60;
|
||||
|
||||
module wheel( diameter, width, curve_diameter) {
|
||||
intersection() {
|
||||
linear_extrude( width, center=true)
|
||||
circle( d=diameter);
|
||||
union() {
|
||||
linear_extrude( width, center=true)
|
||||
circle( d=diameter-curve_diameter);
|
||||
rotate_extrude( angle=360)
|
||||
translate( [(diameter-curve_diameter)/2, 0])
|
||||
circle( d=curve_diameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module base() {
|
||||
difference() {
|
||||
wheel( inner_diameter+2*thickness, inner_width+2*thickness, inner_curve_diameter+2*thickness);
|
||||
wheel( inner_diameter, inner_width, inner_curve_diameter);
|
||||
translate( [0, 0, inner_width/2])
|
||||
linear_extrude( inner_width, center=true)
|
||||
circle( d=inner_diameter-15);
|
||||
}
|
||||
|
||||
*rotate_extrude( angle=360)
|
||||
translate( [(diameter-curve_diameter)/2, 0])
|
||||
circle( d=curve_diameter);
|
||||
}
|
||||
|
||||
module form() {
|
||||
linear_extrude( inner_width+2*thickness+2, center=true)
|
||||
offset(50) offset(-100) offset(50)
|
||||
polygon([
|
||||
[inner_diameter/2+thickness+2, inner_diameter/2],
|
||||
[inner_diameter/4, inner_diameter*0.15],
|
||||
[-inner_diameter*0.13, inner_diameter*0.13],
|
||||
[-inner_diameter*0.1, -inner_diameter*0.4*sin(45)],
|
||||
[-inner_diameter*0.45*sin(45), -inner_diameter*0.45*sin(45)],
|
||||
[-inner_diameter, -inner_diameter],
|
||||
[-inner_diameter, inner_diameter]
|
||||
]);
|
||||
}
|
||||
|
||||
scale([1,1,1])
|
||||
intersection() {
|
||||
base();
|
||||
form();
|
||||
}
|
175
moto_m2_mount.scad
Normal file
175
moto_m2_mount.scad
Normal file
|
@ -0,0 +1,175 @@
|
|||
include <round_anything/polyround.scad>;
|
||||
//include <catchnhole/catchnhole.scad>;
|
||||
include <BOLTS/BOLTS.scad>;
|
||||
//import( "motu.m2.desk.stl");
|
||||
$fn=100;
|
||||
|
||||
dim = [190.5, 44, 108];
|
||||
border_radius = 9;
|
||||
gap = 0.6;
|
||||
thickness = 4;
|
||||
thinnness = 4;//0.8;
|
||||
top_thickness = 5;
|
||||
bottom_opening_width = 153;
|
||||
//top_opening_width = 130;
|
||||
limiter = 3;
|
||||
limiter_thickness = 1.2;
|
||||
screw_diameter = 4;
|
||||
screwhead_diameter = 6;
|
||||
|
||||
//cube([220, 27.5*2],center=true);
|
||||
//cube([190.5,45, 108], center=true);
|
||||
|
||||
module screwhole( d, l, cut=0, cutlen=undef, headlen=0) {
|
||||
cutlen = is_undef(cutlen) ? (cut-d)/2 : cutlen;
|
||||
cylinder( d=d, h=l, center=true);
|
||||
c = (cut-d-headlen)/2;
|
||||
translate( [0, 0, (l - cutlen - headlen)/2])
|
||||
cylinder( d1=d, d2=cut, h=cutlen, center=true);
|
||||
translate( [0, 0, (l - headlen)/2])
|
||||
cylinder( d=cut, h=headlen, center=true);
|
||||
}
|
||||
|
||||
module rounded_square( dim, radius) {
|
||||
br = radius;
|
||||
d = [dim.x - 2*br, dim.y - 2*br];
|
||||
offset( br)
|
||||
square( [d.x, d.y], center=true);
|
||||
}
|
||||
|
||||
module rounded_frame( outer, radius, thickness) {
|
||||
difference() {
|
||||
rounded_square( outer, radius);
|
||||
rounded_square( [outer.x - 2*thickness, outer.y - 2*thickness], radius - thickness);
|
||||
}
|
||||
}
|
||||
|
||||
*color("blue")
|
||||
linear_extrude( dim.z, center=true)
|
||||
rounded_square( dim, border_radius);
|
||||
|
||||
inner = [dim.x + 2*gap, dim.y + 2*gap, dim.z];
|
||||
outer = [inner.x + 2*thickness, inner.y + 2*thickness, inner.z + limiter_thickness];
|
||||
|
||||
difference() {
|
||||
// middle closing
|
||||
translate( [0, 0, -limiter_thickness/2]) {
|
||||
linear_extrude( outer.z - 4*thickness - 2*screw_diameter, center=true) {
|
||||
offset( thickness/2 - 0.1)
|
||||
offset( -thickness/2 + 0.1)
|
||||
difference() {
|
||||
rounded_frame( [inner.x + 2*thinnness, inner.y + 2*thinnness],
|
||||
border_radius + gap + thinnness, thinnness);
|
||||
translate( [0,-2*thickness])
|
||||
square( [bottom_opening_width, inner.y + 2*thickness], center=true);
|
||||
square( [bottom_opening_width - screw_diameter - 3*thickness/*inner.x-2*border_radius-thickness*/, inner.y + 2*thickness], center=true);
|
||||
//square( [outer.x+2*thickness, inner.y-2*border_radius-thickness], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Top Opening
|
||||
w = bottom_opening_width/2 - screw_diameter/2 - 1.5*thickness;
|
||||
u = inner.x/2 - border_radius;
|
||||
h = inner.z/2 - 2*thickness - screw_diameter;
|
||||
g = h - u + w;
|
||||
d = inner.y/2 - border_radius/2;
|
||||
t = thickness;
|
||||
rotate( [90, 0, 0])
|
||||
linear_extrude( outer.y+0.1, center=true)
|
||||
polygon( [
|
||||
[ w, h],
|
||||
[-w, h],
|
||||
[-u, g],
|
||||
[-u, -g],
|
||||
[-w, -h],
|
||||
[ w, -h],
|
||||
[ u, -g],
|
||||
[ u, g]
|
||||
]);
|
||||
translate( [0, -outer.y/2, 0])
|
||||
rotate( [90, 0, 0])
|
||||
linear_extrude( outer.y + 0.1, center=true)
|
||||
polygon( [
|
||||
[ w, h + 2*t],
|
||||
[-w, h + 2*t],
|
||||
[-u, g + 2*t],
|
||||
[-u, -g - 2*t],
|
||||
[-w, -h - 2*t],
|
||||
[ w, -h - 2*t],
|
||||
[ u, -g - 2*t],
|
||||
[ u, g + 2*t]
|
||||
]);
|
||||
rotate( [0, 90, 0])
|
||||
linear_extrude( outer.x + 0.1, center=true)
|
||||
polygon( [
|
||||
[ g+t, d],
|
||||
[ h+t, 0],
|
||||
[ g+t, -d],
|
||||
[-g-t, -d],
|
||||
[-h-t, 0],
|
||||
[-g-t, d]
|
||||
]);
|
||||
}
|
||||
|
||||
{
|
||||
t = 2*thickness + screw_diameter;
|
||||
// Back closing with screw holes
|
||||
translate( [0, 0, outer.z/2 - t/2 - limiter_thickness/2])
|
||||
difference() {
|
||||
linear_extrude( t, center=true) {
|
||||
offset( thickness/2 - 0.1)
|
||||
offset( -thickness/2 + 0.1)
|
||||
difference() {
|
||||
rounded_frame( [outer.x, outer.y], border_radius + gap + thickness, thickness);
|
||||
translate( [0, -2*thickness])
|
||||
square( [bottom_opening_width, inner.y], center=true);
|
||||
square( [bottom_opening_width - screw_diameter - 4*thickness, inner.y + 2*thickness], center=true);
|
||||
}
|
||||
}
|
||||
for( i = [0, 1])
|
||||
mirror( [i, 0, 0])
|
||||
translate( [
|
||||
bottom_opening_width/2 - screw_diameter/2,
|
||||
outer.y/2 - thickness/2,
|
||||
-thickness/2 + screw_diameter/2
|
||||
])
|
||||
rotate( [90, 0, 0])
|
||||
screwhole( screw_diameter, thickness + 0.01, screw_diameter + 2, cutlen=1, headlen=1);
|
||||
}
|
||||
}
|
||||
|
||||
// limiter
|
||||
translate( [0, 0, -outer.z/2]) {
|
||||
linear_extrude( limiter_thickness, center=true) {
|
||||
offset( thickness/2 - 0.1)
|
||||
offset( -thickness/2 + 0.1)
|
||||
difference()
|
||||
rounded_frame( [outer.x, outer.y], border_radius+gap+thickness, gap+thickness+limiter);
|
||||
}
|
||||
t = 2*thickness + screw_diameter;
|
||||
translate( [0, 0, t/2])
|
||||
difference() {
|
||||
union() {
|
||||
linear_extrude( t, center=true) {
|
||||
offset( thickness/2 - 0.1) offset( -thickness/2 + 0.1) difference() {
|
||||
rounded_frame( [outer.x, outer.y], border_radius + gap + thickness, thickness);
|
||||
translate( [0, -2*thickness])
|
||||
square( [bottom_opening_width, inner.y], center=true);
|
||||
square( [bottom_opening_width - screw_diameter - 3*thickness, inner.y + 2*thickness], center=true);
|
||||
}
|
||||
}
|
||||
translate( [0, 0, 1.5*thickness-t/2])
|
||||
linear_extrude( 3*thickness, center=true) {
|
||||
offset( thickness/2 - 0.1) offset( -thickness/2 + 0.1)
|
||||
rounded_frame( [outer.x, outer.y], border_radius + gap + thickness, thickness);
|
||||
}
|
||||
}
|
||||
for(i=[0,1])
|
||||
mirror([i,0,0])
|
||||
translate( [bottom_opening_width/2 - screw_diameter/2, outer.y/2-thickness/2, thickness/2 - screw_diameter/2 + thickness/2])
|
||||
rotate( [90, 0, 0])
|
||||
screwhole( screw_diameter, thickness + 0.01, screw_diameter + 2, cutlen=1, headlen=1);
|
||||
|
||||
}
|
||||
}
|
61
roundedcube.scad
Normal file
61
roundedcube.scad
Normal file
|
@ -0,0 +1,61 @@
|
|||
// Higher definition curves
|
||||
$fs = 0.01;
|
||||
|
||||
module roundedcube(size = [1, 1, 1], center = false, radius = 0.5, apply_to = "all") {
|
||||
// If single value, convert to [x, y, z] vector
|
||||
size = (size[0] == undef) ? [size, size, size] : size;
|
||||
|
||||
translate_min = radius;
|
||||
translate_xmax = size[0] - radius;
|
||||
translate_ymax = size[1] - radius;
|
||||
translate_zmax = size[2] - radius;
|
||||
|
||||
diameter = radius * 2;
|
||||
|
||||
module build_point(type = "sphere", rotate = [0, 0, 0]) {
|
||||
if (type == "sphere") {
|
||||
sphere(r = radius);
|
||||
} else if (type == "cylinder") {
|
||||
rotate(a = rotate)
|
||||
cylinder(h = diameter, r = radius, center = true);
|
||||
}
|
||||
}
|
||||
|
||||
obj_translate = (center == false) ?
|
||||
[0, 0, 0] : [
|
||||
-(size[0] / 2),
|
||||
-(size[1] / 2),
|
||||
-(size[2] / 2)
|
||||
];
|
||||
|
||||
translate(v = obj_translate) {
|
||||
hull() {
|
||||
for (translate_x = [translate_min, translate_xmax]) {
|
||||
x_at = (translate_x == translate_min) ? "min" : "max";
|
||||
for (translate_y = [translate_min, translate_ymax]) {
|
||||
y_at = (translate_y == translate_min) ? "min" : "max";
|
||||
for (translate_z = [translate_min, translate_zmax]) {
|
||||
z_at = (translate_z == translate_min) ? "min" : "max";
|
||||
|
||||
translate(v = [translate_x, translate_y, translate_z])
|
||||
if (
|
||||
(apply_to == "all") ||
|
||||
(apply_to == "xmin" && x_at == "min") || (apply_to == "xmax" && x_at == "max") ||
|
||||
(apply_to == "ymin" && y_at == "min") || (apply_to == "ymax" && y_at == "max") ||
|
||||
(apply_to == "zmin" && z_at == "min") || (apply_to == "zmax" && z_at == "max")
|
||||
) {
|
||||
build_point("sphere");
|
||||
} else {
|
||||
rotate =
|
||||
(apply_to == "xmin" || apply_to == "xmax" || apply_to == "x") ? [0, 90, 0] : (
|
||||
(apply_to == "ymin" || apply_to == "ymax" || apply_to == "y") ? [90, 90, 0] :
|
||||
[0, 0, 0]
|
||||
);
|
||||
build_point("cylinder", rotate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
247
rueckstrahler.scad
Normal file
247
rueckstrahler.scad
Normal file
|
@ -0,0 +1,247 @@
|
|||
include <BOSL/constants.scad>;
|
||||
use <BOSL/metric_screws.scad>;
|
||||
$fn=100;
|
||||
|
||||
// pcb-related sizes:
|
||||
inner_height = 11.5;
|
||||
inner_width = 50;
|
||||
inner_depth = 12;
|
||||
// inner body size:
|
||||
inner_length = inner_height/2+inner_depth;
|
||||
|
||||
guard_width = 57.8;
|
||||
|
||||
thickness = 1;
|
||||
gap = 0.4;
|
||||
glass = 0.3;
|
||||
|
||||
module sideshape( l, w) {
|
||||
l2 = l-w/2;
|
||||
intersection() {
|
||||
translate( [0, l2/2+w/4, 0])
|
||||
square( [w, l2+w/2], center=true);
|
||||
union() {
|
||||
translate( [0, l2/2, 0])
|
||||
square( [w, l2], center=true);
|
||||
translate( [0, l2, 0])
|
||||
circle( d=w);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module shape( width, depth, height, r = 0.5) {
|
||||
linear_extrude( width, center=true)
|
||||
offset(r) offset(-r)
|
||||
sideshape( depth, height);
|
||||
}
|
||||
|
||||
module auflage(x,y,h){
|
||||
a = x/2;
|
||||
b = y/2;
|
||||
translate( [0,-h,0])
|
||||
rotate( [180,0,0])
|
||||
difference() {
|
||||
translate( [0, h/2, 0]) cube( [x,h,y], center=true);
|
||||
translate( [-a,h , 1]) rotate( [ 45, 0, 0])
|
||||
cube( [x, x+y+h, y]);
|
||||
translate( [1, h ,-b]) rotate( [ 0, 0,-45])
|
||||
cube( [x, x+y+h, y]);
|
||||
translate( [-a,h ,-1]) rotate( [-45, 0, 0]) translate( [0,0,-y])
|
||||
cube( [x, x+y+h, y]);
|
||||
translate( [-1,h ,-b]) rotate( [ 0, 0, 45]) translate( [-x,0,0])
|
||||
cube( [x, x+y+h, y]);
|
||||
};
|
||||
translate( [0, -h-0.01, 0]) cube([x,0.03,y], center=true);
|
||||
}
|
||||
|
||||
module erker( depth, width) {
|
||||
l = depth/(1-sin(45));
|
||||
x = l*sin(45);
|
||||
rotate([90,0,90])
|
||||
linear_extrude(width,center=true)
|
||||
intersection() {
|
||||
//offset(0.5) offset(-0.5)
|
||||
union() {
|
||||
// gerundete abschrägung
|
||||
intersection() {
|
||||
// kreis, wovon ein teil als rundung für die abschrägung verwendet wird
|
||||
translate( [0, -l+depth, 0])
|
||||
circle( l);
|
||||
// ausschnitt des kreises
|
||||
translate( [-x, 0, 0])
|
||||
square( x);
|
||||
}
|
||||
*translate( [-x-2,-2,0])
|
||||
scale( [x+2,2])
|
||||
square(1);
|
||||
}
|
||||
translate( [-x, -0.2, 0])
|
||||
square( x);
|
||||
}
|
||||
}
|
||||
|
||||
module inner( height, width, depth, r, wire_diameter=1,thread_dim=[0.7,10]) {
|
||||
thread_diameter = thread_dim.x;
|
||||
thread_depth = thread_dim.y;
|
||||
length = depth + height/2+2*gap;
|
||||
thicky = 3*thickness;
|
||||
difference() {
|
||||
union() {
|
||||
linear_extrude( width, center=true)
|
||||
offset(-r) offset(r)
|
||||
sideshape( length, height+2*(gap+thickness));
|
||||
translate([0,2*thickness+thicky,0])
|
||||
linear_extrude( width-thicky, center=true)
|
||||
sideshape( length-thicky, height+8*thickness-gap);
|
||||
|
||||
// Nase vorne für Schraubloch
|
||||
intersection() {
|
||||
translate([0,length-3.6*length,0])
|
||||
rotate([45+45/2,0,0])
|
||||
rotate([0,90,0])
|
||||
rotate_extrude(angle=45)
|
||||
translate([thread_diameter*2+3*length,0,0])
|
||||
circle(d=height+8*thickness-gap);
|
||||
linear_extrude(width-thicky, center=true)
|
||||
translate([-(width-thicky)/2,2*thickness+thicky,0])
|
||||
square(width-thicky);
|
||||
}
|
||||
}
|
||||
|
||||
// Raum für Platine+LEDs
|
||||
linear_extrude( width+0.1, center=true)
|
||||
offset(-r) offset(r)
|
||||
translate( [0, depth/2, 0])
|
||||
scale( [height, depth+0.1, 0])
|
||||
square( 1, center=true);
|
||||
|
||||
translate([0,thicky,0]) {
|
||||
// Schutzblechabdruck
|
||||
translate([(height+guard_width)/2+1.5,depth+height/2,0])
|
||||
rotate([0,90,100])
|
||||
linear_extrude(height*2, center=true)
|
||||
circle(d=guard_width);
|
||||
// Schraubloch
|
||||
translate([height/2+thicky/2+gap,(length+depth)/2,0])
|
||||
rotate([0,-90,10])
|
||||
linear_extrude(thread_depth+gap)
|
||||
circle(d=thread_diameter);
|
||||
}
|
||||
|
||||
// Kabelführungslöcher
|
||||
scale([-1,1,1]) {
|
||||
translate([(height-0.1)/2,depth/2,wire_diameter*0.475])
|
||||
rotate([0,90,0])
|
||||
linear_extrude(thicky+2*gap+0.2)
|
||||
circle(d=wire_diameter);
|
||||
translate([(height-0.1)/2,depth/2,-wire_diameter*0.475])
|
||||
rotate([0,90,0])
|
||||
linear_extrude(thicky+2*gap+0.2)
|
||||
circle(d=wire_diameter);
|
||||
}
|
||||
// Wasserauslassöffnung
|
||||
union() {
|
||||
translate([(height-0.1)/2,depth/2,width/4])
|
||||
rotate([0,90,0])
|
||||
linear_extrude(thicky+2*gap+0.2)
|
||||
circle(d=wire_diameter);
|
||||
translate([(height-0.1)/2,depth/2,-width/4])
|
||||
rotate([0,90,0])
|
||||
linear_extrude(thicky+2*gap+0.2)
|
||||
circle(d=wire_diameter);
|
||||
}
|
||||
}
|
||||
|
||||
/* // Da Lötzinn über die gesamte Fläche verteilt vorhanden ist, kann dieses auch zum Abstandhalten verwendet werden.
|
||||
h = 2;
|
||||
f = 4;
|
||||
translate([(height-h)/2, depth+1, width/2-f*2/3])
|
||||
auflage(f,f,1);
|
||||
translate([-(height-h)/2, depth+1, width/2-f*2/3])
|
||||
auflage(f,f,1);
|
||||
translate([(height-h)/2, depth+1, -width/2+f*2/3])
|
||||
auflage(f,f,1);
|
||||
translate([-(height-h)/2, depth+1, -width/2+f*2/3])
|
||||
auflage(f,f,1);*/
|
||||
}
|
||||
|
||||
module fensterausschnitt( width, height, diag_overlap) {
|
||||
g = 2*thickness;
|
||||
w = width-gap;
|
||||
h = height-g;
|
||||
d = diag_overlap;
|
||||
rotate([0,90,90])
|
||||
translate([-w/2,-h/2,thickness/2-0.1])
|
||||
linear_extrude(thickness+0.3, center=true)
|
||||
offset(2.5) offset(-2.5) polygon([
|
||||
[0 , d], [ d,0 ],
|
||||
[w-d,0 ], [w , d],
|
||||
[w ,h-d], [w-d,h ],
|
||||
[ d,h ], [0 ,h-d],
|
||||
]);
|
||||
}
|
||||
|
||||
module roundedside( height, width, depth, r) {
|
||||
gaps = 2*gap;
|
||||
extra = 2*(gap+thickness);
|
||||
length = depth + height/2;
|
||||
h = height+extra;
|
||||
l = length+gaps;
|
||||
w = width+extra;
|
||||
d = depth+extra;
|
||||
hull() {
|
||||
*translate([0,r,0])
|
||||
rotate([0,90,0])
|
||||
linear_extrude( h-1, center=true) circle(r);
|
||||
*translate([h/2-r, height/2-thickness/4-gap+r, 0])
|
||||
rotate([0,90,90])
|
||||
linear_extrude( d-thickness/2-2*r+gap, center=true) circle(r);
|
||||
*translate([-h/2+r, height/2-thickness/4-gap+r, 0])
|
||||
rotate([0,90,90])
|
||||
linear_extrude( d-thickness/2-2*r+gap, center=true) circle(r);
|
||||
translate([0,depth+gap+glass+thickness,0])
|
||||
rotate_extrude(angle=180) translate([(h-2*r)/2,0,0]) circle(r);
|
||||
translate([h/2-r,r,0]) sphere(r);
|
||||
translate([-h/2+r,r,0]) sphere(r);
|
||||
}
|
||||
}
|
||||
|
||||
module outer( height, width, depth, r) {
|
||||
gaps = 2*gap;
|
||||
extra = 2*(gap+2*thickness);
|
||||
length = depth + height/2+gaps + glass;
|
||||
h = height+extra;
|
||||
l = length+gaps;
|
||||
w = width+extra;
|
||||
d = depth+extra;
|
||||
difference() {
|
||||
shape( w, l, h);
|
||||
|
||||
// Innere Form, in die das innere Teil reinpasst
|
||||
translate([0,thickness,0])
|
||||
shape( width+gaps, length-2*thickness, height+gaps, 0);
|
||||
|
||||
// Ausschnitt, in den der innere Teil durch eingelegt werden kann
|
||||
translate([0,length/2+extra+2,0])
|
||||
cube( [h+0.2, length+gaps, width-gaps-2*thickness], center=true);
|
||||
|
||||
fensterausschnitt( width, height-gaps, 1);
|
||||
}
|
||||
|
||||
/*s = 2;
|
||||
v = 1;
|
||||
for( i = [0, 180]) rotate([0, i, 0]) {
|
||||
translate([ height/2-s/2-gap-thickness, depth+thickness+gap+glass-2, -width/2]) erker( 1, 1);
|
||||
translate([ -height/2+s/2+gap+thickness, depth+thickness+gap+glass-2, -width/2]) erker( 1, 1);
|
||||
}*/
|
||||
|
||||
*for( i = [w/2, -w/2])
|
||||
translate([ 0, 0, i])
|
||||
roundedside(height, width, depth, r);
|
||||
}
|
||||
|
||||
color("blue") translate([ 0, gap+thickness+glass, 0])
|
||||
inner( inner_height, inner_width, inner_depth, 0.5, wire_diameter=1.15, thread_dim=[4,6]);
|
||||
*color( "green")
|
||||
//rotate([90,0,90])
|
||||
outer( inner_height+2*(thickness+gap), inner_width+2*gap, inner_depth+2*gap, 0.5);
|
171
rueckstrahler2.scad
Normal file
171
rueckstrahler2.scad
Normal file
|
@ -0,0 +1,171 @@
|
|||
include <BOSL/constants.scad>;
|
||||
use <BOSL/metric_screws.scad>;
|
||||
$fn=100;
|
||||
|
||||
guard_width = 57.8;
|
||||
|
||||
thickness = 1.6;
|
||||
gap = 0.24;
|
||||
glass = 0.3;
|
||||
|
||||
// pcb-related sizes:
|
||||
inner = [
|
||||
12, // height
|
||||
12.4, // depth
|
||||
50 // width
|
||||
];
|
||||
thread = [
|
||||
3.8, // diameter
|
||||
18 // depth
|
||||
];
|
||||
nose = [
|
||||
4.2, // height
|
||||
3.6, // length
|
||||
1.6, // width
|
||||
];
|
||||
|
||||
function length(dim, thread, thickness) =
|
||||
dim.y + 2*thickness + 1.6*thread.x;
|
||||
|
||||
module form( dim, thread, thickness) {
|
||||
length = length(dim, thread, thickness);
|
||||
d = dim.y+2*thickness;
|
||||
w = dim.z+2*thickness;
|
||||
m = w/2;
|
||||
l = length+3*thickness;
|
||||
t = 3*thread.x;
|
||||
difference() {
|
||||
// Gehäuseform außen
|
||||
intersection() {
|
||||
/*union() {
|
||||
translate( [0, -3.25*length, 0])
|
||||
rotate( [90,45,90])
|
||||
rotate_extrude( angle = 90) {
|
||||
translate( [4*length + 2*thickness, 0, 0]) {
|
||||
//circle( d = dim.x + 4*thickness - gap);
|
||||
translate( [-(dim.x + 4*thickness - gap)/2,0,0])
|
||||
square( dim.x + 4*thickness - gap, center=true);
|
||||
}
|
||||
}
|
||||
translate([0,dim.y/2+thickness,0])
|
||||
linear_extrude(dim.z+2*thickness, center=true)
|
||||
square( [dim.x+4*thickness-gap, dim.y+2*thickness], center=true);
|
||||
}*/
|
||||
translate( [2*thickness,0,0])
|
||||
rotate( [0,90,0])
|
||||
linear_extrude( dim.x+5*thickness, center=true)
|
||||
polygon( [
|
||||
[-w/2, 0],
|
||||
[-w/2, d],
|
||||
[-2*t, d],
|
||||
[ -t, l],
|
||||
[ t, l],
|
||||
[ 2*t, d],
|
||||
[ w/2, d],
|
||||
[ w/2, 0],
|
||||
]);
|
||||
//translate( [0, length/2, 0])
|
||||
//cube( [dim.x+2*thickness, length, dim.z+2*thickness], center=true);
|
||||
}
|
||||
|
||||
// Raum für Platine+LEDs
|
||||
translate( [0, dim.y/2+thickness, 0])
|
||||
cube( [dim.x, dim.y+0.1, dim.z+0.1], center=true);
|
||||
// Fenster
|
||||
translate( [0, thickness/2-gap/2, 0])
|
||||
cube( [dim.x-thickness, thickness+gap, dim.z-2*thickness], center=true);
|
||||
|
||||
translate( [-2*thickness, 4*thickness, 0]) {
|
||||
// Schutzblechabdruck
|
||||
translate( [(dim.x+guard_width)/2+2.5*thickness, dim.y+dim.x/2, 0])
|
||||
rotate( [0, 90, 96])
|
||||
linear_extrude( dim.x*4, center=true)
|
||||
circle( d=guard_width);
|
||||
// Schraubloch
|
||||
rotate([0,0,4]) {
|
||||
translate( [dim.x/2 + 4*thickness, dim.y + thread.x/2 + thickness/2, 0])
|
||||
rotate( [0, -90, 0])
|
||||
linear_extrude( thread.y+gap)
|
||||
circle( d=thread.x);
|
||||
translate( [1, dim.y + thread.x/2 + thickness/2, 0])
|
||||
rotate( [0, -90, 0])
|
||||
linear_extrude( thread.y+gap)
|
||||
circle( d=thread.x+3);
|
||||
};
|
||||
};
|
||||
|
||||
// Kabelaussparung
|
||||
*translate([5,0,0])
|
||||
cube([5,5+gap,1.7]);
|
||||
}
|
||||
}
|
||||
|
||||
module top( dim, thread, thickness, osg) {
|
||||
length = length( dim, thread, thickness);
|
||||
// Oberfläche
|
||||
translate( [-dim.x/2-thickness/2-gap/2, thickness+length/2, -gap/2])
|
||||
cube( [2*thickness+gap+2*osg, 2*thickness+length+2*gap, dim.z+2*thickness+2*gap], center=true);
|
||||
// Steg (für das Loch)
|
||||
translate( [0, dim.y+thread.x+2.5*thickness, 0])
|
||||
cube( [dim.x+4*thickness, 2*(thread.x+osg), 2*(thread.x+osg)], center=true);
|
||||
//rotate( [0,90,0])
|
||||
//cylinder( h = dim.x+4*thickness, d = 2*(thread.x+osg), center=true);
|
||||
}
|
||||
|
||||
module bottom( dim, thread, thickness, osg) {
|
||||
length = length( dim, thread, thickness);
|
||||
// Boden
|
||||
l = 3*thickness+dim.y+osg+2*gap;
|
||||
translate( [(dim.x+4*thickness+gap)/2, length/2, -gap/2])
|
||||
cube( [5*thickness+gap+2*osg, 2*length, dim.z+3*thickness+2*gap], center=true);
|
||||
// Nut/Feder
|
||||
w = 8*thread.x;
|
||||
m = 1*thickness;
|
||||
d = 5*thickness;
|
||||
translate( [dim.x/2-d, l-m-2*osg, -w/2-osg])
|
||||
cube( [d+osg, m+2*osg, w+2*osg]);
|
||||
}
|
||||
|
||||
translate( [0, -10-length(inner,thread,thickness), 4*thickness]) rotate( [180, 90, 180])
|
||||
union() {
|
||||
intersection() {
|
||||
form( inner, thread, thickness);
|
||||
bottom( inner, thread, thickness, 0);
|
||||
}
|
||||
|
||||
// Nasen zum Einhaken vom Oberteil ins Unterteil
|
||||
for( i = [1, -1]) {
|
||||
scale( [-1, 1, i]) {
|
||||
translate( [-inner.x/2-gap/2, inner.y/2+thickness-nose.y/2, inner.z/2-nose.z/2-gap/2]) {
|
||||
translate( [0,0,-nose.z/2])
|
||||
cube( [nose.x, nose.y, nose.z], center=false);
|
||||
translate( [nose.x-thickness/2, nose.y/2, thickness/2-1.5*gap])
|
||||
difference() {
|
||||
rotate( [90,0,0])
|
||||
cylinder( h=nose.y, r=3*gap, center=true);
|
||||
translate( [-thickness/2,0,0])
|
||||
cube( [thickness, nose.y+0.1, 6*gap], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*module haken( width, height, depth, gap) {
|
||||
cube( [nose.x, nose.y, nose.z], center=false);
|
||||
}
|
||||
module mulde( width, height, depth, gap) {
|
||||
}
|
||||
|
||||
haken( nose.);*/
|
||||
|
||||
rotate([0,-90,0])
|
||||
difference() {
|
||||
form( inner, thread, thickness);
|
||||
bottom( inner, thread, thickness, gap);
|
||||
// Mulde zum Einhaken vom Oberteil ins Unterteil
|
||||
for(i = [1,-1])
|
||||
scale( [-1,1,i])
|
||||
translate([-inner.x/2+2.5*thickness-gap/2, inner.y/2+thickness-gap/2, inner.z/2])
|
||||
cube( [thickness, nose.y+gap, thickness], center=true);
|
||||
}
|
100
rücklampe.scad
Normal file
100
rücklampe.scad
Normal file
|
@ -0,0 +1,100 @@
|
|||
include <BOSL/constants.scad>;
|
||||
use <BOSL/metric_screws.scad>;
|
||||
|
||||
only = "outer";
|
||||
|
||||
height = 20;
|
||||
width = 100;
|
||||
depth = 30;
|
||||
thickness = 2;
|
||||
gap = 0.4;
|
||||
inner = [width, depth, height];
|
||||
outer = [width+2*thickness+2*gap, depth+2*thickness+2*gap, height+2*thickness+2*gap];
|
||||
diag_overlap = 8;
|
||||
|
||||
module auflage() {
|
||||
rotate([180,0,0])
|
||||
difference() {
|
||||
translate([0,1,0]) cube( [10,2,10], center=true);
|
||||
translate([-5,2,1]) rotate([45,0,0]) cube([10,6,10]);
|
||||
translate([1,2,-5]) rotate([0,0,-45]) cube([10,6,10]);
|
||||
translate([-5,2,-1]) rotate([-45,0,0]) translate([0,0,-10]) cube([10,6,10]);
|
||||
translate([-1,2,-5]) rotate([0,0,45]) translate([-10,0,0]) cube([10,6,10]);
|
||||
};
|
||||
};
|
||||
|
||||
if(only!="inner") {
|
||||
rotate([0, only=="outer" ? 90 : 0,0]){
|
||||
union() {
|
||||
difference() {
|
||||
union() {
|
||||
rotate([ 0, 90, 0])
|
||||
cylinder( inner.x+2*thickness, outer.z/2+thickness, outer.z/2+thickness, center=true);
|
||||
translate([ 0, -inner.y/4-2*thickness, 0])
|
||||
cube([ inner.x+2*thickness, inner.y/2+thickness, inner.z+2*thickness], center=true);
|
||||
};
|
||||
|
||||
union() {
|
||||
//rotate([ 0, 90, 0])
|
||||
//cylinder( inner.x, inner.z/2, inner.z/2, center=true);
|
||||
translate([ 0, -inner.y/4-thickness, 0])
|
||||
cube([ inner.x+2.1*thickness, inner.y/2+2*thickness, inner.z], center=true);
|
||||
//translate([ 0, -inner.y/4-thickness, 0])
|
||||
//cube([ inner.x-thickness, inner.y/2+thickness, inner.z-thickness], center=true);
|
||||
}
|
||||
};
|
||||
|
||||
translate( [inner.x/2-thickness/2, 0, inner.z/2-thickness/2])
|
||||
auflage();
|
||||
translate( [-inner.x/2+thickness/2, 0, inner.z/2-thickness/2])
|
||||
auflage();
|
||||
translate( [inner.x/2-thickness/2, 0, -inner.z/2+thickness/2])
|
||||
auflage();
|
||||
translate( [-inner.x/2+thickness/2, 0, -inner.z/2+thickness/2])
|
||||
auflage();
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if(only!="outer") {
|
||||
rotate([only=="inner" ? 90 : 0,0,0]){
|
||||
union() {
|
||||
difference() {
|
||||
union() {
|
||||
rotate([ 0, 90, 0])
|
||||
cylinder( outer.x+2*thickness+2*gap, outer.z/2+thickness+2*gap, outer.z/2+thickness+2*gap, center=true);
|
||||
translate([ 0, -outer.y/4, 0])
|
||||
cube([ outer.x+2*thickness+2*gap, outer.y/2+thickness+2*gap, outer.z+2*thickness+2*gap], center=true);
|
||||
};
|
||||
union() {
|
||||
rotate([ 0, 90, 0])
|
||||
cylinder( outer.x, outer.z/2, outer.z/2, center=true);
|
||||
translate([ 0, -outer.y/4, 0])
|
||||
cube([ outer.x, outer.y/2, outer.z], center=true);
|
||||
};
|
||||
translate([ 0, thickness, 0])
|
||||
cube([ outer.x-2*thickness, outer.y-3*thickness, outer.z+3*thickness], center=true);
|
||||
translate([ 0, -outer.y/2, 0]) {
|
||||
cube([ outer.x-2*diag_overlap, 1.5*thickness, outer.z], center=true);
|
||||
cube([ outer.x, 1.5*thickness, outer.z-2*diag_overlap], center=true);
|
||||
|
||||
diag_overlap_length = sqrt(diag_overlap^2*2);
|
||||
o = [ outer.x/2-diag_overlap, -0.75*thickness, outer.z/2-diag_overlap];
|
||||
|
||||
translate([ o.x, o.y, o.z])
|
||||
rotate([ 0,45,0])
|
||||
cube([ diag_overlap_length, 2*thickness, diag_overlap_length], center=true);
|
||||
translate([ -o.x, o.y, o.z])
|
||||
rotate([ 0,45,0])
|
||||
cube([ diag_overlap_length, 2*thickness, diag_overlap_length], center=true);
|
||||
translate([ -o.x, o.y, -o.z])
|
||||
rotate([ 0,45,0])
|
||||
cube([ diag_overlap_length, 2*thickness, diag_overlap_length], center=true);
|
||||
translate([ o.x, o.y, -o.z])
|
||||
rotate([ 0,45,0])
|
||||
cube([ diag_overlap_length, 2*thickness, diag_overlap_length], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
15
schlauchartig.scad
Normal file
15
schlauchartig.scad
Normal file
|
@ -0,0 +1,15 @@
|
|||
module rounded_ngon(num, r, rounding = 0) {
|
||||
function v(a) = let (d = 360/num, v = floor((a+d/2)/d)*d) (r-rounding) * [cos(v), sin(v)];
|
||||
polygon([for (a=[0:360-1]) v(a) + rounding*[cos(a),sin(a)]]);
|
||||
}
|
||||
|
||||
//rounded_ngon(5, 100, 50);
|
||||
|
||||
module ngon( num, r) {
|
||||
polygon( [for ( i = [0:num-1], a=i*360/num) [ r*cos(a), r*sin(a) ] ]);
|
||||
}
|
||||
for( i = [0:100]) {
|
||||
translate([i,0,0])
|
||||
rotate([0,90,0])
|
||||
ngon( 360, 1);
|
||||
}
|
35
spreizkonus.scad
Normal file
35
spreizkonus.scad
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
|
||||
|
||||
module spreizkonus( part, d, sd, mount=0, bottom=1) {
|
||||
assert( "bottom" == part || "top" == part, "First parameter (part) must be \"bottom\" or \"top\".");
|
||||
s = mount;
|
||||
b = bottom;
|
||||
h = d+s+b;
|
||||
c = 1 + sqrt( 2*h^2);
|
||||
m = "bottom" == part ? 180+45 : 45;
|
||||
v = "bottom" == part ? sd : 0;
|
||||
|
||||
difference() {
|
||||
intersection() {
|
||||
translate( [0,0,s/2-b/2])
|
||||
cylinder( d=d, h=h, center=true);
|
||||
rotate( [0,m,0])
|
||||
translate( [0,0,c/2])
|
||||
cube( c, center=true);
|
||||
}
|
||||
translate( [0,0,s/2-b/2])
|
||||
hull() {
|
||||
cylinder( d=sd, h=h+1, center=true);
|
||||
translate( [v,0,0])
|
||||
cylinder( d=sd, h=h+1, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
spreizkonus( "bottom", d=30, sd=4, bottom=2);
|
||||
translate([0,0,1])
|
||||
spreizkonus( "top", d=30, sd=4, mount=2);
|
||||
*/
|
34
steffis_frontleuchte.scad
Normal file
34
steffis_frontleuchte.scad
Normal file
|
@ -0,0 +1,34 @@
|
|||
include <BOSL/constants.scad>;
|
||||
use <BOSL/metric_screws.scad>;
|
||||
$fn=100;
|
||||
|
||||
thread = [
|
||||
4, // diameter
|
||||
6 // depth
|
||||
];
|
||||
|
||||
thickness = 1.2;
|
||||
gap = 0.4;
|
||||
|
||||
pipe_diameter = 8;
|
||||
|
||||
module multi_helix( length, diameter, count = 4) {
|
||||
factor = 90*length/diameter;
|
||||
for( f = [factor, -factor])
|
||||
linear_extrude( length, center = true, slices=length/2, twist = f)
|
||||
for( i = [0:count-1])
|
||||
rotate( [0, 0, 360/count*i])
|
||||
translate( [diameter/2, 0, 0])
|
||||
children();
|
||||
}
|
||||
difference() {
|
||||
cylinder( h=50, d=20, center=true);
|
||||
cylinder( h=50+0.1, d=20-2*thickness, center=true);
|
||||
}
|
||||
intersection() {
|
||||
multi_helix( 50, diameter = 20-thickness, count = 4)
|
||||
translate( [-thickness,0,0])
|
||||
//circle( d=thickness*4);
|
||||
square(thickness*2,center=true);
|
||||
cylinder( h=50, d=20, center=true);
|
||||
}
|
194
steffis_frontleuchte2.scad
Normal file
194
steffis_frontleuchte2.scad
Normal file
|
@ -0,0 +1,194 @@
|
|||
use <tht-leds/tht-leds.scad>;
|
||||
use <spreizkonus.scad>;
|
||||
|
||||
$fn=100;
|
||||
gap = 0.24;
|
||||
mgap = 1.5*gap;
|
||||
thickness=2.4;
|
||||
screw_dia = 3;
|
||||
screw_gap = 0.6;
|
||||
screwhead_dia = 6;
|
||||
screwhead_hei = 3;
|
||||
screwhold_hei = 7.5;
|
||||
nutholder_dia = 5;
|
||||
nutholder_hei = 5;
|
||||
screwpos = 11.6;
|
||||
|
||||
inner_front_diameter = 2*16+2*gap;
|
||||
front_diameter = inner_front_diameter+2*thickness;
|
||||
pipe_diameter = 22;
|
||||
inner_pipe_diameter = 20;
|
||||
angle = 140;
|
||||
|
||||
function ease_in(v) = v^2;
|
||||
function ease_out(v) = 1 - v^2;
|
||||
function ease_inout(v) = (1-v^2)^4;
|
||||
|
||||
module screwhole( d, l, cut=0, cutlen=undef, headlen=0) {
|
||||
cutlen = is_undef(cutlen) ? (cut-d)/2 : cutlen;
|
||||
cylinder( d=d, h=l, center=true);
|
||||
c = (cut-d-headlen)/2;
|
||||
translate( [0, 0, (l - cutlen - headlen)/2])
|
||||
cylinder( d1=d, d2=cut, h=cutlen, center=true);
|
||||
translate( [0, 0, (l - headlen)/2])
|
||||
cylinder( d=cut, h=headlen, center=true);
|
||||
}
|
||||
|
||||
module led( diameter, height) {
|
||||
niph = 0.5;
|
||||
nipd = 1;
|
||||
cylinder( d=diameter-nipd, h=height, center=true);
|
||||
translate( [0, 0, -height/2+niph/2])
|
||||
cylinder( d=diameter, h=niph, center=true);
|
||||
}
|
||||
|
||||
//color( "#444444")
|
||||
{
|
||||
*difference() {
|
||||
union() {
|
||||
cylinder( r=15, h=thickness);
|
||||
translate( [0, 0, thickness])
|
||||
cylinder( d=8, h=4);
|
||||
}
|
||||
|
||||
translate( [0, 0, -1]) {
|
||||
for( i = [0 : (360/7) : 360])
|
||||
rotate( [0, 0, i])
|
||||
translate( [7, 0, 0])
|
||||
tht_led_5mm();
|
||||
|
||||
for( i = [0 : (360/8) : 360])
|
||||
rotate( [0, 0, i])
|
||||
translate( [14, 0, 0])
|
||||
tht_led_5mm();
|
||||
}
|
||||
|
||||
translate( [0, 0, -0.1])
|
||||
cylinder( d=screw_dia+screw_gap, h=8+thickness+0.2);
|
||||
translate( [0, 0, -0.1])
|
||||
cylinder( d=screwhead_dia+screw_gap, h=screwhead_hei+0.1);
|
||||
}
|
||||
|
||||
translate( [0, 40, -thickness])
|
||||
union() {
|
||||
difference() {
|
||||
union() {
|
||||
cylinder( r=16, h=thickness);
|
||||
|
||||
mirror( [0, 0, 1])
|
||||
intersection() {
|
||||
cylinder( r=16, h=thickness+screwhold_hei);
|
||||
union() {
|
||||
for( i = [0 : (360/2) : 360])
|
||||
rotate( [0, 0, i])
|
||||
translate( [screwpos, 0, 0])
|
||||
cylinder( d=8, h=screwhold_hei);
|
||||
for( i = [90 : (360/2) : 360])
|
||||
rotate( [0, 0, i])
|
||||
translate( [screwpos+2, 0, 0])
|
||||
cylinder( d=6, h=screwhold_hei);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rotate( [0, 0, 90]) {
|
||||
translate( [0, 0, -1]) {
|
||||
tht_led_5mm();
|
||||
for( i = [0 : 360/6 : 360])
|
||||
rotate( [0, 0, i])
|
||||
translate( [6, 0, 0])
|
||||
tht_led_5mm();
|
||||
|
||||
for( i = [0, 1]) mirror( [i, 0])
|
||||
for( j = [0, 1]) mirror( [0, j])
|
||||
translate( [6, 0, 0])
|
||||
rotate( [0, 0, 60])
|
||||
translate( [6, 0, 0]) {
|
||||
tht_led_5mm();
|
||||
mirror( [0, 0, 1])
|
||||
cylinder( d=6, h=10);
|
||||
}
|
||||
}
|
||||
*for( i = [0 : 360/4 : 360])
|
||||
//if( i%(3*360/12) != 0)
|
||||
rotate( [0, 0, 45+i])
|
||||
translate( [12, 0, 0]) {
|
||||
tht_led_5mm();
|
||||
mirror( [0, 0, 1])
|
||||
cylinder( d=6, h=10);
|
||||
}
|
||||
}
|
||||
|
||||
for( i = [0, 1])
|
||||
mirror( [0, 0, 1])
|
||||
mirror( [i, 0])
|
||||
translate( [screwpos, 0, -thickness]) {
|
||||
translate( [0, 0, -0.1])
|
||||
cylinder( d=screw_dia+screw_gap, h=screwhold_hei+thickness+0.2);
|
||||
translate( [0, 0, -0.1])
|
||||
cylinder( d=screwhead_dia+screw_gap, h=screwhead_hei+0.1);
|
||||
}
|
||||
*for( i = [0 : 360/4 : 360])
|
||||
mirror( [0, 0, 1])
|
||||
rotate( [0, 0, i])
|
||||
translate( [screwpos, 0, -thickness]) {
|
||||
translate( [0, 0, -0.1])
|
||||
cylinder( d=screw_dia+screw_gap, h=screwhold_hei+thickness+0.2);
|
||||
translate( [0, 0, -0.1])
|
||||
cylinder( d=screwhead_dia+screw_gap, h=screwhead_hei+0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
translate( [0,0, -screwhold_hei-thickness-0.1])
|
||||
difference() {
|
||||
N = 150;
|
||||
p = front_diameter-pipe_diameter;
|
||||
union() {
|
||||
translate( [-14-p, 0, 0]) {
|
||||
for( i = [0 : N-1]) {
|
||||
in = i+1;
|
||||
e = ease_inout( i/N);
|
||||
en = ease_inout( in/N);
|
||||
x = e*p;
|
||||
xn = en*p;
|
||||
d = pipe_diameter+x;
|
||||
dn = pipe_diameter+xn;
|
||||
hull() {
|
||||
rotate( [0, i * angle/N, 0])
|
||||
translate( [14+x, 0])
|
||||
linear_extrude(0.1)
|
||||
circle( d=d);
|
||||
rotate( [0, (in) * angle/N, 0])
|
||||
translate( [14+xn, 0])
|
||||
linear_extrude(0.1)
|
||||
circle( d=dn);
|
||||
}
|
||||
}
|
||||
rotate( [0, angle, 0])
|
||||
translate( [14, 0, -inner_pipe_diameter/2-2])
|
||||
spreizkonus( "top", d=inner_pipe_diameter, sd=3+2*gap, mount=2.1);
|
||||
}
|
||||
|
||||
difference() {
|
||||
cylinder( d=front_diameter, 10);
|
||||
translate([0,0,0.1])
|
||||
cylinder( d=inner_front_diameter+0.1, h=thickness+screwhold_hei+gap);
|
||||
}
|
||||
}
|
||||
|
||||
translate([-14-p,0,-1])
|
||||
rotate( [0, angle, 0])
|
||||
translate( [14, 0, -1])
|
||||
cylinder(d=5,h=100);
|
||||
|
||||
for(i=[0:360/2:360])
|
||||
rotate( [0,0,i])
|
||||
translate( [screwpos, 0, -nutholder_hei+0.2])
|
||||
cylinder( d=nutholder_dia, h=nutholder_hei+0.2);
|
||||
}
|
||||
|
||||
translate( [-40, 40, -(inner_pipe_diameter)/2-1])
|
||||
mirror( [0,0,1])
|
||||
spreizkonus( "bottom", d=inner_pipe_diameter, sd=3+2*gap, bottom=1);
|
||||
}
|
13
threaded_insert.scad
Normal file
13
threaded_insert.scad
Normal file
|
@ -0,0 +1,13 @@
|
|||
module threaded_insert( s = undef, d = undef, l = undef, gap = 0) {
|
||||
if( 3==s) threaded_insert( d = 4.6 , l = 4.6, gap = gap);
|
||||
else if( 4==s) threaded_insert( d = 6.3 , l = 6.35, gap = gap);
|
||||
else if( 5==s) threaded_insert( d = 7.1 , l = 9.5, gap = gap);
|
||||
else if( 6==s) threaded_insert( d = 8.7 , l = 12.7, gap = gap);
|
||||
else if( 8==s) threaded_insert( d = 10.24, l = 12.7, gap = gap);
|
||||
else {
|
||||
assert( is_undef(s), "Unknown size (expected 3 for M3, ...) or manual (d,l).");
|
||||
assert( is_num(d), "Diameter d (numeric) or size expected.");
|
||||
assert( is_num(l), "Length l (numeric) or size expected.");
|
||||
cylinder( d = d+2*gap, h = l+2*gap);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue