Python3から呼び出せるWindows 64bit用のDLLです。
共通DLL
SprDepend64Dll.zip と Pythonのバージョンに合ったSpr.pydをPythonXX/Dllsの下に置いてください。
GLUTの問題でグラフィクス表示ができなかったのですが、マルチスレッドにして表示できるようにしました。 以下のサンプルでは、app.InitInNewThread()が、GLUTを動かすために、別のスレッドを作ってglutMainLoop()を呼び出しています。
import time
from Spr import *
app = EPApp()
app.InitInNewThread()
time.sleep(1)
fwSdk = FWSdk()
fwSdk = app.GetSdk()
phSdk = PHSdk()
phSdk = fwSdk.GetPHSdk()
fwScene = fwSdk.GetScene()
phScene = PHScene()
phScene = fwScene.GetPHScene()
spd=CDSphereDesc()
sp=CDSphere()
sp=phSdk.CreateShape(sp.GetIfInfoStatic(), spd)
s1 = PHSolid()
s1 = phScene.CreateSolid()
s1.AddShape(sp)
s2 = PHSolid()
s2 = phScene.CreateSolid()
s2.AddShape(sp)
s2.SetFramePosition(Vec3d(0.1,0,0))
fwScene.EnableRenderGrid(False, True, False)
win = FWWin()
win = app.GetCurrentWin()
win.GetTrackball().SetPosition(Vec3f(0,10,10))
win.GetTrackball().SetTarget(Vec3f(0,0,0))
for i in range(100):
phScene.Step()
app.PostRedisplay()
time.sleep(0.03)
ドキュメント http://springhead.info/dailybuild/generated/doc/Springhead.pdf の「第 13 章 Python 言語との連携」を見てください。