// AngelCAD code: pyramid_round.as
pos3d@ p(double x, double y, double z) { return pos3d(x,y,z);}
shape@ main_shape()
{
// pyramid dimensions
double x = 50;
double y = 50;
double z = 50;
// radius of rounding sphere
double r=4;
// triangular pyramid
array<pos3d@> pnts = {p(-x+r, -y+r, 0+r),
p( x-r, -y+r, 0+r),
p( 0 , y-r, 0+r),
p( 0 , 0, z-r)
};
solid@ pyramid = polyhedron(pnts);
// if radius greater than zero, run minkowski
if(r>0) return minkowski3d(pyramid,sphere(r));
else return pyramid;
}
void main()
{
shape@ obj = main_shape();
obj.write_xcsg(GetInputFullPath(),secant_tolerance:0.01);
}
Last active
April 26, 2019 18:42
-
-
Save arnholm/248d9a14e92b05ab8942d5f9a6611851 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment