initial commit
This commit is contained in:
parent
3a1e1cf8b5
commit
02d865c730
1 changed files with 118 additions and 0 deletions
118
polyhaus.scad
Normal file
118
polyhaus.scad
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
// The Parameters of the House
|
||||
// all in mm
|
||||
level=3500;
|
||||
wallstrength=500;
|
||||
ceilingstrength=300;
|
||||
floorstrength=200;
|
||||
ringdiameter=14000;
|
||||
ringstrength=2500;
|
||||
garagediameter=ringdiameter+2000;
|
||||
garageheigth=4000;
|
||||
sides=6;
|
||||
|
||||
// The House Modules
|
||||
module ngon(
|
||||
diameter=5,
|
||||
height=level)
|
||||
{
|
||||
cylinder(
|
||||
h=height,
|
||||
r=diameter/2,
|
||||
$fn=6
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
module garage(
|
||||
garageheigth=garageheigth,
|
||||
garagediameter=garagediameter)
|
||||
{
|
||||
//color([0.1,0.1,1])
|
||||
#translate(
|
||||
[0,0,-garageheigth]) {
|
||||
living(
|
||||
floorheight=2*floorheigth,
|
||||
ceilingheigth=2*ceilingheigth
|
||||
)
|
||||
};
|
||||
};
|
||||
};
|
||||
module ring(
|
||||
ringdiameter=ringdiameter,
|
||||
ringstrength=ringstrength,
|
||||
ringheigth=level
|
||||
)
|
||||
{
|
||||
difference() {
|
||||
ngon(
|
||||
height=ringheigth,
|
||||
diameter=ringdiameter,
|
||||
$fn=6);
|
||||
%translate ([0,0, -1]) ngon(
|
||||
height=ringheigth+2,
|
||||
diameter=ringdiameter-ringstrength,
|
||||
$fn=6);
|
||||
};
|
||||
};
|
||||
module living(
|
||||
ringdiameter=ringdiameter,
|
||||
ringstrength=ringstrength,
|
||||
ringheigth=level,
|
||||
floorstrength=floorstrength,
|
||||
ceilingstrength=ceilingstrength,
|
||||
wallstrength=wallstrength,
|
||||
{
|
||||
#difference() {
|
||||
%ring();
|
||||
translate([0,0,+floorstrength])
|
||||
ring(ringdiameter=ringdiameter-wallstrength,
|
||||
ringstrength=ringstrength-2*wallstrength,
|
||||
ringheigth=level-floorstrength-ceilingstrength);
|
||||
};
|
||||
};
|
||||
|
||||
outer_wall_woodwidth=50;
|
||||
|
||||
outer_wall_strawwidth=50;
|
||||
module outer_wall(
|
||||
ringdiameter=ringdiameter,
|
||||
ringstrength=ringstrength,
|
||||
ringheigth=level,
|
||||
floorstrength=floorstrength,
|
||||
|
||||
ceilingstrength=ceilingstrength)
|
||||
|
||||
{
|
||||
side_length=;
|
||||
radius_in_circle=;
|
||||
elements=floor(sidelength/(outer_wall_woodwidth+outer_wall_strawwidth));
|
||||
for (side in [1:sides])
|
||||
{
|
||||
if (elements%2==1)
|
||||
{
|
||||
//center the middle one
|
||||
for (spar in [0:elements])
|
||||
{
|
||||
translate (
|
||||
[0,
|
||||
radius_inner_circle,
|
||||
spar*(outer_wall_woodwidth+outer_wall_strawwidth
|
||||
]) spar();
|
||||
translate (
|
||||
[0,
|
||||
radius_inner_circle,
|
||||
-spar*(outer_wall_woodwidth+outer_wall_strawwidth
|
||||
]) spar();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
living();
|
||||
|
||||
translate([0,0,level]) living();
|
||||
garage();
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue