예제 #1
0
import ocl
import camvtk
import time
import vtk
import datetime
import math

if __name__ == "__main__":
    print(ocl.version())
    i = ocl.Interval()
    print(i)
    i = ocl.Interval(0.123, 0.456)
    print(i)
    cc = ocl.CCPoint(1, 2, 3)
    cc.type = ocl.CCType.VERTEX
    i.updateLower(-0.222, cc)
    print(i)
    i.updateLower(0, cc)
    print(i)
    i.updateUpper(0, cc)
    print(i)
    i.updateUpper(2, cc)
    print(i)
예제 #2
0
    #cutter = ocl.BallCutter(0.532,5)
    cutter = ocl.CylCutter(0.3, 5)

    #cutter = ocl.CylConeCutter(0.2,0.5,math.pi/9)
    #cutter = ocl.BallConeCutter(0.4,0.6,math.pi/9)
    #cutter = ocl.BullConeCutter(0.4,0.1,0.7,math.pi/6)
    #cutter = ocl.ConeConeCutter(0.4,math.pi/3,0.7,math.pi/6)
    #cutter = ocl.ConeCutter(0.4, math.pi/3)

    print "fiber..."

    f = ocl.Fiber(f1, f2)
    i = ocl.Interval()
    f.printInts()
    print "vertexPush"
    cc = ocl.CCPoint()
    cutter.pushCutter(f, i, t)
    print i
    f.addInterval(i)
    print "AFTER vertexPush"
    f.printInts()

    #inter = f.getInts()
    #print inter
    print "done."

    print "rendering..."
    drawFiber(myscreen, f)
    print "done."
    origo = camvtk.Sphere(center=(0, 0, 0), radius=0.1, color=camvtk.blue)
    origo.SetOpacity(0.2)
예제 #3
0
import ocl

print ocl.revision()

p = ocl.Point(1,2,3)
print p
cc = ocl.CCPoint(4,5,6)
print cc
cl = ocl.CLPoint()
print cl
cl2 = ocl.CLPoint(7,8,9)
print cl2
cl3 = ocl.CLPoint(10,11,12,cc)
print cl3
cc.x=77
print cl3