3D part design with OpenSCAD #56: Making geodesic dome hubs with the pipe fitting module.

An easy way to use the pipe fitting module for OpenScad to make hubs for a geodesic dome.

4 min read
By Bob
3D part design with OpenSCAD #56: Making geodesic dome hubs with the pipe fitting module.

I made a couple of small modifications to the pipe fitting module so the center can be scaled which makes it more useful for designing custom pipe hubs for a geodesic dome frame, and adds better support in between the hubs for strength.

Here is the modified code:

/* [Pipe Fitting] */
Show_fitting = true;

/* [Center] */
center_diameter = 12;//[3:0.01:50]
center_shape = 6; //[3:1:100]
Rotate_center = 0; //[0:0.01:360]
Scale_center_x = 1; //[0:.01:4]
Scale_center_y= 1; //[0:.01:4]
Scale_center_z = .25; //[0:.01:4]
Rotate_all_X = 0; //[-360:0.01:360]
Rotate_all_Y = 0; //[-360:0.01:360]
Rotate_all_Z = 0; //[-360:0.01:360]

/* [Branch 1] */
Show_branch1 = true;
angleX_branch1 = 96; //[0:0.01:360]
angleY_branch1 = 0; //[0:0.01:360]
angleZ_branch1 = 150; //[0:0.01:360]
Rotate_branch1_Z = 0; //[0:0.01:360]
Rotate_branch1_inside = 0; //[0:0.01:360]
outside_diameter1 = 6;//[2:0.01:50]
inside_diameter1= 4; //[0:0.01:49]
length1 = 12; //[8:0.01:200]
outside_shape1 = 100; //[3:1:100]
inside_shape1 = 100; //[3:1:100]

/* [Branch 2] */
Show_branch2 = true;
angleX_branch2 = 96; //[0:0.01:360]
angleY_branch2 = 0; //[0:0.01:360]
angleZ_branch2 = 30; //[0:0.01:360]
Rotate_branch2_Z = 0; //[0:0.01:360]
Rotate_branch2_inside = 0; //[0:0.01:360]
outside_diameter2 = 6;//[2:0.01:50]
inside_diameter2= 4; //[0:0.01:49]
length2 = 12; //[8:0.01:200]
outside_shape2 = 100; //[3:1:100]
inside_shape2 = 100; //[3:1:100]

/* [Branch 3] */
Show_branch3 = true;
angleX_branch3 = 264; //[0:0.01:360]
angleY_branch3 = 0; //[0:0.01:360]
angleZ_branch3 = 30; //[0:0.01:360]
Rotate_branch3_Z = 0; //[0:0.01:360]
Rotate_branch3_inside = 0; //[0:0.01:360]
outside_diameter3 = 6;//[2:0.01:50]
inside_diameter3= 4; //[0:0.01:49]
length3 = 12; //[8:0.01:200]
outside_shape3 = 100; //[3:1:100]
inside_shape3 = 100; //[3:1:100]

/* [Branch 4] */
Show_branch4 = true;
angleX_branch4 = 180; //[0:0.01:360]
angleY_branch4 = 84; //[0:0.01:360]
angleZ_branch4 = 60; //[0:0.01:360]
Rotate_branch4_Z = 0; //[0:0.01:360]
Rotate_branch4_inside = 0; //[0:0.01:360]
outside_diameter4 = 6;//[2:0.01:50]
inside_diameter4= 4; //[0:0.01:49]
length4 = 12; //[8:0.01:200]
outside_shape4 = 100; //[3:1:100]
inside_shape4 = 100; //[3:1:100]

/* [Branch 5] */
Show_branch5 = true;
angleX_branch5 = 0; //[0:0.01:360]
angleY_branch5 = 96; //[0:0.01:360]
angleZ_branch5 = 0; //[0:0.01:360]
Rotate_branch5_Z = 0; //[0:0.01:360]
Rotate_branch5_inside = 0; //[0:0.01:360]
outside_diameter5 = 6;//[2:0.01:50]
inside_diameter5= 4; //[0:0.01:49]
length5 = 12; //[8:0.01:200]
outside_shape5 = 100; //[3:1:100]
inside_shape5 = 100; //[3:1:100]

/* [Branch 6] */
Show_branch6 = true;
angleX_branch6 = 0; //[0:0.01:360]
angleY_branch6 = 264; //[0:0.01:360]
angleZ_branch6 = 0; //[0:0.01:360]
Rotate_branch6_Z = 0; //[0:0.01:360]
Rotate_branch6_inside = 0; //[0:0.01:360]
outside_diameter6 = 6;//[2:0.01:50]
inside_diameter6= 4; //[0:0.01:49]
length6 = 12; //[8:0.01:200]
outside_shape6 = 100; //[3:1:100]
inside_shape6 = 100; //[3:1:100]

