I would like to cut out a pyramid from the sphere with the following but somehow I am missing something due to an error "RegionDifference object is not a correctly specified region" Ultimately I would like to export this as an stl file.
Graphics3D[{Sphere[{0, 0, 1}],
Pyramid[{{0, 0, 0}, {1, 0, 0}, {1, 1, 0}, {0, 1, 0}, {0, 0, 2}}]}]
reg1 = Graphics3D[
Pyramid[{{0, 0, 0}, {1, 0, 0}, {1, 1, 0}, {0, 1, 0}, {0, 0, 2}}]]
reg2 = Graphics3D[Sphere[{0, 0, 1}]]
rr = RegionDifference[reg2, reg1];
RegionPlot3D[rr, PlotPoints -> 100]