Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A suggestion of a solid with a square, hexagon, and circle orthogonal projections.
radius = 20;
hexradius = radius * cos(15);
intersection()
{
translate([0,0,-radius])
{
linear_extrude(height=2*radius)
{
rotate([0,0,15])
{
polygon([
[radius, 0],
[radius * cos(60), radius * sin(60)],
[radius * cos(120), radius * sin(120)],
[radius * cos(180), radius * sin(180)],
[radius * cos(240), radius * sin(240)],
[radius * cos(300), radius * sin(300)]
]);
}
}
}
rotate([90,0,0])
{
translate([0,0,-radius])
{
cylinder(2*radius,hexradius,hexradius);
}
}
rotate([0,90,0])
{
translate([0,0,-radius])
{
linear_extrude(height=2*radius)
{
polygon([
[hexradius,0],
[0,hexradius],
[-hexradius,0],
[0,-hexradius]
]);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.