资源简介
RSoft 光学仿真软件 解压即可用 包括BeamPROP、FullWAVE、BandSOLVE、GratingMOD、DiffractMOD、FemSIM, 以及MOST软件。
代码片段和文件信息
#!/usr/bin/env python
import sys traceback re
__HAS_TK = 0
def print_msg(msg):
if __HAS_TK:
tkMessageBox.showinfo(“Information“ msg)
print msg
else:
print msg
def print_err(msg):
if __HAS_TK:
tkMessageBox.showerror(“ERROR“ msg)
print msg
else:
print msg
def exception ():
“““ This function handles any exception derived from Exception and
prints it out in a message box. Code merrily stolen from the
Thinking in Python site.“““
try:
type value tb = sys.exc_info ()
info = traceback.extract_tb (tb)
filename lineno function text = info[-1] # last line only
print_err (“Exception: %s:%d: %s: %s (in %s)“ %\
(filename lineno type.__name__ str (value) function))
finally:
type = value = tb = None # clean up
print_msg(“Testing if Tkinter is available... “)
try:
import Tkinter
except ImportError:
msg = “Sorry Tkinter does not appear to be available.\n“\
“Please check your Python installation. “\
“It is possible that you have not installed Tcl/Tk and Tkinter.“\
“Please visit http://www.python.org for more details.“
print_err(msg)
sys.exit(1)
else:
import tkMessageBox
print_msg(“OK - you have Tkinter“)
print_msg(“TclVersion = %s TkVersion = %s“%(Tkinter.TclVersion
Tkinter.TkVersion))
__HAS_TK = 1
def test_vtk_cone():
import vtkpython
msg = “““Testing a sample vtk program. You should see a 300x300
pixel window with a black background and with a magenta coloured
Cone. You can interact with the cone using the mouse. To quit
the test press q on the window. If this test is successful then
the basic vtkpython installation is OK.“““
print_msg (re.sub(‘\s+‘ ‘ ‘ msg))
# create a rendering window and renderer
ren = vtkpython.vtkRenderer()
renWin = vtkpython.vtkRenderWindow()
renWin.AddRenderer(ren)
iren = vtkpython.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
# create an actor and give it cone geometry
cone = vtkpython.vtkConeSource()
cone.SetResolution(40)
coneMapper = vtkpython.vtkPolyDataMapper()
coneMapper.SetInput(cone.GetOutput())
coneActor = vtkpython.vtkActor()
coneActor.SetMapper(coneMapper)
coneActor.GetProperty ().SetColor (0.5 0.5 1.0)
ren.AddActor(coneActor)
# enable user interface interactor
iren.Initialize()
iren.Start()
def test_vtk_tk_render_widget(root):
import vtkpython
from vtkRenderWidget import vtkTkRenderWidget
msg = “““Testing a sample vtk program that uses the
vtkTkRenderWidget. You should see a 300x300 pixel window with a
black background and with a magenta coloured Cone. You can
interact with the cone using the mouse. To quit the test press q
on the window. If this test is successful then
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 7425 2006-09-12 09:08 RSoft\examples\ring3.ind
文件 6377 2006-09-17 21:24 RSoft\examples\log.txt
文件 8871 2006-09-14 10:22 RSoft\examples\p.ind
文件 1516123 2006-09-17 21:24 RSoft\examples\bptmp.vtk
文件 962 2006-09-15 20:31 RSoft\examples\grat_fiber.ind
文件 970 2006-09-15 20:32 RSoft\examples\grtmp.run
文件 447 2006-09-15 20:32 RSoft\examples\grtmp_log.txt
文件 307 2006-09-15 20:32 RSoft\examples\grtmp.pcs
文件 18458 2006-09-15 20:32 RSoft\examples\grtmp.dat
文件 12110 2006-09-15 20:32 RSoft\examples\grtmp_sel.dat
文件 452 2006-09-15 20:32 RSoft\examples\grtmp_post.pcs
文件 872 2006-09-15 20:35 RSoft\examples\grat2.ind
文件 1264 2004-04-22 11:00 RSoft\examples\DiffractMOD\Tutorial\Tut4\checkerboard3d.ind
目录 0 2007-10-26 17:34 RSoft\examples\DiffractMOD\Tutorial\Tut4
文件 1520 2004-04-22 11:00 RSoft\examples\DiffractMOD\Tutorial\Tut3\me
目录 0 2007-10-26 17:34 RSoft\examples\DiffractMOD\Tutorial\Tut3
文件 1628 2004-04-22 11:00 RSoft\examples\DiffractMOD\Tutorial\Tut2\filter.ind
目录 0 2007-10-26 17:34 RSoft\examples\DiffractMOD\Tutorial\Tut2
文件 1081 2004-04-22 11:00 RSoft\examples\DiffractMOD\Tutorial\Tut1\antiref.ind
目录 0 2007-10-26 17:34 RSoft\examples\DiffractMOD\Tutorial\Tut1
目录 0 2007-10-26 17:34 RSoft\examples\DiffractMOD\Tutorial
目录 0 2007-10-26 17:34 RSoft\examples\DiffractMOD
文件 14438 2003-02-10 17:00 RSoft\examples\GratingMOD\Tutorial\TutS4\grating3.dat
文件 846 2003-04-16 14:10 RSoft\examples\GratingMOD\Tutorial\TutS4\grating3.ind
文件 328 2003-04-16 14:11 RSoft\examples\GratingMOD\Tutorial\TutS4\grating3_inv.ind
目录 0 2007-10-26 17:34 RSoft\examples\GratingMOD\Tutorial\TutS4
文件 804 2003-04-16 14:10 RSoft\examples\GratingMOD\Tutorial\TutS3\constdsp.ind
目录 0 2007-10-26 17:34 RSoft\examples\GratingMOD\Tutorial\TutS3
文件 109 2002-03-04 11:00 RSoft\examples\GratingMOD\Tutorial\TutS2\two_chnl.dat
文件 553 2003-04-16 14:10 RSoft\examples\GratingMOD\Tutorial\TutS2\two_chnl.ind
............此处省略1552个文件信息
相关资源
- 单片机仿真软件proteus6.7免安装绿色版
- 免费、免安装、超级简单的画户型图
- 监控DAV播放器纯绿色免安装版
- 飞秋绿色免安装
- AUDITION 1.5汉化增强免安装版
- CuteFTP8.0绿色破解版免安装无需序列号
- SoapUI-5.3.0(免安装版).zip
- 录屏大师电脑录屏软件绿色免安装电
- fiddler 免安装
- Google Chrome 49.0.2623.110 便携版(免安装
- masm611免安装
- CAD图纸转T3格式,免安装
- 音速启动(VStart)绿色免安装版 v6.
- IDM6.31.3绿色免安装版
- Rsoft_beamprop
- 一款非常小巧的pdf编辑器,可以对p
- RSOFT教程学习
- RSoft资料Rsof简介以及仿真指导书.zip
- 1stOPT 1.5 免安装绿色版加教程
- 论文查重软件
- source insight4.0免安装
- PDF编辑软件破解版 修改PDF文件免安装
- Rsoft完全教程
- tomcat6.0.20免安装版
- DULDUL哈语输入法免安装版
- Magma纯绿色免安装包
- RSoft软件.part5.rar
- uninstall破解工具
- VCE1.16.zip
- Axure RP Pro 7.0中文破解绿色免安装版
评论
共有 条评论