scad/voussoir/triangles.scad

40 lines
672 B
OpenSCAD
Raw Normal View History

2022-01-04 22:51:17 +00:00
module right_triangle(width, height, center=false)
{
if (center)
{
polygon([
[-width/2, -height/2],
[width/2, -height/2],
[width/2, height/2]
]);
}
else
{
polygon([
[0, 0],
[width, 0],
[0, height]
]);
}
}
module isoscelese_triangle(width, height, center=false)
{
if (center)
{
polygon([
[-width/2, -height/2],
[0, height/2],
[width/2, -height/2]
]);
}
else
{
polygon([
[0, 0],
[width, 0],
[width/2, height]
]);
}
}