element.material() for element in themesh.element_iterator() ] if gfxwindow.settings.hideEmptyElements: return filter(None, allmats) return allmats def getTimeStamp(self, gfxwindow): return max(MaterialDisplay.getTimeStamp(self, gfxwindow), gfxwindow.settings.getTimeStamp('hideEmptyElements')) registeredclass.Registration( 'Material Color', display.DisplayMethod, SkeletonMaterialDisplay, layerordering=display.Planar(1), ordering=0.1, params=[], whoclasses=('Skeleton', ), tip="Fill each Element with the color of its assigned Material.", discussion=xmlmenudump.loadFile( 'DISCUSSIONS/engine/reg/skeletonmaterialdisplay.xml')) registeredclass.Registration( 'Material Color', display.DisplayMethod, MeshMaterialDisplay, ordering=0.11, layerordering=display.Planar(2), params=meshdispparams, whoclasses=('Mesh', ),
device.set_fillColor(r_low / height) else: device.set_fillColor(0.0) device.fill_polygon(rectangle) elif config.dimension() == 3: if self.lookuptable: device.draw_scalarbar(self.lookuptable) finally: self.lock.release() registeredclass.Registration( 'Filled Contour', display.DisplayMethod, FilledContourDisplay, ordering=3.1, layerordering=display.Planar(3), whoclasses=('Mesh', ), params=contourparams + [ RegisteredParameter('colormap', colormap.ColorMap, colormap.ThermalMap(), tip="color scheme") ], tip="Draw a filled contour plot of the given output data.", discussion=xmlmenudump.loadFile( 'DISCUSSIONS/engine/reg/filledcontour.xml'))
def draw(self, gfxwindow, device): msobj = self.who().getObject(gfxwindow) data = orientmapdata.getOrientationMap(msobj) if data is not None: orientimage = orientmapdata.OrientMapImage(data, self.colorscheme) device.draw_image(orientimage, coord.Coord(0, 0), msobj.size()) def getTimeStamp(self, gfxwindow): msobj = self.who().getObject(gfxwindow) return max(display.DisplayMethod.getTimeStamp(self, gfxwindow), orientmapdata.getOrientationMapTimestamp(msobj)) registeredclass.Registration( 'Orientation Map', display.DisplayMethod, OrientationMapDisplay, ordering=2, params=[ parameter.RegisteredParameter( 'colorscheme', angle2color.Angle2Color, tip='Method for converting angles to colors.') ], layerordering=display.Planar(0.5), whoclasses=('Microstructure', ), tip= "Display a Microstructure's Orientation Map, whether or not it's used by Material Properties.", discussion=xmlmenudump.loadFile( 'DISCUSSIONS/orientationmap/reg/orientationmapdisplay.xml'))
def matChangedCB(self, materialname): context = self.who() if context: ms = context.getObject(self.gfxwindow) if ms: mnames = [m.name() for m in material.getMaterials(ms)] if materialname in mnames: self.whoChanged() registeredclass.Registration( 'Material', display.DisplayMethod, MicrostructureMaterialDisplay, ordering=0, layerordering=display.Planar(0.4), params=[ color.ColorParameter( 'no_material', color.black, tip="Color to use if no material has been assigned to a pixel"), color.ColorParameter( 'no_color', color.blue, tip="Color to use if the assigned material has no assigned color"), parameter.FloatRangeParameter("opacity", bitmapdisplay.opacityRange, bitmapdisplay.defaultImageOpacity, tip="Opacity of material colors."), parameter.RegisteredParameter("filter", voxelfilter.VoxelFilterPtr,