checkpoint selection info updated checkpoint selection info updated checkpoint selection info updated findWidget('OOF2 Graphics 1:Pane0').set_position(280) checkpoint OOF.Microstructure.Create_From_ImageFile findWidget('OOF2:Microstructure Page:Pane').set_position(157) findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:TBScroll:Viewer:Info').clicked() findWidget('OOF2 Messages 1').resize(630, 200) assert tests.gtkTextviewTail('OOF2 Messages 1:Text',"Scroll region : CRectangle(Coord(-7.5, -157.5), Coord(157.5, 7.5))\n", tolerance=1.e-6) canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1') canvasobj.emit('event', event(gtk.gdk.BUTTON_PRESS,x= 1.5794117647059e+01,y=-1.3485294117647e+02,state=0,window=findCanvasGdkWindow('Graphics_1'))) canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1') canvasobj.emit('event', event(gtk.gdk.BUTTON_RELEASE,x= 1.5794117647059e+01,y=-1.3485294117647e+02,state=256,window=findCanvasGdkWindow('Graphics_1'))) # Button-release. Did the click happen correctly? starting_ppu = tests.getCanvasPPU() assert tests.gtkMultiTextCompare({'PixelX':'15','PixelY':'134','PhysicalX':'15.79','PhysicalY':'134.9'},'OOF2 Graphics 1:Pane0:Pane1:Pane2:TBScroll:Viewer') findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:TBScroll:Viewer:Zoom:In').clicked() findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas:vscroll').get_adjustment().set_value( 6.4000000000000e+01) checkpoint OOF.Graphics_1.Settings.Zoom.In # Zoomed in once, check pixels per unit. assert tests.checkCanvasPPU(starting_ppu, 1.5) canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1') canvasobj.emit('event', event(gtk.gdk.BUTTON_PRESS,x= 2.0970588235294e+01,y=-7.4676470588235e+01,state=0,window=findCanvasGdkWindow('Graphics_1'))) canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1') canvasobj.emit('event', event(gtk.gdk.BUTTON_RELEASE,x= 2.0970588235294e+01,y=-7.4676470588235e+01,state=256,window=findCanvasGdkWindow('Graphics_1'))) # Check data. assert tests.gtkMultiTextCompare({'PixelX':'20','PixelY':'74','PhysicalX':'20.97','PhysicalY':'74.68'},'OOF2 Graphics 1:Pane0:Pane1:Pane2:TBScroll:Viewer') findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:TBScroll:Viewer:Zoom:Out').clicked() findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas:vscroll').get_adjustment().set_value( 0.0000000000000e+00) checkpoint OOF.Graphics_1.Settings.Zoom.Out # Zoomed out, recheck ppu.
findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2').set_position(258) findWidget('OOF2 Graphics 1:Pane0:Pane1').set_position(716) findWidget('OOF2 Graphics 1:Pane0').set_position(363) findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2').set_position(258) findWidget('OOF2 Graphics 1:Pane0:Pane1').set_position(716) findWidget('OOF2 Graphics 1:Pane0').set_position(362) findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2').set_position(258) findWidget('OOF2 Graphics 1:Pane0:Pane1').set_position(716) findWidget('OOF2 Graphics 1:Pane0').set_position(362) setComboBox(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:TBChooser'), 'Mesh Info') checkpoint Graphics_1 Mesh Info sensitized # Mesh info toolbox selected. assert findWidget(tbox+":Click:Element").get_active() assert not findWidget(tbox+':Click:Node').get_active() assert tests.gtkMultiTextCompare({'X':'','Y':''},tbox+":Click") assert tests.sensitizationCheck({'NewDataViewer':True,'Prev':False,'Clear':False,'Next':False},tbox) assert tests.gtkMultiTextCompare({'index':'','type':'','material':''},tbox+":ElementInfo") assert tests.chooserCheck(tbox+':ElementInfo:NodeList',[]) findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2').set_position(258) findWidget('OOF2 Graphics 1:Pane0:Pane1').set_position(716) findWidget('OOF2 Graphics 1:Pane0').set_position(362) findMenu(findWidget('OOF2:MenuBar'), 'File:Load:Script').activate() checkpoint toplevel widget mapped Dialog-Script findWidget('Dialog-Script').resize(194, 71) findWidget('Dialog-Script:gtk-cancel').clicked() findMenu(findWidget('OOF2:MenuBar'), 'File:Load:Data').activate() checkpoint toplevel widget mapped Dialog-Data findWidget('Dialog-Data').resize(194, 71) findWidget('Dialog-Data:filename').set_text('T')
setComboBox(findWidget('Mesh Data 1:ViewSource:output:output_0'), 'Flux') checkpoint Mesh_Data_1 data updated canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1') canvasobj.emit('event', event(gtk.gdk.BUTTON_PRESS,x= 4.5470588235294e+01,y=-9.4215686274510e+01,state=0,window=findCanvasGdkWindow('Graphics_1'))) canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1') canvasobj.emit('event', event(gtk.gdk.BUTTON_RELEASE,x= 4.5470588235294e+01,y=-9.4215686274510e+01,state=256,window=findCanvasGdkWindow('Graphics_1'))) checkpoint Graphics_1 Mesh Info sensitized checkpoint Mesh_Data_1 position updated checkpoint Mesh_Data_1 data updated checkpoint OOF.Graphics_1.Toolbox.Mesh_Info.QueryElement findWidget('OOF2 Graphics 1:Pane0').set_position(280) findWidget('Mesh Data 1').resize(509, 353) # Element query. assert findWidget('Mesh Data 1:ViewSource').get_expanded() assert tests.gtkMultiTextCompare({'xx':'-0.00746209','xy':'-0.0010901','xz':'0','yy':'-0.0705959','yz':'0','zz':'-0.00226641'},'Mesh Data 1:Data') assert tests.gtkMultiTextCompare({'meshname':'microstructure:skeleton:mesh','x':'45.2347','y':'86.6034'},'Mesh Data 1:ViewSource') assert not findWidget('Mesh Data 1:Freeze:Space').get_active() assert tests.is_sensitive('Mesh Data 1:Close') findWidget('Mesh Data 1:ViewSource').set_expanded(0) # Source contracted, data unchanged. assert not findWidget('Mesh Data 1:ViewSource').get_expanded() assert tests.gtkMultiTextCompare({'xx':'-0.00746209','xy':'-0.0010901','xz':'0','yy':'-0.0705959','yz':'0','zz':'-0.00226641'},'Mesh Data 1:Data') assert tests.gtkMultiTextCompare({'meshname':'microstructure:skeleton:mesh','x':'45.2347','y':'86.6034'},'Mesh Data 1:ViewSource') assert not findWidget('Mesh Data 1:Freeze:Space').get_active() assert tests.is_sensitive('Mesh Data 1:Close') canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1')
findWidget('OOF2 Graphics 1:Pane0').set_position(280) findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2').set_position(258) findWidget('OOF2 Graphics 1:Pane0:Pane1').set_position(716) findWidget('OOF2 Graphics 1:Pane0').set_position(280) canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1') canvasobj.emit('event', event(gtk.gdk.BUTTON_PRESS,x= 1.9676470588235e+01,y=-7.1441176470588e+01,state=0,window=findCanvasGdkWindow('Graphics_1'))) canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1') canvasobj.emit('event', event(gtk.gdk.MOTION_NOTIFY,x= 2.0323529411765e+01,y=-7.1441176470588e+01,state=256,window=findCanvasGdkWindow('Graphics_1'))) canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1') canvasobj.emit('event', event(gtk.gdk.BUTTON_RELEASE,x= 2.0323529411765e+01,y=-7.1441176470588e+01,state=256,window=findCanvasGdkWindow('Graphics_1'))) checkpoint Graphics_1 Pixel Info updated checkpoint OOF.Graphics_1.Toolbox.Pixel_Info.Query findWidget('OOF2 Graphics 1:Pane0').set_position(280) # Click! assert tests.gtkMultiTextCompare({'X':'20','Y':'71','Image':'small.ppm:small.ppm','MSText':'small.ppm','material':'<No material>'},tbox) assert tests.sensitizationCheck({'Update':False,'Clear':True},tbox) assert findWidget(tbox+':RGB selector').get_active() assert tests.gtkMultiFloatCompare({'Text 1':0.0,'Text 2':0.9882352941176471,'Text 3':0.0},tbox) findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:TBScroll:Pixel Info:HSV selector').clicked() # Switched to HSV. assert tests.gtkMultiTextCompare({'X':'20','Y':'71','Image':'small.ppm:small.ppm','MSText':'small.ppm','material':'<No material>'},tbox) assert tests.sensitizationCheck({'Update':False,'Clear':True},tbox) assert not findWidget(tbox+':RGB selector').get_active() assert tests.gtkMultiFloatCompare({'Text 1':120.0,'Text 2':1.0,'Text 3':0.9882352941176471},tbox) canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1') canvasobj.emit('event', event(gtk.gdk.BUTTON_PRESS,x= 1.1479411764706e+02,y=-8.2441176470588e+01,state=0,window=findCanvasGdkWindow('Graphics_1'))) canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1')
setComboBox(findWidget('Mesh Data 1:ViewSource:output:output_0'), 'Flux') checkpoint Mesh_Data_1 data updated canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1') canvasobj.emit('event', event(gtk.gdk.BUTTON_PRESS,x= 4.5470588235294e+01,y=-9.4215686274510e+01,state=0,window=findCanvasGdkWindow('Graphics_1'))) canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1') canvasobj.emit('event', event(gtk.gdk.BUTTON_RELEASE,x= 4.5470588235294e+01,y=-9.4215686274510e+01,state=256,window=findCanvasGdkWindow('Graphics_1'))) checkpoint Graphics_1 Mesh Info sensitized checkpoint Mesh_Data_1 position updated checkpoint Mesh_Data_1 data updated checkpoint OOF.Graphics_1.Toolbox.Mesh_Info.QueryElement findWidget('OOF2 Graphics 1:Pane0').set_position(280) findWidget('Mesh Data 1').resize(509, 353) # Element query. assert findWidget('Mesh Data 1:ViewSource').get_expanded() assert tests.gtkMultiTextCompare({'xx':'0.00746209','xy':'0.0010901','xz':'0','yy':'0.0705959','yz':'0','zz':'0.00226641'},'Mesh Data 1:Data') assert tests.gtkMultiTextCompare({'meshname':'microstructure:skeleton:mesh','x':'45.2347','y':'86.6034'},'Mesh Data 1:ViewSource') assert not findWidget('Mesh Data 1:Freeze:Space').get_active() assert tests.is_sensitive('Mesh Data 1:Close') findWidget('Mesh Data 1:ViewSource').set_expanded(0) # Source contracted, data unchanged. assert not findWidget('Mesh Data 1:ViewSource').get_expanded() assert tests.gtkMultiTextCompare({'xx':'0.00746209','xy':'0.0010901','xz':'0','yy':'0.0705959','yz':'0','zz':'0.00226641'},'Mesh Data 1:Data') assert tests.gtkMultiTextCompare({'meshname':'microstructure:skeleton:mesh','x':'45.2347','y':'86.6034'},'Mesh Data 1:ViewSource') assert not findWidget('Mesh Data 1:Freeze:Space').get_active() assert tests.is_sensitive('Mesh Data 1:Close') canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1')
findWidget('OOF2 Graphics 1:Pane0').set_position(280) canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1') canvasobj.emit('event', event(gtk.gdk.BUTTON_PRESS,x= 5.9147058823529e+01,y=-6.8205882352941e+01,state=0,window=findCanvasGdkWindow('Graphics_1'))) canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1') canvasobj.emit('event', event(gtk.gdk.BUTTON_RELEASE,x= 5.9147058823529e+01,y=-6.8205882352941e+01,state=256,window=findCanvasGdkWindow('Graphics_1'))) checkpoint microstructure page sensitized checkpoint pixel page updated checkpoint Graphics_1 Pixel Selection sensitized checkpoint selection info updated checkpoint Graphics_1 Pixel Selection sensitized checkpoint OOF.Graphics_1.Toolbox.Pixel_Select.Point findWidget('OOF2 Graphics 1:Pane0').set_position(280) # *Second* pixel selection, check texts. assert tests.gtkTextCompare('OOF2 Graphics 1:Pane0:Pane1:Pane2:TBScroll:Pixel Selection:size','1') assert tests.sensitizationCheck({'Undo':True,'Redo':False,'Clear':True,'Invert':True,'Prev':True,'Repeat':True,'Next':False}, 'OOF2 Graphics 1:Pane0:Pane1:Pane2:TBScroll:Pixel Selection') assert tests.gtkMultiTextCompare({'xdown':'--','ydown':'--','xup':'59.1471','yup':'68.2059'},'OOF2 Graphics 1:Pane0:Pane1:Pane2:TBScroll:Pixel Selection') findWidget('OOF2 Graphics 1').resize(800, 406) findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2').set_position(258) findWidget('OOF2 Graphics 1:Pane0:Pane1').set_position(716) findWidget('OOF2 Graphics 1:Pane0').set_position(286) findWidget('OOF2 Graphics 1').resize(800, 408) findWidget('OOF2 Graphics 1').resize(800, 414) findWidget('OOF2 Graphics 1').resize(800, 417) findWidget('OOF2 Graphics 1').resize(800, 419) findWidget('OOF2 Graphics 1').resize(800, 422) findWidget('OOF2 Graphics 1').resize(800, 424) findWidget('OOF2 Graphics 1').resize(800, 426) findWidget('OOF2 Graphics 1').resize(800, 428) findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2').set_position(258) findWidget('OOF2 Graphics 1:Pane0:Pane1').set_position(716) findWidget('OOF2 Graphics 1:Pane0').set_position(308)
canvasobj.emit('event', event(gtk.gdk.BUTTON_PRESS,x= 2.2606177606178e+01,y=-6.8474903474903e+01,state=0,window=findCanvasGdkWindow('Graphics_1'))) canvasobj = findCanvasRoot(findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:Canvas'), windowname='Graphics_1') canvasobj.emit('event', event(gtk.gdk.BUTTON_RELEASE,x= 2.2606177606178e+01,y=-6.8474903474903e+01,state=256,window=findCanvasGdkWindow('Graphics_1'))) checkpoint Graphics_1 Skeleton Info sensitized checkpoint contourmap info updated for Graphics_1 checkpoint OOF.Graphics_1.Toolbox.Skeleton_Info.QueryElement findWidget('OOF2 Graphics 1:Pane0').set_position(444) # Direct element selection. Dominant pixel test skipped, because it's # a numerically-derived name which may be prone to roundoff, and is # tested directly in the 01200 test. assert findWidget(tbox+":Click:Element").get_active() assert not findWidget(tbox+":Click:Node").get_active() assert not findWidget(tbox+":Click:Segment").get_active() assert tests.gtkMultiFloatCompare({'X Text':22.61,'Y Text':68.47},cbox) assert tests.gtkMultiTextCompare({'Material':'<No material>','Group':'','Index':'54','Type':'quad'},elbox) assert tests.gtkMultiFloatCompare({'Shape':0.308000,'Homog':0.988881,'Area':287.500000},elbox) assert tests.sensitizationCheck({'Prev':False,'Clear':True,'Next':False},tbox) assert tests.chooserCheck(elbox+":SegmentList",["Segment 79, nodes (43, 52) (length: 12.5)","Segment 130, nodes (43, 44) (length: 18.5)","Segment 127, nodes (44, 53) (length: 15.402922)","Segment 131, nodes (52, 53) (length: 27.5)"], tolerance=1.e-6) assert tests.chooserCheck(elbox+":NodeList",["Node 43 at (12.5, 62.5) (angle: 90)","Node 44 at (31, 62.5) (angle: 125.753887)","Node 53 at (40, 75) (angle: 54.2461127)","Node 52 at (12.5, 75) (angle: 90)"],tolerance=1.e-6) findWidget('OOF2 Graphics 1:Pane0:Pane1:Pane2:TBScroll:Skeleton Info:ElementInformation:NodeList').get_selection().select_path((1,)) findWidget('OOF2 Graphics 1:Pane0').set_position(444) # Node peek. checkpoint contourmap info updated for Graphics_1 assert findWidget(tbox+":Click:Element").get_active() assert not findWidget(tbox+":Click:Node").get_active() assert not findWidget(tbox+":Click:Segment").get_active() assert tests.gtkMultiFloatCompare({'X Text':22.61,'Y Text':68.47},cbox) assert tests.gtkMultiTextCompare({'Material':'<No material>','Group':'','Index':'54','Type':'quad'},elbox)