ピラミッドを建てます。
BRepPrimAPI_MakeWedge()を使用します。くさび型を作る際にも使用しましたね。
はい。ピラミッド。

中身はこんな感じです
from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakeWedge
from OCC.Core.BRepFilletAPI import BRepFilletAPI_MakeFillet
from OCC.Display.SimpleGui import init_display
display, start_display, add_menu, add_function_to_menu = init_display()
def make_pyramid( length ):
dx = dy = dz = length
pyramid = BRepPrimAPI_MakeWedge( dx, dy, dz, dx/2, dz/2, dx/2, dz/2 ).Shape()
return pyramid
if __name__ == '__main__':
# pyramid
pyramid = make_pyramid( 100 )
display.DisplayShape(pyramid,update=True)
start_display()