examples/python/ocl_stl2ocl_tst.py
raw| 1 | from opencamlib import ocl, camvtk |
| 2 | |
| 3 | if __name__ == "__main__": |
| 4 | s= ocl.STLSurf() |
| 5 | print(s) |
| 6 | myscreen = camvtk.VTKScreen() |
| 7 | stl = camvtk.STLSurf("../../stl/demo.stl") |
| 8 | print("STL surface read") |
| 9 | myscreen.addActor(stl) |
| 10 | stl.SetWireframe() |
| 11 | |
| 12 | polydata = stl.src.GetOutput() |
| 13 | camvtk.vtkPolyData2OCLSTL(polydata, s) |
| 14 | |
| 15 | print(s) |
| 16 | myscreen.render() |
| 17 | myscreen.iren.Start() |
| 18 | |
| 19 | #raw_input("Press Enter to terminate") |