diff --git a/Amulett/Amulett.scad b/Amulett/Amulett.scad new file mode 100644 index 0000000..20008ea --- /dev/null +++ b/Amulett/Amulett.scad @@ -0,0 +1,23 @@ +RING = "ring1.svg"; // Outer Ring Graphic +SYM = "symbol1.svg"; // Inner Symbol Graphic + +union() { // Union block for amulett and ring + translate([0,0,0]) { // on which height should outer ring and symbol start + scale([1,1,10]) { // scale and thinkness of outer ring and symbol + color([0.5,0.5,0.5]) linear_extrude(1) { + import(file = RING, center = true, dpi = 300); // import outer ring vector graphic with a dpi of 300 } + import(file = SYM, center = true, dpi = 300); // import inner symbol vector graphic with a dpi of 300 + } + } + }; + + color([0.2,0.2,0.2]) cylinder(h = 8, r = 128, center = true); // the base on which ring + symbol should be printed + + translate([-4,135,-4]){ // move ring for chain on top of amulett + color([0.2,0.2,0.2]) difference() { // create a diference between two cylinders to a ring for a chain + cylinder(h = 14, r = 20, center = false); // cylinder with filling + translate([0,0,-1]) + cylinder(h=20,r=16, center= false); // cylinder which is cut off + }; + }; +}; diff --git a/Amulett/README.md b/Amulett/README.md new file mode 100644 index 0000000..b534cd8 --- /dev/null +++ b/Amulett/README.md @@ -0,0 +1,3 @@ +![](https://github.com/Kaisa-Marysia/OSCAD/blob/main/Amulett/output.gif?raw=true) + +There are three different rings and graphics as SVG in this repository. Just change the name under `RING` or `SYM` from e.g. ring1.svg -> ring2.svg diff --git a/Amulett/output.gif b/Amulett/output.gif new file mode 100644 index 0000000..b45b3b3 Binary files /dev/null and b/Amulett/output.gif differ diff --git a/Amulett/ring1.svg b/Amulett/ring1.svg new file mode 100644 index 0000000..5cc9213 --- /dev/null +++ b/Amulett/ring1.svg @@ -0,0 +1,37 @@ + + + + diff --git a/Amulett/ring2.svg b/Amulett/ring2.svg new file mode 100644 index 0000000..c479b5f --- /dev/null +++ b/Amulett/ring2.svg @@ -0,0 +1,38 @@ + + + + diff --git a/Amulett/ring3.svg b/Amulett/ring3.svg new file mode 100644 index 0000000..b1fe8cf --- /dev/null +++ b/Amulett/ring3.svg @@ -0,0 +1,37 @@ + + + + diff --git a/Amulett/symbol1.svg b/Amulett/symbol1.svg new file mode 100644 index 0000000..0238efd --- /dev/null +++ b/Amulett/symbol1.svg @@ -0,0 +1,41 @@ + + + + + + + + + + diff --git a/Amulett/symbol2.svg b/Amulett/symbol2.svg new file mode 100644 index 0000000..37045fc --- /dev/null +++ b/Amulett/symbol2.svg @@ -0,0 +1,37 @@ + + + + diff --git a/Amulett/symbol3.svg b/Amulett/symbol3.svg new file mode 100644 index 0000000..84799b6 --- /dev/null +++ b/Amulett/symbol3.svg @@ -0,0 +1,37 @@ + + + + diff --git a/Badge/Badge.scad b/Badge/Badge.scad new file mode 100644 index 0000000..9c2afdc --- /dev/null +++ b/Badge/Badge.scad @@ -0,0 +1,69 @@ +string = "Name"; // Name which should be printed +logo = "Logo.svg"; // Path To File +logopos = -50; // Logoposition +center = true; // [true/false] + +font = "Ubuntu:style=bold"; // Font name and style +letter_size = 50; +height = 10; +offset = 20; +spacing = 0.9; +current_color = "ALL"; +hi_color = "#3FFF21"; +lo_color = "#FB48C4"; + +module multicolor(color) { + if (current_color != "ALL" && current_color != color) { + } else { + color(color) + children(); + } +} + +union(){ + translate([logopos,-5,0]) { + union(){ + multicolor(lo_color) resize([0,0,5]) translate([0,0,-0.8]) { + linear_extrude(1) offset(offset*1.5) resize([letter_size*2,letter_size*2,0]) { + import(logo, center=center); + } + } + translate([0,0,0.1]){ + multicolor(hi_color) linear_extrude(height) resize([letter_size*2,letter_size*2,0]) { + import(logo, center=center); + } + } + } + } +} + +union(){ + multicolor(lo_color) resize([0,0,5]) translate([0,0,-0.8]) { + linear_extrude(1) offset(offset*1.5) text(string, size = letter_size, font = font, $fn = 64, spacing = spacing); + } + translate([0,0,0.1]){ + multicolor(hi_color) linear_extrude(height) text(string, size = letter_size, font = font, $fn = 64, spacing = spacing); + } +} +translate([0,0,0.1]){ + multicolor(hi_color) difference(){ + union(){ + linear_extrude(height) offset(offset*1.5) text(string, size = letter_size, font = font, $fn = 64, spacing = spacing); + + translate([logopos,-5,0]) { + linear_extrude(height) offset(offset*1.5) resize([letter_size*2,letter_size*2,0]) { + import(logo, center=center); + } + } + } + + multicolor(hi_color) union(){ + linear_extrude(height*1.1) offset(offset) text(string, size = letter_size, font = font, $fn = 64, spacing = spacing); + translate([logopos,-5,0]) { + linear_extrude(height*1.1) offset(offset) resize([letter_size*2,letter_size*2,0]) { + import(logo, center=center); + } + } + } + } +} diff --git a/Badge/README.md b/Badge/README.md new file mode 100644 index 0000000..ab51527 --- /dev/null +++ b/Badge/README.md @@ -0,0 +1,4 @@ +This file creates a Badge with your name and a graphic asset. Just enter under `string` your name and name the path to your svg under `logo`. +You are able to set the position of the graphic under `logopos` + +![](https://raw.githubusercontent.com/Kaisa-Marysia/OSCAD/main/Badge/output.gif) diff --git a/Badge/output.gif b/Badge/output.gif new file mode 100644 index 0000000..94fb0ae Binary files /dev/null and b/Badge/output.gif differ diff --git a/README.md b/README.md index e6618d4..707768c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # OSCAD - +In this repository I share my Open SCAD Files, for generative modells. +As long nothing else is mentioned, all files linced under [Creative Commons CC-BY](https://creativecommons.org/licenses/by/4.0/) diff --git a/Rock-Generator/README.md b/Rock-Generator/README.md new file mode 100644 index 0000000..af40a32 --- /dev/null +++ b/Rock-Generator/README.md @@ -0,0 +1 @@ +![3D Modell off a random generated crystal](https://raw.githubusercontent.com/Kaisa-Marysia/OSCAD/main/Rock-Generator/output.gif). diff --git a/Rock-Generator/Rock-Generator.scad b/Rock-Generator/Rock-Generator.scad new file mode 100644 index 0000000..8a07c0d --- /dev/null +++ b/Rock-Generator/Rock-Generator.scad @@ -0,0 +1,48 @@ +scale=30; +r_facets = rands(5,10,1)[0]; +facets=r_facets; +r_height = rands(2,4,1)[0]; +height=r_height; +r_plane = rands(0,10,1)[0]; +plane=r_plane; +r_top = rands(1,2,1)[0]; +top=1; +r_cut = rands(0,20,1)[0]; +cut=r_cut; +half=scale/1.5; +$fn=facets; + +// Rock Generator +translate([0,0,-10]){ + difference(){ +// Base model + union(){ + translate([0,0,0]) + cylinder(h=scale*height-cut,d1=scale,d2=half*3); + translate([0,0,0+scale*height-cut]) + cylinder(h=(half*3)/top,d1=half*3,d2=plane); + } +// Model which should be removed from the base model + scale([0.8,0.8,0.95]){ + union(){ + translate([0,0,0]) + cylinder(h=scale*height-cut,d1=scale,d2=half*3); + translate([0,0,0+scale*height-cut]) + cylinder(h=(half*3)/top,d1=half*3,d2=plane); + } + } + } +} + +// Socket +translate([50,0,-5]){ + difference(){ + cylinder(h=10,d1=scale*1.3,d2=scale*1.3, center= true); + union(){ + translate([0,0,0]) + cylinder(h=scale*height-cut,d1=scale,d2=half*3); + translate([0,0,0+scale*height-cut]) + cylinder(h=(half*3)/top,d1=half*3,d2=plane); + } + } +} diff --git a/Rock-Generator/output.gif b/Rock-Generator/output.gif new file mode 100644 index 0000000..a060668 Binary files /dev/null and b/Rock-Generator/output.gif differ