def createApp(win): # - Frame - Frame = TK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkOutOfCore', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Push blocks out/in core memory.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) WIDGETS['frame'] = Frame FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkOutOfCore') WIDGETS['frameMenu'] = FrameMenu # - IN/OUT - B = TK.Button(Frame, text="IN Core", command=inCore) B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Get the selection in core memory.') B = TK.Button(Frame, text="OUT of Core", command=outCore) B.grid(row=0, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Get the selection out of core memory.')
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkInit', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Init solution fields.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event : Frame.focus_set()) Frame.columnconfigure(0, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkInit') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- Zone filter regexp - #V = TK.StringVar(win); V.set(''); VARS.append(V) # - Init solution - B = TTK.Button(Frame, text="Initialize solution from state", command=initSolution) B.grid(row=0, column=0, columnspan=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Initialize the solution in centers (require state).') # - Init wall distances - B = TTK.Button(Frame, text="Initialize wall distances", command=initWallDistance) B.grid(row=1, column=0, columnspan=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Compute wall distances.')
def createApp(win): ttk = CTK.importTtk() # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkCamera', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Display mesh informations.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event : Frame.focus_set()) Frame.columnconfigure(0, weight=0) Frame.columnconfigure(1, weight=3) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkCamera') WIDGETS['frameMenu'] = FrameMenu #- VARS - # -0- posCam - V = TK.StringVar(win); V.set('(0., 0., 0.)'); VARS.append(V) # -1- posEye - V = TK.StringVar(win); V.set('(0., 0.; 0.)'); VARS.append(V) # -2- dirCam - V = TK.StringVar(win); V.set('(0., 0., 0.)'); VARS.append(V) # - posCam - B = TTK.Label(Frame, text="posCam: ") B.grid(row=0, column=0, columnspan=1, sticky=TK.EW) B = TTK.Entry(Frame, textvariable=VARS[0], background='White', width=15) B.grid(row=0, column=1, columnspan=1, sticky=TK.EW) B.bind('<Return>', setInfo) BB = CTK.infoBulle(parent=B, text='Camera position.') # - posEye - B = TTK.Label(Frame, text="posEye: ") B.grid(row=1, column=0, columnspan=1, sticky=TK.EW) B = TTK.Entry(Frame, textvariable=VARS[1], background='White', width=15) B.grid(row=1, column=1, columnspan=1, sticky=TK.EW) B.bind('<Return>', setInfo) BB = CTK.infoBulle(parent=B, text='Eye position.') # - dirCam - B = TTK.Label(Frame, text="dirCam: ") B.grid(row=2, column=0, columnspan=1, sticky=TK.EW) B = TTK.Entry(Frame, textvariable=VARS[2], background='White', width=15) B.grid(row=2, column=1, columnspan=1, sticky=TK.EW) B.bind('<Return>', setInfo) BB = CTK.infoBulle(parent=B, text='Camera direction.') # - get - B = TTK.Button(Frame, text="Get", command=getInfo) B.grid(row=3, column=1, columnspan=1, sticky=TK.EW) # - set - B = TTK.Button(Frame, text="Set", command=setInfo) B.grid(row=3, column=0, columnspan=1, sticky=TK.EW)
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkDraw', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Drawing tools.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event : Frame.focus_set()) Frame.columnconfigure(0, weight=2) Frame.columnconfigure(1, weight=2) Frame.columnconfigure(2, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) FrameMenu.add_command(label='Save', command=saveApp) FrameMenu.add_command(label='Reset', command=resetApp) CTK.addPinMenu(FrameMenu, 'tkDraw') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- Figure type - V = TK.StringVar(win); V.set('Line'); VARS.append(V) if 'tkDrawType' in CTK.PREFS: V.set(CTK.PREFS['tkDrawType']) # -1- Npts - V = TK.StringVar(win); V.set('10'); VARS.append(V) if 'tkDrawNpts' in CTK.PREFS: V.set(CTK.PREFS['tkDrawNpts']) # -2- underlaying surface V = TK.StringVar(win); V.set(''); VARS.append(V) # - Surface - B = TTK.Button(Frame, text="Surf", command=setSurface, image=iconics.PHOTO[8], compound=TK.RIGHT, padx=0, pady=0) B.grid(row=0, column=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Set underlaying model surfaces (you draw onto).') B = TTK.Entry(Frame, textvariable=VARS[2], background='White') B.grid(row=0, column=0, columnspan=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Underlaying model surfaces.') # - Figure type - B = TTK.OptionMenu(Frame, VARS[0], 'Line', 'Circle', 'Circular arc', 'Rectangle', 'Polyline', 'Cubic', 'Free hand') BB = CTK.infoBulle(parent=B, text='Type of drawing.') B.grid(row=1, column=0, sticky=TK.EW) # - Npts - B = TTK.Entry(Frame, textvariable=VARS[1], background='White', width=7) B.grid(row=1, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Number of points.') # - Draw - B = TTK.Button(Frame, text="Draw", command=draw) B.grid(row=1, column=2, columnspan=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Click to start to draw. Click again to end.') WIDGETS['draw'] = B
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkBoolean', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Boolean operations\on surfaces.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(1, weight=2) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkBoolean') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- tolerance - V = TK.StringVar(win) V.set('0.') VARS.append(V) # - Tolerance - B = TTK.Label(Frame, text='Tolerance') B.grid(row=0, column=0, sticky=TK.EW) B = TTK.Entry(Frame, textvariable=VARS[0], background='White', width=5) B.grid(row=0, column=1, sticky=TK.EW) BB = CTK.infoBulle( parent=B, text= 'Tolerance used in boolean operations.\n0. means automatic setting.') # - Union - B = TTK.Button(Frame, text="Union", command=union) B.grid(row=1, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Union of two surfaces.') # - Difference - B = TTK.Button(Frame, text="Difference", command=difference) B.grid(row=1, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Difference of two surfaces.') # - Intersection - B = TTK.Button(Frame, text="Intersection", command=intersection) B.grid(row=2, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Intersect two surfaces.') # - Rev. Difference - B = TTK.Button(Frame, text="Rev. Diff", command=difference2) B.grid(row=2, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Reversed difference of two surfaces.')
def createApp(win): # - Frame - Frame = TK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkExtension', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Surface extension.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) WIDGETS['frame'] = Frame # - VARS - # -0- Surface to extend - V = TK.StringVar(win) V.set('') VARS.append(V) # -1- Hauteur de chaque maille - V = TK.StringVar(win) V.set('1.e-1') VARS.append(V) # -2- Nombre de layers a ajouter V = TK.StringVar(win) V.set('1') VARS.append(V) # -3- Nombre d'iterations de lissage V = TK.StringVar(win) V.set('0') VARS.append(V) # - Surface - B = TK.Button(Frame, text="Ref surf", command=setSurface) B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Reference surface.') B = TK.Entry(Frame, textvariable=VARS[0], background='White') B.grid(row=0, column=1, columnspan=2, sticky=TK.EW) # - Extension data B = TK.Entry(Frame, textvariable=VARS[1], background='White', width=5) B.grid(row=2, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Height of each layer.') B = TK.Entry(Frame, textvariable=VARS[2], background='White', width=5) B.grid(row=2, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Number of layers.') B = TK.Entry(Frame, textvariable=VARS[3], background='White', width=5) B.grid(row=2, column=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Number of smoothing iterations.') # Extend surface starting from contour B = TK.Button(Frame, text="Extend", command=extendSurf) B.grid(row=3, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Extend.')
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkFilterSurfs', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Filter or offset a surface.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event : Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(1, weight=2) Frame.columnconfigure(2, weight=2) Frame.columnconfigure(3, weight=0) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) FrameMenu.add_command(label='Save', command=saveApp) FrameMenu.add_command(label='Reset', command=resetApp) CTK.addPinMenu(FrameMenu, 'tkFilterSurfs') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- Point density - V = TK.StringVar(win); V.set('1.'); VARS.append(V) if 'tkFilterSurfsDensity' in CTK.PREFS: V.set(CTK.PREFS['tkFilterSurfsDensity']) # -1- Offset - V = TK.StringVar(win); V.set('0.'); VARS.append(V) if 'tkFilterSurfsOffset' in CTK.PREFS: V.set(CTK.PREFS['tkFilterSurfsOffset']) # -2- Algorithm cart/octree V = TK.StringVar(win); V.set('0'); VARS.append(V) if 'tkFilterSurfsType' in CTK.PREFS: V.set(CTK.PREFS['tkFilterSurfsType']) # - Point density - B = TTK.Label(Frame, text="density/offset") B.grid(row=0, column=0, sticky=TK.EW) B = TTK.Entry(Frame, textvariable=VARS[0], background='White', width=8) B.grid(row=0, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Point density (npts/length unit).') # - Offset - B = TTK.Entry(Frame, textvariable=VARS[1], background='White', width=8) B.grid(row=0, column=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Distance of surface offset.') # - Algorithm - B = TTK.Checkbutton(Frame, text='', variable=VARS[2]) B.grid(row=0, column=3, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Toggle octree algorithm.') # - Remap - B = TTK.Button(Frame, text="Filter/offset", command=remap) BB = CTK.infoBulle(parent=B, text='Remap/offset a surface with a given spacing.') B.grid(row=2, column=0, columnspan=4, sticky=TK.EW)
def createApp(win): # - Frame - Frame = TK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkHats', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Fix holes with hats.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) WIDGETS['frame'] = Frame # - VARS - # -0- close bodies - V = TK.StringVar(win) V.set('stitchedHat') VARS.append(V) # -1- stitchedHat : eps; eps2 V = TK.StringVar(win) V.set('1.e-5;1.e-5') VARS.append(V) # -2- stitchedHat : offx,offy,offz V = TK.StringVar(win) V.set('0.;0.;0.') VARS.append(V) # -3- pointedHat : x,y,z V = TK.StringVar(win) V.set('0.;0.;0.') VARS.append(V) # - create hat - B = TK.Button(Frame, text="Create hat", command=closeBody) B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Close selected contour with hat.') B = TK.OptionMenu(Frame, VARS[0], 'stitchedHat', 'pointedHat') B.grid(row=0, column=1, sticky=TK.EW) B = TK.Label(Frame, text="eps;eps2") B.grid(row=1, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Tolerances for stitchedHat.') B = TK.Entry(Frame, textvariable=VARS[1]) B.grid(row=1, column=1, sticky=TK.EW) B = TK.Label(Frame, text="offx;offy;offz") B.grid(row=2, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Offsets for stitchedHat.') B = TK.Entry(Frame, textvariable=VARS[2]) B.grid(row=2, column=1, sticky=TK.EW) B = TK.Label(Frame, text="x0;y0;z0") B.grid(row=3, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Coordinates of top of pointed hat.') B = TK.Entry(Frame, textvariable=VARS[3]) B.grid(row=3, column=1, sticky=TK.EW)
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkPovRay', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Export to povRay ray tracer.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event : Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(1, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) FrameMenu.add_command(label='Save', command=saveApp) FrameMenu.add_command(label='Reset', command=resetApp) CTK.addPinMenu(FrameMenu, 'tkPovRay') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- background - V = TK.StringVar(win); V.set('Black'); VARS.append(V) if 'tkPovRayBackground' in CTK.PREFS: V.set(CTK.PREFS['tkPovRayBackground']) # -1- Image size V = TK.StringVar(win); V.set('800x600'); VARS.append(V) if 'tkPovRaySize' in CTK.PREFS: V.set(CTK.PREFS['tkPovRaySize']) # -2- Dir name (file.pov et file.png) V = TK.StringVar(win); V.set('PovRay'); VARS.append(V) if 'tkPovRayOutput' in CTK.PREFS: V.set(CTK.PREFS['tkPovRayOutput']) # - File - B = TTK.Entry(Frame, textvariable=VARS[2], background='White') B.grid(row=0, column=0, columnspan=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Directory name for output (.pov and .png).') # - Background selection - B = TTK.OptionMenu(Frame, VARS[0], 'Black', 'White', 'Blue sky', 'Cloudy sky', 'Starfield' ) B.grid(row=1, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Output background.') # - Image size - B = TTK.OptionMenu(Frame, VARS[1], '320x200', '800x600', '1024x768', '1600x1200') B.grid(row=1, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Image resolution.') # - Render scene - B = TTK.Button(Frame, text="Render scene", command=render) B.grid(row=2, column=0, columnspan=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Render pov scene.')
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkProjection', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Project meshes on surface meshes.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=2) Frame.columnconfigure(1, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkProjection') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- Projection surface - V = TK.StringVar(win) V.set('') VARS.append(V) # - Surface - B = TTK.Button(Frame, text="Proj. surf", command=setSurface, image=iconics.PHOTO[8], padx=0, pady=0, compound=TK.RIGHT) B.grid(row=0, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Set projection surfaces.') B = TTK.Entry(Frame, textvariable=VARS[0], background='White') B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Projection surfaces.') # - Orthogonal projection - B = TTK.Button(Frame, text="Ortho project", command=orthoProject) B.grid(row=1, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Project selection orthogonally on a surface.') # - Dir projection - B = TTK.Button(Frame, text="Dir project", command=dirProject) B.grid(row=1, column=1, sticky=TK.EW) BB = CTK.infoBulle( parent=B, text='Project selection following eye direction on a surface.')
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkCells', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Per cell operation\non meshes.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(1, weight=4) Frame.columnconfigure(2, weight=0) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkCells') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- selection formula - V = TK.StringVar(win) V.set('') VARS.append(V) # -1- strict - V = TK.StringVar(win) V.set('0') VARS.append(V) # - Cells suppress/refine - B = TTK.Button(Frame, text="Suppress cell mode", command=suppressCells) B.grid(row=0, column=0, columnspan=3, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Suppress selected cell.') WIDGETS['suppress'] = B B = TTK.Button(Frame, text="Refine cell mode", command=refineCells) B.grid(row=1, column=0, columnspan=3, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Refine selected cell (TRI mesh only).') WIDGETS['refine'] = B # - Select cells - B = TTK.Button(Frame, text="SelectCells", command=selectCells) B.grid(row=2, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Select cells that matches formula.') B = TTK.Entry(Frame, textvariable=VARS[0], background='White') B.bind('<Return>', selectCells) BB = CTK.infoBulle(parent=B, text='Selection formula.') B.grid(row=2, column=1, sticky=TK.EW) B = TTK.Checkbutton(Frame, text='', variable=VARS[1]) BB = CTK.infoBulle(parent=B, text='Strict/not strict selection.') B.grid(row=2, column=2, sticky=TK.EW)
def createApp(win): # - Frame - Frame = TK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkPLM', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='PLM 2D automatic mesher.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkPLM') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- height of mesh - V = TK.StringVar(win) V.set('50.') VARS.append(V) # -1- height of first cell of mesh - V = TK.StringVar(win) V.set('0.1') VARS.append(V) # -2- grid point density - V = TK.StringVar(win) V.set('0.1') VARS.append(V) # - hf - B = TK.Entry(Frame, textvariable=VARS[1], background='White', width=5) B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Height of first cell.') # - h - B = TK.Entry(Frame, textvariable=VARS[0], background='White', width=5) B.grid(row=0, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Height of generated mesh.') # - density - B = TK.Entry(Frame, textvariable=VARS[2], background='White', width=5) B.grid(row=1, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Grid point density.') # - Generate - B = TK.Button(Frame, text="Generate", command=generatePLM) B.grid(row=1, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Generate PLM grid.')
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkGhostCells', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='My personal applet.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(1, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkGhostCells') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- number of layers of ghost cells - V = TK.StringVar(win) V.set('2') VARS.append(V) # -1- methode pour les coins - V = TK.StringVar(win) V.set('None') VARS.append(V) # - Number of ghost cell layers - B = TTK.Entry(Frame, textvariable=VARS[0], background='White', width=5) B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Number of ghost cell layers.') # - methode pour les coins - B = TTK.OptionMenu(Frame, VARS[1], 'None') B.grid(row=0, column=1, columnspan=1, sticky=TK.EW) # - add ghost cells - B = TTK.Button(Frame, text="Add", command=addGhostCells) B.grid(row=1, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Add layers of ghost cells.') # - rm ghost cells - B = TTK.Button(Frame, text="Rm", command=rmGhostCells) B.grid(row=1, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Rm layers of ghost cells.')
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkPoint', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Generate points.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=4) Frame.columnconfigure(1, weight=4) Frame.columnconfigure(2, weight=0) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkPoint') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- point coordinates - V = TK.StringVar(win) V.set('0;0;0') VARS.append(V) # - Buttons - B = TTK.Entry(Frame, textvariable=VARS[0], background='White', width=15) B.bind('<Return>', createPoint) B.grid(row=0, column=0, columnspan=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Point coordinates (x;y;z).') B = TTK.Button(Frame, image=iconics.PHOTO[8], command=getPointCoordinates, padx=0) B.grid(row=0, column=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Get point coordinates from mouse.') B = TTK.Button(Frame, text="Create", command=createPoint) B.grid(row=1, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Create a point.') B = TTK.Button(Frame, text="Modify", command=modifyPoint) B.grid(row=1, column=1, columnspan=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Modify point coordinate.')
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkRuler', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Take measures by clicking.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkRuler') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- Zone filter regexp - #V = TK.StringVar(win); V.set(''); VARS.append(V) # - Buttons - B = TTK.Button(Frame, text="Measure mode", command=measure) B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Click on two points to obtain the distance.') WIDGETS['button'] = B
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkStereo', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Set anaglyph mode.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=0) Frame.columnconfigure(1, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) FrameMenu.add_command(label='Save', command=saveApp) FrameMenu.add_command(label='Reset', command=resetApp) CTK.addPinMenu(FrameMenu, 'tkStereo') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- Stero mode - V = TK.StringVar(win) V.set('None') VARS.append(V) if 'tkStereoMode' in CTK.PREFS: V.set(CTK.PREFS['tkStereoMode']) # -1- Stereo dist info bulle V = TK.StringVar(win) V.set('Stereo distance.') VARS.append(V) # - Stereo mode - B = TTK.Label(Frame, text="Stereo") B.grid(row=0, column=0, sticky=TK.EW) B = TTK.OptionMenu(Frame, VARS[0], 'None', 'Anaglyph (b&w)', 'Anaglyph (color)', command=setStereo) B.grid(row=0, column=1, sticky=TK.EW) # - Stereo Dist - B = TTK.Scale(Frame, from_=0, to=100, orient=TK.HORIZONTAL, showvalue=0, borderwidth=1, command=setDist, value=50) WIDGETS['dist'] = B B.grid(row=1, columnspan=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, textVariable=VARS[1])
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkNGon', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Manage Polyhedral (NGON) meshes.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(1, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkNGon') WIDGETS['frameMenu'] = FrameMenu # - VARS - # - Convert2NGon - B = TTK.Button(Frame, text="Convert2NGon", command=convert2NGon) B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Convert selection to NGon.') # - Break Elements - B = TTK.Button(Frame, text="BreakElts", command=breakElts) B.grid(row=0, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Convert a NGon zone to basic elements.') # - Dual - B = TTK.Button(Frame, text="Dual", command=dual) B.grid(row=1, column=0, columnspan=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Compute the dual mesh of a NGon.') # - Conformize - B = TTK.Button(Frame, text="Conformize", command=conformize) B.grid(row=1, column=1, columnspan=1, sticky=TK.EW) BB = CTK.infoBulle( parent=B, text='Conformize a NGon (split faces to match hanging nodes).')
def createApp(win): # - Frame - Frame = TK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkFixer', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Fix holes in surfaces.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) WIDGETS['frame'] = Frame # - VARS - # -0- Contour to fix - V = TK.StringVar(win) V.set('') VARS.append(V) # -1- Surface of contour to fix V = TK.StringVar(win) V.set('') VARS.append(V) # - Contour - B = TK.Button(Frame, text="Contour", command=setContour) B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Set contour to fix.') B = TK.Entry(Frame, textvariable=VARS[0], background='White') B.grid(row=0, column=1, sticky=TK.EW) # - Surface - B = TK.Button(Frame, text="Surface", command=setSurface) B.grid(row=1, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Set surface to fix.') B = TK.Entry(Frame, textvariable=VARS[1], background='White') B.grid(row=1, column=1, sticky=TK.EW) # - Fix - B = TK.Button(Frame, text="Fix gap", command=fixGap) B.grid(row=2, column=0, columnspan=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Fix gap.')
def createApp(win): # - Frame - Frame = TK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkLogFile', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Manage python log file.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) WIDGETS['frame'] = Frame FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkLogFile') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- File name - V = TK.StringVar(win) V.set('SessionLog.py') VARS.append(V) # - FileName - B = TK.Entry(Frame, textvariable=VARS[0], background='White') BB = CTK.infoBulle(parent=B, text='Log file name.') B.grid(row=0, column=0, columnspan=3, sticky=TK.EW) # - Record - B = TK.Button(Frame, text="Record", command=record) B.grid(row=1, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Start a new recording session.') B = TK.Button(Frame, text="Pause", command=pause) B.grid(row=1, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Pause recording.') B = TK.Button(Frame, text="Stop", command=stop) B.grid(row=1, column=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Stop recording session.')
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkMeshQual', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Analyse mesh quality.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event : Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(1, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkMeshQual') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- Qual to compute - V = TK.StringVar(win); V.set('Volume map'); VARS.append(V) # -0- Filter for view - V = TK.StringVar(win); V.set('Mesh'); VARS.append(V) # - Compute - B = TTK.Button(Frame, text="Compute", command=computeQual) B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Compute this field. Tree is modified.') B = TTK.OptionMenu(Frame, VARS[0], 'Volume map', 'Orthogonality map', 'Regularity map') B.grid(row=0, column=1, sticky=TK.EW) # - View - B = TTK.Button(Frame, text="View", command=viewQual) B.grid(row=1, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='View this filter.') B = TTK.OptionMenu(Frame, VARS[1], 'Mesh', 'Neg. volume cells') B.grid(row=1, column=1, sticky=TK.EW)
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkReorder', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Reorder blocks.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event : Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(1, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkReorder') WIDGETS['frameMenu'] = FrameMenu # -0- Transformation de i - V = TK.StringVar(win); V.set('I -> I'); VARS.append(V) # -1- Transformation de j - V = TK.StringVar(win); V.set('J -> J'); VARS.append(V) # -2- Transformation de k - V = TK.StringVar(win); V.set('K -> K'); VARS.append(V) # - Index switch for structured grids B = TTK.OptionMenu(Frame, VARS[0], 'I -> I', 'I -> -I', 'I -> J', 'I -> -J', 'I -> K', 'I -> -K') B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Transformation of i index.') B = TTK.OptionMenu(Frame, VARS[1], 'J -> I', 'J -> -I', 'J -> J', 'J -> -J', 'J -> K', 'J -> -K') B.grid(row=0, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Transformation of j index.') B = TTK.OptionMenu(Frame, VARS[2], 'K -> I', 'K -> -I', 'K -> J', 'K -> -J', 'K -> K', 'K -> -K') B.grid(row=0, column=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Transformation of k index.') # - Bouton reorder - B = TTK.Button(Frame, text="Reorder", command=reorder) B.grid(row=1, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Reorder the numerotation of block.') # - Bouton reorderAll - B = TTK.Button(Frame, text="ReorderAll", command=reorderAll) BB = CTK.infoBulle(parent=B, text='Reorder all blocks even with overlaps.') B.grid(row=1, column=1, columnspan=1, sticky=TK.EW) # - Bouton makeDirect - B = TTK.Button(Frame, text="makeDirect", command=makeDirect) BB = CTK.infoBulle(parent=B, text='Make structured blocks direct.') B.grid(row=1, column=2, columnspan=1, sticky=TK.EW)
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkTetraMesher', font=CTK.FRAMEFONT, takefocus=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(1, weight=1) #Frame.columnconfigure(1, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) FrameMenu.add_command(label='Save', command=saveApp) FrameMenu.add_command(label='Reset', command=resetApp) CTK.addPinMenu(FrameMenu, 'tkTetraMesher') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- Mesher type - V = TK.StringVar(win) V.set('tetgen') VARS.append(V) if 'tkTetraMesherType' in CTK.PREFS: V.set(CTK.PREFS['tkTetraMesherType']) # - mesher menu - B = TTK.OptionMenu(Frame, VARS[0], 'netgen', 'tetgen') B.grid(row=0, column=1, columnspan=1, sticky=TK.EW) # - Run - B = TTK.Button(Frame, text="tetraMesher", command=tetraMesher) B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Mesh with TETRAs or TRIs.')
def createApp(win): ttk = CTK.importTtk() # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkIsoSurf', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Compute iso-surfaces.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event : Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(1, weight=1) Frame.columnconfigure(2, weight=0) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) FrameMenu.add_command(label='Save', command=saveApp) FrameMenu.add_command(label='Reset', command=resetApp) CTK.addPinMenu(FrameMenu, 'tkIsoSurf') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- Field name - V = TK.StringVar(win); V.set('CoordinateX'); VARS.append(V) # -1- value - V = TK.StringVar(win); V.set('1.'); VARS.append(V) if 'tkIsoSurfValue' in CTK.PREFS: V.set(CTK.PREFS['tkIsoSurfValue']) # - field name - F = TTK.Frame(Frame, borderwidth=0) F.columnconfigure(0, weight=1) if ttk is None: B = TK.OptionMenu(F, VARS[0], '') B.grid(sticky=TK.EW) F.bind('<Enter>', updateVarNameList) F.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Extracted field.') WIDGETS['field'] = B else: B = ttk.Combobox(F, textvariable=VARS[0], values=[], state='readonly', width=10) B.grid(sticky=TK.EW) F.bind('<Enter>', updateVarNameList2) F.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Extracted field.') WIDGETS['field'] = B # - Value - B = TTK.Entry(Frame, textvariable=VARS[1], background='White', width=7) BB = CTK.infoBulle(parent=B, text='Extracted field value.') B.bind('<Return>', extractIsoSurf) B.grid(row=0, column=1, sticky=TK.EW) # - Get value from mouse - B = TTK.Button(Frame, image=iconics.PHOTO[8], command=getValueFromMouse, padx=0) B.grid(row=0, column=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Get value from mouse.') # - Extract - B = TTK.Button(Frame, text="Extract isosurf", command=extractIsoSurf) B.grid(row=1, column=0, columnspan=3, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Extract isosurf to SURFACES.')
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkCanvas', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Manage a canvas\nfor drawing..\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(1, weight=1) Frame.columnconfigure(2, weight=4) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) FrameMenu.add_command(label='Save', command=saveApp) FrameMenu.add_command(label='Reset', command=resetApp) CTK.addPinMenu(FrameMenu, 'tkCanvas') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- Canvas dir V = TK.StringVar(win) V.set('None') VARS.append(V) # -1- Canvas pos V = TK.StringVar(win) V.set('0.') VARS.append(V) # -2- Canvas dir step V = TK.StringVar(win) V.set('0.1') VARS.append(V) if 'tkCanvasDirStep' in CTK.PREFS: V.set(CTK.PREFS['tkCanvasDirStep']) # -3- Canvas enlarge step V = TK.StringVar(win) V.set('1.') VARS.append(V) if 'tkCanvasEnlargeStep' in CTK.PREFS: V.set(CTK.PREFS['tkCanvasEnlargeStep']) # - Direction - B = TTK.OptionMenu(Frame, VARS[0], 'None', 'View', 'XY', 'XZ', 'YZ', command=initCanvas) B.grid(row=0, column=0, columnspan=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Create a canvas.') # - Refresh - B = TTK.Button(Frame, text="", command=initCanvas, image=iconics.PHOTO[8], padx=0, pady=2) B.grid(row=0, column=1, sticky=TK.EW) BB = CTK.infoBulle( parent=B, text= 'Refresh canvas.\nUpdate it to make it pass through selection point.') # - Position - B = TTK.Entry(Frame, textvariable=VARS[1], background='White', width=7) B.bind('<Return>', setCanvasPos) B.grid(row=0, column=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Canvas position.') # - Move canvas - B = TTK.Button(Frame, text="+", command=moveUp) B.grid(row=1, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Move canvas right.') B = TTK.Button(Frame, text="-", command=moveDown) B.grid(row=1, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Move canvas left.') B = TTK.Entry(Frame, textvariable=VARS[2], background='White', width=7) B.grid(row=1, column=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Canvas move step.') # - Enlarge / reduce - B = TTK.Button(Frame, text="Enlarge", command=enlarge) B.grid(row=2, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Enlarge canvas.') B = TTK.Button(Frame, text="Reduce", command=reduce) B.grid(row=2, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Reduce canvas.') B = TTK.Entry(Frame, textvariable=VARS[3], background='White', width=7) B.grid(row=2, column=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Canvas enlarge step.')
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkExtrusion', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Extrude a mesh.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(1, weight=1) Frame.columnconfigure(2, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) FrameMenu.add_command(label='Save', command=saveApp) FrameMenu.add_command(label='Reset', command=resetApp) CTK.addPinMenu(FrameMenu, 'tkExtrusion') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- Hauteur de chaque maille - V = TK.StringVar(win) V.set('1.e-1') VARS.append(V) if 'tkExtrusionHeight' in CTK.PREFS: V.set(CTK.PREFS['tkExtrusionHeight']) # -1- Nombre de layers a ajouter V = TK.StringVar(win) V.set('1') VARS.append(V) if 'tkExtrusionNLayers' in CTK.PREFS: V.set(CTK.PREFS['tkExtrusionNLayers']) # -2- Nombre d'iterations de lissage V = TK.StringVar(win) V.set('50') VARS.append(V) if 'tkExtrusionSmooth' in CTK.PREFS: V.set(CTK.PREFS['tkExtrusionSmooth']) # -3- Driving curve V = TK.StringVar(win) V.set('') VARS.append(V) # -4- Axis for revolve V = TK.StringVar(win) V.set('') VARS.append(V) # -5- Angle for revolve V = TK.StringVar(win) V.set('360.') VARS.append(V) if 'tkExtrusionRevAngle' in CTK.PREFS: V.set(CTK.PREFS['tkExtrusionRevAngle']) # -6- Npts for revolve V = TK.StringVar(win) V.set('30') VARS.append(V) if 'tkExtrusionNpts' in CTK.PREFS: V.set(CTK.PREFS['tkExtrusionNpts']) # - AddNormalLayers - B = TTK.Entry(Frame, textvariable=VARS[0], background='White', width=5) B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Height of each layer.') B = TTK.Entry(Frame, textvariable=VARS[1], background='White', width=5) B.grid(row=0, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Number of layers.') B = TTK.Entry(Frame, textvariable=VARS[2], background='White', width=5) B.grid(row=0, column=2, columnspan=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Number of smoothing iterations.') B = TTK.Button(Frame, text="Add layers", command=addLayers) B.grid(row=1, column=0, columnspan=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Add normal layers to surface.') B = TTK.Button(Frame, text="Add k planes", command=addkplanes) B.grid(row=1, column=2, columnspan=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Add k planes.') # - Extrusion suivant une courbe - B = TTK.Button(Frame, text="Curve(s)", command=setCurve, image=iconics.PHOTO[8], padx=0, pady=0, compound=TK.RIGHT) B.grid(row=2, column=2, columnspan=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Set driving curve(s) for extrusion.') B = TTK.Entry(Frame, textvariable=VARS[3], background='White') B.grid(row=2, column=0, columnspan=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Driving curve(s) for extrusion.') B = TTK.Button(Frame, text="LineDrive", command=lineDrive) B.grid(row=3, column=0, columnspan=2, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Extrude following linearly curve(s).') B = TTK.Button(Frame, text="OrthoDrive", command=orthoDrive) B.grid(row=3, column=2, columnspan=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Extrude following orthogonally curve(s).') # - Revolve - B = TTK.Button(Frame, text="Axis", command=setAxis, image=iconics.PHOTO[8], padx=0, pady=0, compound=TK.RIGHT) B.grid(row=4, column=2, columnspan=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Set axis for revolve.') B = TTK.Entry(Frame, textvariable=VARS[4], background='White') B.grid(row=4, column=0, columnspan=2, sticky=TK.EW) BB = CTK.infoBulle( parent=B, text='Axis for revolve or\nAxis + rmod curve for revolve.') B = TTK.Entry(Frame, textvariable=VARS[5], background='White', width=5) B.grid(row=5, column=0, columnspan=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Angle for revolve.') B = TTK.Entry(Frame, textvariable=VARS[6], background='White', width=5) B.grid(row=5, column=1, columnspan=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Number of points in revolve.') B = TTK.Button(Frame, text="Revolve", command=revolve) B.grid(row=5, column=2, columnspan=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Revolve following axis.')
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkCassiopeeSolver', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Export to Cassiopee \nCartesian solver.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=0) Frame.columnconfigure(1, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkCassiopeeSolver') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- Integ - V = TK.StringVar(win) V.set('steady') VARS.append(V) # -1- Scheme - V = TK.StringVar(win) V.set('jameson') VARS.append(V) # -2- Inititer V = TK.StringVar(win) V.set('1') VARS.append(V) # -3- Niter V = TK.StringVar(win) V.set('10') VARS.append(V) # -4- Chimera option V = TK.StringVar(win) V.set('Solver performs hole cutting') VARS.append(V) # -5- double wall tolerance - V = TK.StringVar(win) V.set('10.') VARS.append(V) # -6- delta XRay - V = TK.StringVar(win) V.set('1.e-10') VARS.append(V) # -7- tolerance XRay - V = TK.StringVar(win) V.set('1.e-8') VARS.append(V) # -8- Cartesian option - V = TK.StringVar(win) V.set('No Cartesian generation') VARS.append(V) # -9- Dfar - V = TK.StringVar(win) V.set('10.') VARS.append(V) # - Integ - B = TTK.Label(Frame, text="Integ") B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Kind of integration.') B = TTK.OptionMenu(Frame, VARS[0], 'steady', 'unsteady', 'gear') B.grid(row=0, column=1, sticky=TK.EW) # - Scheme - B = TTK.Label(Frame, text="Scheme") B.grid(row=1, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Numerical scheme used.') B = TTK.OptionMenu(Frame, VARS[1], 'jameson', 'jameson_ho', 'jameson_ho5', 'roe', 'ausmppmiles', 'ausmpup') B.grid(row=1, column=1, sticky=TK.EW) # - Inititer - B = TTK.Label(Frame, text="Inititer") B.grid(row=2, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='First iteration of this computation.') B = TTK.Entry(Frame, textvariable=VARS[2]) B.grid(row=2, column=1, sticky=TK.EW) # - Niter - B = TTK.Label(Frame, text="Niter") B.grid(row=3, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Number of iterations of this computation.') B = TTK.Entry(Frame, textvariable=VARS[3]) B.grid(row=3, column=1, sticky=TK.EW) # - Chimera settings - B = TTK.OptionMenu(Frame, VARS[4], 'Solver performs hole cutting', 'Use OversetHole nodes') B.grid(row=4, column=0, columnspan=2, sticky=TK.EW) #- XRay settings - B = TTK.Label(Frame, text="XRay delta") B.grid(row=5, column=0, sticky=TK.EW) B = TTK.Entry(Frame, textvariable=VARS[6]) B.grid(row=5, column=1, sticky=TK.EW) # - Cartesian option - B = TTK.OptionMenu(Frame, VARS[8], 'Cartesian mesh generation', 'No Cartesian generation') B.grid(row=6, column=0, columnspan=2, sticky=TK.EW) #- Dfar settings - B = TTK.Label(Frame, text="Dfar") B.grid(row=7, column=0, sticky=TK.EW) B = TTK.Entry(Frame, textvariable=VARS[9]) B.grid(row=7, column=1, sticky=TK.EW) # - Run - B = TTK.Button(Frame, text="Run", command=run) B.grid(row=8, column=0, sticky=TK.EW) # - Write setup file - B = TTK.Button(Frame, text="Write setup", command=writeSetupFile) B.grid(row=8, column=1, sticky=TK.EW)
def createApp(win): ttk = CTK.importTtk() # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkRenderSet', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Customize block rendering\n(render mode).\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(1, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) CTK.addPinMenu(FrameMenu, 'tkRenderSet') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- Material - V = TK.StringVar(win) V.set('Solid') VARS.append(V) # -1- Color - V = TK.StringVar(win) V.set('White') VARS.append(V) # -2- Blending V = TK.StringVar(win) V.set('1.') VARS.append(V) # -3- Mesh overlay V = TK.StringVar(win) V.set('0') VARS.append(V) # -4- Shader parameter1 info bulle V = TK.StringVar(win) V.set('Shader parameter 1.') VARS.append(V) # -5- Shader parameter2 info bulle V = TK.StringVar(win) V.set('Shader parameter 2.') VARS.append(V) # -6- Blending info bulle V = TK.StringVar(win) V.set('Blending.') VARS.append(V) # - set Blending - B = TTK.Scale(Frame, from_=0, to=100, orient=TK.HORIZONTAL, command=setBlending, showvalue=0, borderwidth=1, value=100) WIDGETS['blending'] = B B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, textVariable=VARS[6]) # - set mesh overlay - B = TTK.Checkbutton(Frame, text='Mesh', variable=VARS[3], command=setMeshOverlay) BB = CTK.infoBulle(parent=B, text='Add underlaying mesh.') B.grid(row=0, column=1, sticky=TK.EW) # - set shader parameter 1 & 2- B = TTK.Scale(Frame, from_=0, to=100, orient=TK.HORIZONTAL, command=setShaderParameter, showvalue=0, borderwidth=1, value=50) WIDGETS['param1'] = B B.grid(row=1, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, textVariable=VARS[4]) # - set shader parameter 2 - B = TTK.Scale(Frame, from_=0, to=100, orient=TK.HORIZONTAL, command=setShaderParameter, showvalue=0, borderwidth=1, value=50) WIDGETS['param2'] = B B.grid(row=1, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, textVariable=VARS[5]) # - set Material - B = TTK.Button(Frame, text="Set Material", command=setMaterial) B.grid(row=2, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Set the material render property.') B = TTK.OptionMenu(Frame, VARS[0], *MATERIALS) B.grid(row=2, column=1, sticky=TK.EW) # - set Color - B = TTK.Button(Frame, text="Set Color", command=setColor) B.grid(row=3, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Set the color render property.') F = TTK.Frame(Frame, borderwidth=0) F.columnconfigure(0, weight=1) if ttk is None: B = TK.OptionMenu(F, VARS[1], '') B.grid(sticky=TK.EW) F.bind('<Enter>', updateVarNameList) F.grid(row=3, column=1, sticky=TK.EW) WIDGETS['colors'] = B else: B = ttk.Combobox(F, textvariable=VARS[1], values=[], state='readonly', height=11) B.bind('<<ComboboxSelected>>', setColorVar2) B.grid(sticky=TK.EW) F.bind('<Enter>', updateVarNameList2) F.grid(row=3, column=1, sticky=TK.EW) WIDGETS['colors'] = B # - set all properties - F = TTK.Frame(Frame, borderwidth=0) F.columnconfigure(0, weight=1) F.columnconfigure(1, weight=0) B = TTK.Button(F, text="Set all properties", command=setAll) B.grid(row=0, column=0, columnspan=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Set all render properties.') B = TTK.Button(F, command=getData, image=iconics.PHOTO[8], padx=0, pady=0) BB = CTK.infoBulle(parent=B, text='Get data from selected zone.') B.grid(row=0, column=1, sticky=TK.EW) F.grid(row=4, column=0, columnspan=2, sticky=TK.EW)
def createApp(win): ttk = CTK.importTtk() # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkBasicSurfs', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Create basic surfaces.\nCtrl+c to close applet.', btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(0, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) FrameMenu.add_command(label='Save', command=saveApp) FrameMenu.add_command(label='Reset', command=resetApp) CTK.addPinMenu(FrameMenu, 'tkBasicSurfs') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- NPts - V = TK.StringVar(win) V.set('10') VARS.append(V) if 'tkBasicSurfsNpts' in CTK.PREFS: V.set(CTK.PREFS['tkBasicSurfsNpts']) # -1- Type d'elements V = TK.StringVar(win) V.set('TRI') VARS.append(V) if 'tkBasicSurfsElts' in CTK.PREFS: V.set(CTK.PREFS['tkBasicSurfsElts']) # -2- Type de surface V = TK.StringVar(win) V.set('Sphere') VARS.append(V) if 'tkBasicSurfsType' in CTK.PREFS: V.set(CTK.PREFS['tkBasicSurfsType']) # - Npts - B = TTK.Entry(Frame, textvariable=VARS[0], background='White') B.grid(row=0, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Number of generated points.') B.bind('<Return>', generate) # - Type d'elements: TRI ou STRUCT - B = TTK.OptionMenu(Frame, VARS[1], 'TRI', 'QUAD', 'STRUCT') B.grid(row=0, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Surface element type.') # - Type de surface - SURFTYPES = [ 'Sphere', 'Cube', 'Tetra', 'Pyramid', 'Cylinder', 'Plane', 'Cone' ] SURFTYPES += base.keys() if ttk is None: B = TK.OptionMenu(Frame, VARS[2], *SURFTYPES) else: B = ttk.Combobox(Frame, textvariable=VARS[2], values=SURFTYPES, state='readonly', width=10) B.grid(row=1, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Type of generated surface.') B = TTK.Button(Frame, text="Generate", command=generate) B.grid(row=1, column=1, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Generate surface.')
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkDist2Walls', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Compute wall distance.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(1, weight=4) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) FrameMenu.add_command(label='Save', command=saveApp) FrameMenu.add_command(label='Reset', command=resetApp) CTK.addPinMenu(FrameMenu, 'tkDist2Walls') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- Type de distance - V = TK.StringVar(win) V.set('ortho') VARS.append(V) if 'tkDist2WallsType' in CTK.PREFS: V.set(CTK.PREFS['tkDist2WallsType']) # -1- Surfaces - V = TK.StringVar(win) V.set('') VARS.append(V) # -2- Signed ou absolute - V = TK.StringVar(win) V.set('absolute') VARS.append(V) if 'tkDist2WallsSigned' in CTK.PREFS: V.set(CTK.PREFS['tkDist2WallsSigned']) # -3- Vars location - V = TK.StringVar(win) V.set('nodes') VARS.append(V) if 'tkVariablesLoc' in CTK.PREFS: V.set(CTK.PREFS['tkVariablesLoc']) # - Surfaces - B = TTK.Button(Frame, text="Surfaces", command=setSurfaces) B.grid(row=0, column=0, columnspan=1, sticky=TK.EW) BB = CTK.infoBulle( parent=B, text= 'Set surfaces for distances computation.\nIf not set, BCWalls are used.' ) B = TTK.Entry(Frame, textvariable=VARS[1], background='White') B.grid(row=0, column=1, columnspan=1, sticky=TK.EW) # - Algorithm - B = TTK.OptionMenu(Frame, VARS[0], 'ortho', 'mininterf') B.grid(row=1, column=1, sticky=TK.EW) B = TTK.OptionMenu(Frame, VARS[2], 'absolute', 'signed') B.grid(row=1, column=0, sticky=TK.EW) # - Compute - B = TTK.Button(Frame, text="Compute", command=compute) B.grid(row=2, column=0, sticky=TK.EW) B = TTK.OptionMenu(Frame, VARS[3], 'nodes', 'centers') B.grid(row=2, column=1, sticky=TK.EW) C = CTK.infoBulle(parent=B, text='Compute the wall distance.\nTree is modified.')
def createApp(win): # - Frame - Frame = TTK.LabelFrame(win, borderwidth=2, relief=CTK.FRAMESTYLE, text='tkCellN', font=CTK.FRAMEFONT, takefocus=1) #BB = CTK.infoBulle(parent=Frame, text='Chimera cellN analysis.\nCtrl+c to close applet.', temps=0, btype=1) Frame.bind('<Control-c>', hideApp) Frame.bind('<ButtonRelease-3>', displayFrameMenu) Frame.bind('<Enter>', lambda event: Frame.focus_set()) Frame.columnconfigure(0, weight=1) Frame.columnconfigure(1, weight=1) WIDGETS['frame'] = Frame # - Frame menu - FrameMenu = TK.Menu(Frame, tearoff=0) FrameMenu.add_command(label='Close', accelerator='Ctrl+c', command=hideApp) FrameMenu.add_command(label='Save', command=saveApp) FrameMenu.add_command(label='Reset', command=resetApp) CTK.addPinMenu(FrameMenu, 'tkCellN') WIDGETS['frameMenu'] = FrameMenu # - VARS - # -0- cellN filter - norow = 0 V = TK.StringVar(win) V.set('cellN=0') VARS.append(V) if 'tkCellNFilter' in CTK.PREFS: V.set(CTK.PREFS['tkCellNFilter']) # Filter B = TTK.OptionMenu(Frame, VARS[0], 'Mesh', 'cellN=0', 'cellN=-99999', 'cellN=2', 'cellN<0', '0<cellN<1', 'cellN=1', 'cf>1', 'Orphan points', 'Extrapolated points', 'Interpolated points') B.grid(row=norow, column=0, columnspan=2, sticky=TK.EW) # - View cellN - norow += 1 B = TTK.Button(Frame, text="View", command=view) B.grid(row=norow, column=0, sticky=TK.EW) BB = CTK.infoBulle( parent=B, text='View the location of specified cellN.\nTree is NOT modified.') # - Extract cellN - B = TTK.Button(Frame, text="Extract", command=extract) B.grid(row=norow, column=1, sticky=TK.EW) BB = CTK.infoBulle( parent=B, text='Extract the location of specified cellN.\nTree is modified.') # - chimeraInfo # -1- chimeraInfo type norow += 1 V = TK.StringVar(win) V.set('interpolated') VARS.append(V) if 'tkChimeraInfoType' in CTK.PREFS: V.set(CTK.PREFS['tkChimeraInfoType']) # Filter B = TTK.Button(Frame, text="Chimera info", command=chimeraInfo) B.grid(row=norow, column=0, sticky=TK.EW) B = TTK.OptionMenu(Frame, VARS[1], 'interpolated', 'extrapolated', 'orphan', 'cellRatio', 'donorAspect') B.grid(row=norow, column=1, sticky=TK.EW)