Lepsi zaformovani
authorTomas Mudrunka <tomas.mudrunka@gmail.com>
Wed, 12 Feb 2025 01:44:02 +0000 (02:44 +0100)
committerTomas Mudrunka <tomas.mudrunka@gmail.com>
Wed, 12 Feb 2025 01:44:02 +0000 (02:44 +0100)
openscad/planter_modular_c.scad

index cac420ca3c20f90d221dbee93454ec1230f09cbf..4384c6b1b1f846ad06e8ce758aafa2f8124f419e 100644 (file)
@@ -9,7 +9,14 @@ $fn=6;
  - diry na zavlahu?
 */
 
-module cavity2(n=6, pitch=17.3, d1=13, d2=17) {
+module mold_plate(n, d, h=0.4, pitch=17.3, l=1.2) {
+       hull() {
+               scale([1,l,1]) cylinder(d=d, h=h);
+               translate([0,n*pitch,0]) scale([1,l,1]) cylinder(d=d, h=h);
+       }
+}
+
+module cavity2(n=1, pitch=17.3, d1=13, d2=17, plate=0) {
        bot = path_merge_collinear(union([
                for(i = [0 : 1 : n]) union([
                        move([0,i*pitch], hexagon(d=13)),
@@ -26,6 +33,7 @@ module cavity2(n=6, pitch=17.3, d1=13, d2=17) {
                
        //region(bot);
 
+       if(plate != 0) translate([0,0,15]) mold_plate(n=n, d=23, h=plate);
        for(i = [0 : 1 : n]) translate([-4,i*pitch,1]) sphere(1); //drain hole
        difference() {
                translate([0,0,8]) rounded_prism(bot, top, height=14, joint_top=-0.5, joint_bot=0.5, joint_sides=1, splinesteps=$fn, anchor="origin"); //pothole
@@ -34,7 +42,7 @@ module cavity2(n=6, pitch=17.3, d1=13, d2=17) {
        }
 }
 
-module planter2(hollow=1, n=1, pitch=17.3, d1=20) {
+module planter2(hollow=1, n=1, pitch=17.3, d1=20, di=16.5) {
        top = path_merge_collinear(union([
                for(i = [0 : 1 : n]) union([
                        move([0,i*pitch], hexagon(d=d1)),
@@ -47,7 +55,7 @@ module planter2(hollow=1, n=1, pitch=17.3, d1=20) {
        difference() {
                union() {
                        translate([0,0,7.5]) rounded_prism(top, height=15, joint_top=0.1, joint_bot=0.5, joint_sides=0.5, splinesteps=$fn, anchor="origin"); //main hexagon
-                       for(i = [0 : 1 : n]) translate([0,i*pitch,-1]) rounded_prism(hexagon(d=16.5), hexagon(d=17), height=1, joint_top=-0.5, joint_bot=0, joint_sides=1, splinesteps=$fn, anchor="bot"); //index
+                       for(i = [0 : 1 : n]) translate([0,i*pitch,-1]) rounded_prism(hexagon(d=di), hexagon(d=17), height=1, joint_top=-0.5, joint_bot=0, joint_sides=1, splinesteps=$fn, anchor="bot"); //index
                }
                if(hollow != 0) cavity2(n, pitch);
                for(i = [0 : 1 : n]) translate([-3,i*pitch,-2]) scale([1,0.9,1.22]) rotate([0,90,0]) rotate([0,0,30]) cylinder(d1=1, d2=34, h=15); //balcony
@@ -59,8 +67,8 @@ module double(ho=1) {
        translate([0,17.3,0])   if(ho==-1) cavity(-1); else planter(-1, hollow=ho);
 }
 
-//cavity2();
-//planter2(n=1);
+//!cavity2();
+//!planter2(n=1);
 //for(i = [0:1:2]) translate([0,0,i*15.1]) planter2(n=3-i);
 
 
@@ -68,14 +76,16 @@ module double(ho=1) {
 scale(5) {
        difference() {
                //translate([-11,-10,-1]) cube([22,37,16]);
-               translate([0,0,0]) minkowski() {
-                       cube([2,6,0.0000000001], center=true);
-                       hull() planter2(n=1);
-               }
+               //translate([0,0,0]) minkowski() {
+                       //cube([2,6,0.0000000001], center=true);
+                       hull() {
+                               planter2(n=1, di=22);
+                               translate([0,0,14]) mold_plate(n=1, d=23, h=1);
+                       }
+               //}
                planter2(hollow=0, n=1);
                translate([-4,0,0]) cube([0.01,100,50], center=true); //split mold
        }
-       
-       translate([20,0,0]) cavity2(n=1);
+       translate([0,0,1]) cavity2(n=1, plate=0.4);
         
 }
This page took 0.151297 seconds and 4 git commands to generate.