Back to index

salome-paravis  6.5.0
Functions | Variables
A9 Namespace Reference

Functions

def check_value
def check_all_params

Variables

tuple picturedir = get_picture_dir(sys.argv[1], "3D_viewer/A9")
 myParavis = paravis.myParavis
tuple my_view = GetRenderView()
string theFileName = "cube_hexa8_quad4.med"
tuple proxy = GetActiveSource()
string field_name = 'fieldcelldouble'
tuple scalar_map = ScalarMapOnField(proxy, EntityType.CELL, field_name, 1)
float compare_prec = 0.00001
tuple shrink_filter = Shrink(scalar_map.Input)
 call_and_check(shape_to_show, "Shrinked", 0, "Shrinked")
tuple shrinked_scalar_map = GetRepresentation(shrink_filter)
 lookup_table = scalar_map.LookupTable
 shape_to_show = shrinked_scalar_map
string pic_name = "params_SURFACE_1."
 call_and_check(scalar_map, "Shrinked", 0, "Shrinked") call_and_check(scalar_map, "Shrinked", 1, "Shrinked")
string picture_name = "params_SURFACE_2."
tuple err
string file = "Quad4.med"
string file_name = "carre_en_quad4_seg2_fields.med"
int timestamp_nb = 1
tuple med_reader = pvsimple.GetActiveSource()
tuple prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
tuple view = pvsimple.GetRenderView()
tuple time = get_time(med_reader, timestamp_nb)
float DELAY = 0.25
tuple samples_dir = os.getenv("DATA_DIR")
 datadir = None
 tablesdir = None
list color = [0, 0.3, 1]
tuple pv_root_dir = os.getenv("PARAVIS_ROOT_DIR")
string med_file = "pointe.med"
 entity = EntityType.NODE
int timestamp = 1
tuple scalarmap = ScalarMapOnField(med_reader, entity, field_name, timestamp)
tuple bar = get_bar()
 lt = bar.LookupTable
list range_min = lt.RGBPoints[0]
list range_max = lt.RGBPoints[4]
tuple delta = (range_max - range_min)
 nb_colors = lt.NumberOfTableValues
 x = range_min+delta*i/nb_colors
 y = range_max-delta*i/nb_colors
float displacement = 0.5
 orient = Orientation.YZ
tuple cutplanes
 cam_pos = view.CameraPosition
 slice_filter = cutplanes.Input
 offset_vals = slice_filter.SliceOffsetValues
tuple nb_planes = len(offset_vals)
tuple bounds = get_bounds(med_reader)
tuple normal = get_normal_by_orientation(orient, x, y)
tuple pos = get_positions(i, normal, bounds, displacement)
tuple isosurf = IsoSurfacesOnField(med_reader, entity, field_name, timestamp)
 contour = isosurf.Input
tuple nb_surfaces = len(contour.Isosurfaces)
tuple scalar_range = get_data_range(med_reader, entity, field_name, cut_off=True)
tuple contours = get_contours(scalar_range, i)
 orientation1 = Orientation.ZX,
 orientation2 = Orientation.YZ,
 generate_curves = True)
tuple xy_view = pv.CreateXYPlotView()
int index = 0
tuple xyrep = pv.Show(curve, xy_view)
tuple r = str(random.random())
tuple g = str(random.random())
tuple b = str(random.random())
list point1 = [0.0, -1.0, 2.5]
list point2 = [0.0, 1.0, 2.5]
tuple cutsegment
tuple curve = pv.Show(cutsegment.Input, xy_view)

Function Documentation

def A9.check_all_params (   prs,
  pres_type,
  shad,
  opac,
  lwid 
)

Definition at line 49 of file A9.py.

00049 
00050 def check_all_params(prs, pres_type,  shad, opac, lwid):
00051     err = check_value(prs, "Representation", pres_type, 0, -1.0)
00052     err = err + check_value(prs, "Shading", shad, 0, -1.0)
00053     err = err + check_value(prs, "Opacity", opac, 0, compare_prec)
00054     err = err + check_value(prs, "LineWidth", lwid,  0, compare_prec)
00055     return err
00056 
# Directory for saving snapshots

Here is the call graph for this function:

def A9.check_value (   prs,
  property_name,
  value,
  do_raise = 1,
  compare_toler = -1.0 
)

Definition at line 31 of file A9.py.

00031 
00032 def check_value(prs, property_name, value, do_raise=1, compare_toler=-1.0):
00033     # compare just set value and the one got from presentation
00034     really_set_value = prs.GetPropertyValue(property_name)
00035     is_equal = 1
00036     if compare_toler > 0:
00037         is_equal = (fabs(really_set_value - value) < compare_toler)
00038     else:
00039         is_equal = (really_set_value == value)
00040     if not is_equal:
00041         msg = str(really_set_value) + " has been set instead"
00042         if do_raise:
00043             raise RuntimeError(msg)
00044         else:
00045             print (msg)
00046 
00047     return (not is_equal)
00048 

Here is the caller graph for this function:


Variable Documentation

tuple A9.b = str(random.random())

Definition at line 228 of file A9.py.

tuple A9.bar = get_bar()

Definition at line 85 of file A9.py.

tuple A9.bounds = get_bounds(med_reader)

Definition at line 141 of file A9.py.

A9.cam_pos = view.CameraPosition

Definition at line 127 of file A9.py.

list A9.color = [0, 0.3, 1]

Definition at line 55 of file A9.py.

float A9.compare_prec = 0.00001

Definition at line 94 of file A9.py.

A9.contour = isosurf.Input

Definition at line 181 of file A9.py.

tuple A9.contours = get_contours(scalar_range, i)

Definition at line 186 of file A9.py.

tuple A9.curve = pv.Show(cutsegment.Input, xy_view)