module fitting_outside(){

if (Show_branch1)
rotate([Rotate_all_X,Rotate_all_Y,Rotate_all_Z])
rotate([angleX_branch1,angleY_branch1,angleZ_branch1])
rotate([0,0,Rotate_branch1_Z])
cylinder(h=length1,r1=outside_diameter1/2,r2=outside_diameter1/2,center=false,$fn=outside_shape1);
if (Show_branch2)
rotate([Rotate_all_X,Rotate_all_Y,Rotate_all_Z])
rotate([angleX_branch2,angleY_branch2,angleZ_branch2])
rotate([0,0,Rotate_branch2_Z])
cylinder(h=length2,r1=outside_diameter2/2,r2=outside_diameter2/2,center=false,$fn=outside_shape2);
if (Show_branch3)
rotate([Rotate_all_X,Rotate_all_Y,Rotate_all_Z])
rotate([angleX_branch3,angleY_branch3,angleZ_branch3])
rotate([0,0,Rotate_branch3_Z])
cylinder(h=length3,r1=outside_diameter3/2,r2=outside_diameter3/2,center=false,$fn=outside_shape3);
if (Show_branch4)
rotate([Rotate_all_X,Rotate_all_Y,Rotate_all_Z])
rotate([angleX_branch4,angleY_branch4,angleZ_branch4])
rotate([0,0,Rotate_branch4_Z])
cylinder(h=length4,r1=outside_diameter4/2,r2=outside_diameter4/2,center=false,$fn=outside_shape4);
if (Show_branch5)
rotate([Rotate_all_X,Rotate_all_Y,Rotate_all_Z])
rotate([angleX_branch5,angleY_branch5,angleZ_branch5])
rotate([0,0,Rotate_branch5_Z])
cylinder(h=length5,r1=outside_diameter5/2,r2=outside_diameter5/2,center=false,$fn=outside_shape5);
if (Show_branch6)
rotate([Rotate_all_X,Rotate_all_Y,Rotate_all_Z])
rotate([angleX_branch6,angleY_branch6,angleZ_branch6])
rotate([0,0,Rotate_branch6_Z])
cylinder(h=length6,r1=outside_diameter6/2,r2=outside_diameter6/2,center=false,$fn=outside_shape6);
}
//
module fitting_inside(){

if (Show_branch1)
rotate([Rotate_all_X,Rotate_all_Y,Rotate_all_Z])
rotate([angleX_branch1,angleY_branch1,angleZ_branch1])
rotate([0,0,Rotate_branch1_inside])
cylinder(h=length1+1,r1=inside_diameter1/2,r2=inside_diameter1/2,center=false,$fn=inside_shape1);
if (Show_branch2)
rotate([Rotate_all_X,Rotate_all_Y,Rotate_all_Z])
rotate([angleX_branch2,angleY_branch2,angleZ_branch2])
rotate([0,0,Rotate_branch2_inside])
cylinder(h=length2+1,r1=inside_diameter2/2,r2=inside_diameter2/2,center=false,$fn=inside_shape2);
if (Show_branch3)
rotate([Rotate_all_X,Rotate_all_Y,Rotate_all_Z])
rotate([angleX_branch3,angleY_branch3,angleZ_branch3])
rotate([0,0,Rotate_branch3_inside])
cylinder(h=length3+1,r1=inside_diameter3/2,r2=inside_diameter3/2,center=false,$fn=inside_shape3);
if (Show_branch4)
rotate([Rotate_all_X,Rotate_all_Y,Rotate_all_Z])
rotate([angleX_branch4,angleY_branch4,angleZ_branch4])
rotate([0,0,Rotate_branch4_inside])
cylinder(h=length4+1,r1=inside_diameter4/2,r2=inside_diameter4/2,center=false,$fn=inside_shape4);
if (Show_branch5)
rotate([Rotate_all_X,Rotate_all_Y,Rotate_all_Z])
rotate([angleX_branch5,angleY_branch5,angleZ_branch5])
rotate([0,0,Rotate_branch5_inside])
cylinder(h=length5+1,r1=inside_diameter5/2,r2=inside_diameter5/2,center=false,$fn=inside_shape5);
if (Show_branch6)
rotate([Rotate_all_X,Rotate_all_Y,Rotate_all_Z])
rotate([angleX_branch6,angleY_branch6,angleZ_branch6])
rotate([0,0,Rotate_branch6_inside])
cylinder(h=length6+1,r1=inside_diameter6/2,r2=inside_diameter6/2,center=false,$fn=inside_shape6);
}
//

if (Show_fitting){
difference(){
rotate([0,0,Rotate_center])
scale([Scale_center_x,Scale_center_y,Scale_center_z])
sphere(center_diameter,$fn=center_shape);
fitting_inside();
}
difference(){
fitting_outside();
fitting_inside();
}}
//

By setting the center shape to either 5 or 6 it is easy to align the branches to the correct  angle, and the center can be made smooth so it  won't cause damage to the plastic covering of the dome:

finished print sized for aluminum drinking straws

Then the tilt angle of the branches can be adjusted to  whatever angle is needed for the dome and the center of the hubs can be changed to accommodate pretty much any shape of tubing you would want to use.