summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2024-04-22 21:24:43 +0200
committerErich Eckner <git@eckner.net>2024-04-22 21:24:43 +0200
commit807e1f7680e1783d4fd60a124d6df9214893a7af (patch)
tree23e3b23094c6dd8729b5253acdc7c865f7846b38
parentf49c9fb838531341390c31a1549af20ade9b7aab (diff)
download3D-807e1f7680e1783d4fd60a124d6df9214893a7af.tar.xz
Lego/Loopingstart neu
-rw-r--r--Lego/Lego.scad46
-rw-r--r--Lego/Makefile3
2 files changed, 49 insertions, 0 deletions
diff --git a/Lego/Lego.scad b/Lego/Lego.scad
index 7b271a7..d2fb1d3 100644
--- a/Lego/Lego.scad
+++ b/Lego/Lego.scad
@@ -633,6 +633,49 @@ module WeicheT(br) {
}
}
+function Loopingstart_trajektorie(br,ho,a) = [ 0, ((br-1)*(1/2-sin(a))+1/2)*d, ((ho-1)*(1-cos(a))+1)*h ];
+
+module Loopingstart_positiv(br,ho) {
+ da = fa(max((br-1)*d,(ho-1)*h));
+ intersection() {
+ for (a=[0:da:90])
+ hull() {
+ translate(Loopingstart_trajektorie(br,ho,a))
+ sphere(r = hubelino_d/2 + r/2);
+ translate(Loopingstart_trajektorie(br,ho,a+da))
+ sphere(r = hubelino_d/2 + r/2);
+ }
+ translate([-d+eps,-br*d/2+eps,0])
+ cube([2*d-2*eps,br*d-2*eps,ho*h-eps]);
+ }
+}
+
+module Loopingstart_negativ(br,ho) {
+ da = fa(max((br-1)*d,(ho-1)*h));
+ for (a=[0:da:90])
+ hull() {
+ translate(Loopingstart_trajektorie(br,ho,a))
+ sphere(r = hubelino_d/2);
+ translate(Loopingstart_trajektorie(br,ho,a+da))
+ sphere(r = hubelino_d/2);
+ }
+ sk = max(2,br-1,(ho-1)*h/d);
+ translate([0,br*d/2,ho*h])
+ scale([2/sk,(br-1)/sk,(ho-1)*h/d/sk])
+ rotate([0,90,0])
+ cylinder(h=sk*d, r=sk*d, center=true);
+}
+
+module Loopingstart(br,ho) {
+ difference() {
+ union() {
+ Lego_unten(2,br,ho*h);
+ Loopingstart_positiv(br,ho);
+ }
+ Loopingstart_negativ(br,ho);
+ }
+}
+
l=4;
if (Teil == "Helix") {
Helix(l);
@@ -648,6 +691,9 @@ if (Teil == "Helix") {
} else if (Teil == "Looping") {
mirror([0,1,0])
Rooping(l);
+} else if (Teil == "Loopingstart") {
+ h=4;
+ Loopingstart(l,h);
} else if (Teil == "Prellbock") {
Prellbock(l);
} else if (Teil == "Rampe") {
diff --git a/Lego/Makefile b/Lego/Makefile
index e1e30b1..a2c75bb 100644
--- a/Lego/Makefile
+++ b/Lego/Makefile
@@ -13,6 +13,9 @@ Lego/Lego-KreuzungMitLoch-%.stl: Lego/Lego.scad
Lego/Lego-Looping-%.stl: Lego/Lego.scad
openscad -D '$$fa=$(FA)' -D '$$fs=$(FS)' -D 'Teil="Looping"' -D l=$(word 3,$(subst -, ,$(patsubst %.stl,%,$@))) --export-format stl -o $@ $<
+Lego/Lego-Loopingstart-%.stl: Lego/Lego.scad
+ openscad -D '$$fa=$(FA)' -D '$$fs=$(FS)' -D 'Teil="Loopingstart"' -D l=$(word 3,$(subst -, ,$(patsubst %.stl,%,$@))) -D h=$(word 4,$(subst -, ,$(patsubst %.stl,%,$@))) --export-format stl -o $@ $<
+
Lego/Lego-Prellbock-%.stl: Lego/Lego.scad
openscad -D '$$fa=$(FA)' -D '$$fs=$(FS)' -D 'Teil="Prellbock"' -D l=$(lastword $(subst -, ,$(patsubst %.stl,%,$@))) --export-format stl -o $@ $<