Definition at line 255 of file A9.py.

tuple A9.cutplanes
Initial value:
00001 CutPlanesOnField(med_reader, entity, field_name, timestamp,
00002                              orientation=orient,
00003                              displacement=displacement)

Definition at line 119 of file A9.py.

Initial value:
00001 CutSegmentOnField(med_reader, entity, field_name, timestamp,
00002                                point1, point2)

Definition at line 246 of file A9.py.

string A9.datadir = None

Definition at line 36 of file A9.py.

float A9.DELAY = 0.25

Definition at line 32 of file A9.py.

Definition at line 90 of file A9.py.

float A9.displacement = 0.5

Definition at line 117 of file A9.py.

Definition at line 66 of file A9.py.

tuple A9.err
Initial value:
00001 check_all_params(shape_to_show,
00002 RepresentationType.get_name(RepresentationType.SURFACE), 1, 0.8, 5.0)

Definition at line 146 of file A9.py.

string A9.field_name = 'fieldcelldouble'

Definition at line 83 of file A9.py.

string A9.file = "Quad4.med"

Definition at line 34 of file A9.py.

string A9.file_name = "carre_en_quad4_seg2_fields.med"

Definition at line 38 of file A9.py.

tuple A9.g = str(random.random())

Definition at line 227 of file A9.py.

Definition at line 208 of file A9.py.

int A9.index = 0

Definition at line 217 of file A9.py.

tuple A9.isosurf = IsoSurfacesOnField(med_reader, entity, field_name, timestamp)

Definition at line 175 of file A9.py.

A9.lookup_table = scalar_map.LookupTable

Definition at line 110 of file A9.py.

A9.lt = bar.LookupTable

Definition at line 86 of file A9.py.

string A9.med_file = "pointe.med"

Definition at line 64 of file A9.py.

Definition at line 43 of file A9.py.

tuple A9.my_view = GetRenderView()

Definition at line 67 of file A9.py.

Definition at line 64 of file A9.py.

int A9.nb_colors = lt.NumberOfTableValues

Definition at line 91 of file A9.py.

Definition at line 139 of file A9.py.

int A9.nb_surfaces = len(contour.Isosurfaces)

Definition at line 182 of file A9.py.

list A9.normal = get_normal_by_orientation(orient, x, y)

Definition at line 145 of file A9.py.

A9.offset_vals = slice_filter.SliceOffsetValues

Definition at line 138 of file A9.py.

Definition at line 118 of file A9.py.

Definition at line 206 of file A9.py.

Definition at line 207 of file A9.py.

string A9.pic_name = "params_SURFACE_1."

call_and_check(scalar_map, "Shrinked", 0, "Shrinked") call_and_check(scalar_map, "Shrinked", 1, "Shrinked")

call_and_check(shape_to_show, "Shrinked", 0) call_and_check(shape_to_show, "Shrinked", 1)

Definition at line 127 of file A9.py.

string A9.picture_name = "params_SURFACE_2."

Definition at line 138 of file A9.py.

tuple A9.picturedir = get_picture_dir(sys.argv[1], "3D_viewer/A9")

Definition at line 57 of file A9.py.

list A9.point1 = [0.0, -1.0, 2.5]

Definition at line 244 of file A9.py.

list A9.point2 = [0.0, 1.0, 2.5]

Definition at line 245 of file A9.py.

tuple A9.pos = get_positions(i, normal, bounds, displacement)

Definition at line 147 of file A9.py.

tuple A9.proxy = GetActiveSource()

Definition at line 77 of file A9.py.

tuple A9.prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)

Definition at line 48 of file A9.py.

tuple A9.pv_root_dir = os.getenv("PARAVIS_ROOT_DIR")

Definition at line 60 of file A9.py.

tuple A9.r = str(random.random())

Definition at line 226 of file A9.py.

list A9.range_max = lt.RGBPoints[4]

Definition at line 89 of file A9.py.

list A9.range_min = lt.RGBPoints[0]

Definition at line 88 of file A9.py.

tuple A9.samples_dir = os.getenv("DATA_DIR")

Definition at line 35 of file A9.py.

tuple A9.scalar_map = ScalarMapOnField(proxy, EntityType.CELL, field_name, 1)

Definition at line 86 of file A9.py.

tuple A9.scalar_range = get_data_range(med_reader, entity, field_name, cut_off=True)

Definition at line 184 of file A9.py.

tuple A9.scalarmap = ScalarMapOnField(med_reader, entity, field_name, timestamp)

Definition at line 73 of file A9.py.

Definition at line 116 of file A9.py.

tuple A9.shrink_filter = Shrink(scalar_map.Input)

call_and_check(shape_to_show, "Shrinked", 0, "Shrinked")

Definition at line 103 of file A9.py.

tuple A9.shrinked_scalar_map = GetRepresentation(shrink_filter)

Definition at line 106 of file A9.py.

A9.slice_filter = cutplanes.Input

Definition at line 137 of file A9.py.

string A9.tablesdir = None

Definition at line 37 of file A9.py.

string A9.theFileName = "cube_hexa8_quad4.med"

Definition at line 71 of file A9.py.

tuple A9.time = get_time(med_reader, timestamp_nb)

Definition at line 54 of file A9.py.

int A9.timestamp = 1

Definition at line 67 of file A9.py.

int A9.timestamp_nb = 1

Definition at line 40 of file A9.py.

Definition at line 53 of file A9.py.

Definition at line 96 of file A9.py.

tuple A9.xy_view = pv.CreateXYPlotView()

Definition at line 215 of file A9.py.

tuple A9.xyrep = pv.Show(curve, xy_view)

Definition at line 219 of file A9.py.

Definition at line 97 of file A9.py.