From: Gilles DAVID Date: Wed, 7 Jun 2017 09:08:10 +0000 (+0200) Subject: Paraview 5.4: ScalarBar no longer have Position2 and NumberOfLabels attributes X-Git-Tag: V9_0_0~10^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fgdd%2Fpython3_dev_pv5.4;p=modules%2Fparavis.git Paraview 5.4: ScalarBar no longer have Position2 and NumberOfLabels attributes --- diff --git a/test/VisuPrs/SWIG_scripts/A1.py b/test/VisuPrs/SWIG_scripts/A1.py index 8ffbd28c..1dadfe77 100644 --- a/test/VisuPrs/SWIG_scripts/A1.py +++ b/test/VisuPrs/SWIG_scripts/A1.py @@ -60,7 +60,7 @@ else: bar = get_bar() bar.Orientation = 'Horizontal' bar.Position = [0.1, 0.1] - bar.Position2 = [0.1, 0.25] + #bar.Position2 = [0.1, 0.25] bar.AspectRatio = 3 display_only(scalarmap, view) diff --git a/test/VisuPrs/ScalarMap/B3.py b/test/VisuPrs/ScalarMap/B3.py index 02c8b16e..52d3cf74 100644 --- a/test/VisuPrs/ScalarMap/B3.py +++ b/test/VisuPrs/ScalarMap/B3.py @@ -110,19 +110,21 @@ bar.Position = [-1, -1] print("Position =", bar.Position) # 8. Size of scalar bar -print("Default Height=", bar.Position2[1]," : Width=", bar.Position2[0]) +print("Default Length=", bar.ScalarBarLength," : Thickness=", bar.ScalarBarThickness) print("Set positive Height and Width") h = 0.4 -w = 0.2 -bar.Position2 = [w, h] -print("Size =", bar.Position2) +w = 0.2 * 600 * 0.4 +bar.ScalarBarLength = h +bar.ScalarBarThickness = int(w) +print("Length=", bar.ScalarBarLength," : Thickness=", bar.ScalarBarThickness) print("Set negative Height and Width") h = -0.4 -w = -0.2 -bar.Position2 = [w, h] -print("Size =", bar.Position2) +w = -0.2 * 600 * 0.4 +bar.ScalarBarLength = h +bar.ScalarBarThickness = int(w) +print("Length=", bar.ScalarBarLength," : Thickness=", bar.ScalarBarThickness) # 9. Number of colors print("Default number of colors = ", scalarmap.LookupTable.NumberOfTableValues) @@ -144,23 +146,25 @@ nb_colors = 256 scalarmap.LookupTable.NumberOfTableValues = nb_colors print("Number of colors =", scalarmap.LookupTable.NumberOfTableValues) +# NumberOfLabels no longer exists since Paraview 5.4 + # 10. Number of labels -print("Default number of labels = ", bar.NumberOfLabels) - -print("Set negative number of labels") -nb_labels = -10 -bar.NumberOfLabels = nb_labels -print("Number of labels=", bar.NumberOfLabels) - -print("Set zero number of labels") -nb_labels = 0 -bar.NumberOfLabels = nb_labels -print("Number of labels=", bar.NumberOfLabels) - -print("Set positive number of labels") -nb_labels = 10 -bar.NumberOfLabels = nb_labels -print("Number of labels=", bar.NumberOfLabels) +# print("Default number of labels = ", bar.NumberOfLabels) + +#print("Set negative number of labels") +#nb_labels = -10 +#bar.NumberOfLabels = nb_labels +#print("Number of labels=", bar.NumberOfLabels) + +#print("Set zero number of labels") +#nb_labels = 0 +#bar.NumberOfLabels = nb_labels +#print("Number of labels=", bar.NumberOfLabels) + +#print("Set positive number of labels") +#nb_labels = 10 +#bar.NumberOfLabels = nb_labels +#print("Number of labels=", bar.NumberOfLabels) # 11. Scalar bar title print('Default Title ="', bar.Title, '"') diff --git a/test/VisuPrs/ScalarMap_On_DeformedShape/B3.py b/test/VisuPrs/ScalarMap_On_DeformedShape/B3.py index 05d205b7..317c40d5 100644 --- a/test/VisuPrs/ScalarMap_On_DeformedShape/B3.py +++ b/test/VisuPrs/ScalarMap_On_DeformedShape/B3.py @@ -150,18 +150,19 @@ pvsimple.Render(view) #============Stage8: bar size of Scalar Map On Deformed Shape=========== print("Changing bar size:") -print("Default [width, height]: ", bar.Position2) +print("Default ScalarBarLength: ", bar.ScalarBarLength) +print("Default ScalarBarThickness: ", bar.ScalarBarThickness) -print("Set height = height*1.2") -height = bar.Position2[1] * 1.2 -bar.Position2[1] = height -print("Bar [width, height]: ", bar.Position2) +print("Set length = length*1.2") +length = bar.ScalarBarLength * 1.2 +bar.ScalarBarLength = length +print("Bar length: ", bar.ScalarBarLength) pvsimple.Render(view) -print("Set width = width*2") -width = bar.Position2[0] * 2 -bar.Position2[0] = width -print("Bar [width, height]: ", bar.Position2) +print("Set thickness = thickness*2") +thickness = bar.ScalarBarThickness * 2 +bar.ScalarBarThickness = thickness +print("Bar thickness: ", bar.ScalarBarThickness) pvsimple.Render(view) #=============Stage9: nb of colors of Scalar Map On Deformed Shape====== @@ -187,27 +188,28 @@ lt.NumberOfTableValues = num print("Number of colors: ", lt.NumberOfTableValues) pvsimple.Render(view) +# NumberOfLabels no longer exists in Paraview 5.4 #=============Stage10: nb of labels of Scalar Map On Deformed Shape===== -print("Changing number of labels:") -print("Default number of labels: ", bar.NumberOfLabels) +#print("Changing number of labels:") +#print("Default number of labels: ", bar.NumberOfLabels) -print("Set negative number of labels") -num = -128 -bar.NumberOfLabels = num -print("Number of labels: ", bar.NumberOfLabels) -pvsimple.Render(view) +#print("Set negative number of labels") +#num = -128 +#bar.NumberOfLabels = num +#print("Number of labels: ", bar.NumberOfLabels) +#pvsimple.Render(view) -print("Set zero number of labels") -num = 0 -bar.NumberOfLabels = num -print("Number of labels: ", bar.NumberOfLabels) -pvsimple.Render(view) +#print("Set zero number of labels") +#num = 0 +#bar.NumberOfLabels = num +#print("Number of labels: ", bar.NumberOfLabels) +#pvsimple.Render(view) -print("Set positive number of labels") -num = 256 -bar.NumberOfLabels = num -print("Number of labels: ", bar.NumberOfLabels) -pvsimple.Render(view) +#print("Set positive number of labels") +#num = 256 +#bar.NumberOfLabels = num +#print("Number of labels: ", bar.NumberOfLabels) +#pvsimple.Render(view) #=============Stage11: bar title of Scalar Map On Deformed Shape========= print("Changing bar title:") diff --git a/test/VisuPrs/dump_study/A0.py b/test/VisuPrs/dump_study/A0.py index f2cebabc..f4d55a2f 100644 --- a/test/VisuPrs/dump_study/A0.py +++ b/test/VisuPrs/dump_study/A0.py @@ -57,8 +57,8 @@ scalarmap.LookupTable.UseLogScale = settings["UseLogScale"] bar = get_bar() bar.Position = settings["Position"] -bar.Position2 = settings["Size"] -bar.NumberOfLabels = settings["NbLabels"] +#bar.Position2 = settings["Size"] +#bar.NumberOfLabels = settings["NbLabels"] bar.Title = settings["Title"] bar.Orientation = settings["Orientation"] @@ -113,15 +113,15 @@ if abs(pos_y - settings["Position"][1]) > tolerance: errors += 1 # Size of scalar bar -width = recreated_bar.Position2[0] -height = recreated_bar.Position2[1] +#width = recreated_bar.Position2[0] +#height = recreated_bar.Position2[1] -if abs(width - settings["Size"][0]) > tolerance: - print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) - errors += 1 -if abs(height - settings["Size"][1]) > tolerance: - print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) - errors += 1 +#if abs(width - settings["Size"][0]) > tolerance: +# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) +# errors += 1 +#if abs(height - settings["Size"][1]) > tolerance: +# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) +# errors += 1 # Discretize discretize = recreated_scalarmap.LookupTable.Discretize @@ -136,10 +136,10 @@ if nb_colors != settings["NbColors"]: errors += 1 # Number of labels -nb_labels = recreated_bar.NumberOfLabels -if nb_labels != settings["NbLabels"]: - print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) - errors += 1 +#nb_labels = recreated_bar.NumberOfLabels +#if nb_labels != settings["NbLabels"]: +# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) +# errors += 1 # Title title = recreated_bar.Title diff --git a/test/VisuPrs/dump_study/A1.py b/test/VisuPrs/dump_study/A1.py index 82449db7..33608150 100644 --- a/test/VisuPrs/dump_study/A1.py +++ b/test/VisuPrs/dump_study/A1.py @@ -64,8 +64,8 @@ contour_filter.Isosurfaces = surfaces bar = get_bar() bar.Position = settings["Position"] -bar.Position2 = settings["Size"] -bar.NumberOfLabels = settings["NbLabels"] +#bar.Position2 = settings["Size"] +#bar.NumberOfLabels = settings["NbLabels"] bar.Title = settings["Title"] bar.Orientation = settings["Orientation"] @@ -119,15 +119,15 @@ if abs(pos_y - settings["Position"][1]) > tolerance: errors += 1 # Size of scalar bar -width = recreated_bar.Position2[0] -height = recreated_bar.Position2[1] +#width = recreated_bar.Position2[0] +#height = recreated_bar.Position2[1] -if abs(width - settings["Size"][0]) > tolerance: - print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) - errors += 1 -if abs(height - settings["Size"][1]) > tolerance: - print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) - errors += 1 +#if abs(width - settings["Size"][0]) > tolerance: +# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) +# errors += 1 +#if abs(height - settings["Size"][1]) > tolerance: +# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) +# errors += 1 # Discretize discretize = recreated_isosurfaces.LookupTable.Discretize @@ -142,10 +142,10 @@ if nb_colors != settings["NbColors"]: errors += 1 # Number of labels -nb_labels = recreated_bar.NumberOfLabels -if nb_labels != settings["NbLabels"]: - print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) - errors += 1 +#nb_labels = recreated_bar.NumberOfLabels +#if nb_labels != settings["NbLabels"]: +# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) +# errors += 1 # Title title = recreated_bar.Title diff --git a/test/VisuPrs/dump_study/A2.py b/test/VisuPrs/dump_study/A2.py index 20e3cdbb..fcaea046 100644 --- a/test/VisuPrs/dump_study/A2.py +++ b/test/VisuPrs/dump_study/A2.py @@ -64,8 +64,8 @@ cutplanes.Input.SliceOffsetValues = pos bar = get_bar() bar.Position = settings["Position"] -bar.Position2 = settings["Size"] -bar.NumberOfLabels = settings["NbLabels"] +#bar.Position2 = settings["Size"] +#bar.NumberOfLabels = settings["NbLabels"] bar.Title = settings["Title"] bar.Orientation = settings["Orientation"] @@ -119,15 +119,15 @@ if abs(pos_y - settings["Position"][1]) > tolerance: errors += 1 # Size of scalar bar -width = recreated_bar.Position2[0] -height = recreated_bar.Position2[1] +#width = recreated_bar.Position2[0] +#height = recreated_bar.Position2[1] -if abs(width - settings["Size"][0]) > tolerance: - print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) - errors += 1 -if abs(height - settings["Size"][1]) > tolerance: - print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) - errors += 1 +#if abs(width - settings["Size"][0]) > tolerance: +# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) +# errors += 1 +#if abs(height - settings["Size"][1]) > tolerance: +# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) +# errors += 1 # Discretize discretize = recreated_cutplanes.LookupTable.Discretize @@ -142,10 +142,10 @@ if nb_colors != settings["NbColors"]: errors += 1 # Number of labels -nb_labels = recreated_bar.NumberOfLabels -if nb_labels != settings["NbLabels"]: - print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) - errors += 1 +#nb_labels = recreated_bar.NumberOfLabels +#if nb_labels != settings["NbLabels"]: +# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) +# errors += 1 # Title title = recreated_bar.Title diff --git a/test/VisuPrs/dump_study/A3.py b/test/VisuPrs/dump_study/A3.py index 808c9ea6..1555c186 100644 --- a/test/VisuPrs/dump_study/A3.py +++ b/test/VisuPrs/dump_study/A3.py @@ -61,8 +61,8 @@ deformedshape.AmbientColor = settings["ColorComponents"] bar = get_bar() bar.Position = settings["Position"] -bar.Position2 = settings["Size"] -bar.NumberOfLabels = settings["NbLabels"] +#bar.Position2 = settings["Size"] +#bar.NumberOfLabels = settings["NbLabels"] bar.Title = settings["Title"] bar.Orientation = settings["Orientation"] @@ -116,15 +116,15 @@ if abs(pos_y - settings["Position"][1]) > tolerance: errors += 1 # Size of scalar bar -width = recreated_bar.Position2[0] -height = recreated_bar.Position2[1] +#width = recreated_bar.Position2[0] +#height = recreated_bar.Position2[1] -if abs(width - settings["Size"][0]) > tolerance: - print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) - errors += 1 -if abs(height - settings["Size"][1]) > tolerance: - print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) - errors += 1 +#if abs(width - settings["Size"][0]) > tolerance: +# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) +# errors += 1 +#if abs(height - settings["Size"][1]) > tolerance: +# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) +# errors += 1 # Discretize discretize = recreated_deformedshape.LookupTable.Discretize @@ -139,10 +139,10 @@ if nb_colors != settings["NbColors"]: errors += 1 # Number of labels -nb_labels = recreated_bar.NumberOfLabels -if nb_labels != settings["NbLabels"]: - print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) - errors += 1 +#nb_labels = recreated_bar.NumberOfLabels +#if nb_labels != settings["NbLabels"]: +# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) +# errors += 1 # Title title = recreated_bar.Title diff --git a/test/VisuPrs/dump_study/A4.py b/test/VisuPrs/dump_study/A4.py index 5ed08d0b..73aaf0fa 100644 --- a/test/VisuPrs/dump_study/A4.py +++ b/test/VisuPrs/dump_study/A4.py @@ -57,8 +57,8 @@ gausspoints.LookupTable.NumberOfTableValues = settings["NbColors"] bar = get_bar() bar.Position = settings["Position"] -bar.Position2 = settings["Size"] -bar.NumberOfLabels = settings["NbLabels"] +#bar.Position2 = settings["Size"] +#bar.NumberOfLabels = settings["NbLabels"] bar.Title = settings["Title"] # 3. Dump Study @@ -111,15 +111,15 @@ if abs(pos_y - settings["Position"][1]) > tolerance: errors += 1 # Size of scalar bar -width = recreated_bar.Position2[0] -height = recreated_bar.Position2[1] +#width = recreated_bar.Position2[0] +#height = recreated_bar.Position2[1] -if abs(width - settings["Size"][0]) > tolerance: - print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) - errors += 1 -if abs(height - settings["Size"][1]) > tolerance: - print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) - errors += 1 +#if abs(width - settings["Size"][0]) > tolerance: +# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) +# errors += 1 +#if abs(height - settings["Size"][1]) > tolerance: +# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) +# errors += 1 # Discretize discretize = recreated_gausspoints.LookupTable.Discretize @@ -134,10 +134,10 @@ if nb_colors != settings["NbColors"]: errors += 1 # Number of labels -nb_labels = recreated_bar.NumberOfLabels -if nb_labels != settings["NbLabels"]: - print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) - errors += 1 +#nb_labels = recreated_bar.NumberOfLabels +#if nb_labels != settings["NbLabels"]: +# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) +# errors += 1 # Title title = recreated_bar.Title diff --git a/test/VisuPrs/dump_study/A5.py b/test/VisuPrs/dump_study/A5.py index 1d571c5b..0553aa92 100644 --- a/test/VisuPrs/dump_study/A5.py +++ b/test/VisuPrs/dump_study/A5.py @@ -72,8 +72,8 @@ contour_filter.Isosurfaces = surfaces bar = get_bar() bar.Position = settings["Position"] -bar.Position2 = settings["Size"] -bar.NumberOfLabels = settings["NbLabels"] +#bar.Position2 = settings["Size"] +#bar.NumberOfLabels = settings["NbLabels"] bar.Title = settings["Title"] bar.Orientation = settings["Orientation"] @@ -127,15 +127,15 @@ if abs(pos_y - settings["Position"][1]) > tolerance: errors += 1 # Size of scalar bar -width = recreated_bar.Position2[0] -height = recreated_bar.Position2[1] +#width = recreated_bar.Position2[0] +#height = recreated_bar.Position2[1] -if abs(width - settings["Size"][0]) > tolerance: - print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) - errors += 1 -if abs(height - settings["Size"][1]) > tolerance: - print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) - errors += 1 +#if abs(width - settings["Size"][0]) > tolerance: +# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) +# errors += 1 +#if abs(height - settings["Size"][1]) > tolerance: +# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) +# errors += 1 # Discretize discretize = recreated_plot3d.LookupTable.Discretize @@ -150,10 +150,10 @@ if nb_colors != settings["NbColors"]: errors += 1 # Number of labels -nb_labels = recreated_bar.NumberOfLabels -if nb_labels != settings["NbLabels"]: - print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) - errors += 1 +#nb_labels = recreated_bar.NumberOfLabels +#if nb_labels != settings["NbLabels"]: +# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) +# errors += 1 # Title title = recreated_bar.Title diff --git a/test/VisuPrs/dump_study/A6.py b/test/VisuPrs/dump_study/A6.py index 44c5ac3a..0e939f58 100644 --- a/test/VisuPrs/dump_study/A6.py +++ b/test/VisuPrs/dump_study/A6.py @@ -61,8 +61,8 @@ range_max = prs.LookupTable.RGBPoints[4] bar = get_bar() bar.Position = settings["Position"] -bar.Position2 = settings["Size"] -bar.NumberOfLabels = settings["NbLabels"] +#bar.Position2 = settings["Size"] +#bar.NumberOfLabels = settings["NbLabels"] bar.Title = settings["Title"] bar.Orientation = settings["Orientation"] @@ -116,15 +116,15 @@ if abs(pos_y - settings["Position"][1]) > tolerance: errors += 1 # Size of scalar bar -width = recreated_bar.Position2[0] -height = recreated_bar.Position2[1] +#width = recreated_bar.Position2[0] +#height = recreated_bar.Position2[1] -if abs(width - settings["Size"][0]) > tolerance: - print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) - errors += 1 -if abs(height - settings["Size"][1]) > tolerance: - print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) - errors += 1 +#if abs(width - settings["Size"][0]) > tolerance: +# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) +# errors += 1 +#if abs(height - settings["Size"][1]) > tolerance: +# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) +# errors += 1 # Discretize discretize = recreated_prs.LookupTable.Discretize @@ -139,10 +139,10 @@ if nb_colors != settings["NbColors"]: errors += 1 # Number of labels -nb_labels = recreated_bar.NumberOfLabels -if nb_labels != settings["NbLabels"]: - print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) - errors += 1 +#nb_labels = recreated_bar.NumberOfLabels +#if nb_labels != settings["NbLabels"]: +# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) +# errors += 1 # Title title = recreated_bar.Title diff --git a/test/VisuPrs/dump_study/A8.py b/test/VisuPrs/dump_study/A8.py index 411f11ef..f1c1c0e0 100644 --- a/test/VisuPrs/dump_study/A8.py +++ b/test/VisuPrs/dump_study/A8.py @@ -65,8 +65,8 @@ vectors.Input.GlyphType.Center = settings["GlyphPos"] bar = get_bar() bar.Position = settings["Position"] -bar.Position2 = settings["Size"] -bar.NumberOfLabels = settings["NbLabels"] +#bar.Position2 = settings["Size"] +#bar.NumberOfLabels = settings["NbLabels"] bar.Title = settings["Title"] bar.Orientation = settings["Orientation"] @@ -122,15 +122,15 @@ if abs(pos_y - settings["Position"][1]) > tolerance: errors += 1 # Size of scalar bar -width = recreated_bar.Position2[0] -height = recreated_bar.Position2[1] +#width = recreated_bar.Position2[0] +#height = recreated_bar.Position2[1] -if abs(width - settings["Size"][0]) > tolerance: - print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) - errors += 1 -if abs(height - settings["Size"][1]) > tolerance: - print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) - errors += 1 +#if abs(width - settings["Size"][0]) > tolerance: +# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) +# errors += 1 +#if abs(height - settings["Size"][1]) > tolerance: +# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) +# errors += 1 # Discretize discretize = recreated_vectors.LookupTable.Discretize @@ -145,10 +145,10 @@ if nb_colors != settings["NbColors"]: errors += 1 # Number of labels -nb_labels = recreated_bar.NumberOfLabels -if nb_labels != settings["NbLabels"]: - print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) - errors += 1 +#nb_labels = recreated_bar.NumberOfLabels +#if nb_labels != settings["NbLabels"]: +# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) +# errors += 1 # Title title = recreated_bar.Title diff --git a/test/VisuPrs/dump_study/A9.py b/test/VisuPrs/dump_study/A9.py index e05318c2..fdfa65b8 100644 --- a/test/VisuPrs/dump_study/A9.py +++ b/test/VisuPrs/dump_study/A9.py @@ -75,8 +75,8 @@ pos2 = list(cutlines.Input.SliceOffsetValues) bar = get_bar() bar.Position = settings["Position"] -bar.Position2 = settings["Size"] -bar.NumberOfLabels = settings["NbLabels"] +#bar.Position2 = settings["Size"] +#bar.NumberOfLabels = settings["NbLabels"] bar.Title = settings["Title"] bar.Orientation = settings["Orientation"] @@ -130,15 +130,15 @@ if abs(pos_y - settings["Position"][1]) > tolerance: errors += 1 # Size of scalar bar -width = recreated_bar.Position2[0] -height = recreated_bar.Position2[1] +#width = recreated_bar.Position2[0] +#height = recreated_bar.Position2[1] -if abs(width - settings["Size"][0]) > tolerance: - print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) - errors += 1 -if abs(height - settings["Size"][1]) > tolerance: - print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) - errors += 1 +#if abs(width - settings["Size"][0]) > tolerance: +# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0]) +# errors += 1 +#if abs(height - settings["Size"][1]) > tolerance: +# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1]) +# errors += 1 # Discretize discretize = recreated_cutlines.LookupTable.Discretize @@ -153,10 +153,10 @@ if nb_colors != settings["NbColors"]: errors += 1 # Number of labels -nb_labels = recreated_bar.NumberOfLabels -if nb_labels != settings["NbLabels"]: - print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) - errors += 1 +#nb_labels = recreated_bar.NumberOfLabels +#if nb_labels != settings["NbLabels"]: +# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"]) +# errors += 1 # Title title = recreated_bar.Title diff --git a/test/VisuPrs/imps/A3.py b/test/VisuPrs/imps/A3.py index f85c4ef9..9b0545e4 100644 --- a/test/VisuPrs/imps/A3.py +++ b/test/VisuPrs/imps/A3.py @@ -48,7 +48,7 @@ if bar.Orientation != 'Vertical': error = error+1 error = error + compare_lists(bar.Position, [0.85, 0.05]) -error = error + compare_lists(bar.Position2, [0.12, 0.43]) +#error = error + compare_lists(bar.Position2, [0.12, 0.43]) if error > 0: raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...") diff --git a/test/VisuPrs/united/A1.py b/test/VisuPrs/united/A1.py index 3b82286f..ba2af940 100644 --- a/test/VisuPrs/united/A1.py +++ b/test/VisuPrs/united/A1.py @@ -58,7 +58,7 @@ else: bar = get_bar() bar.Orientation = 'Horizontal' bar.Position = [0.1, 0.1] - bar.Position2 = [0.1, 0.25] +# bar.Position2 = [0.1, 0.25] bar.AspectRatio = 3 display_only(scalarmap, view) diff --git a/test/VisuPrs/united/B0.py b/test/VisuPrs/united/B0.py index d6b11f93..60c4358f 100644 --- a/test/VisuPrs/united/B0.py +++ b/test/VisuPrs/united/B0.py @@ -60,16 +60,17 @@ bar.Position = [0.01, 0.01] error = error + compare_lists(bar.Position, [0.01, 0.01]) # Scalar bar size -bar.Position2 = [0.05, 0.5] -error = error + compare_lists(bar.Position2, [0.05, 0.5]) +#bar.Position2 = [0.05, 0.5] +#error = error + compare_lists(bar.Position2, [0.05, 0.5]) # Number of colors and labels smondefshape.LookupTable.NumberOfTableValues = 4 -bar.NumberOfLabels = 5 +#bar.NumberOfLabels = 5 nb_colors = smondefshape.LookupTable.NumberOfTableValues -nb_labels = bar.NumberOfLabels -error = error + compare_lists([nb_colors, nb_labels], [4, 5]) +#nb_labels = bar.NumberOfLabels +#error = error + compare_lists([nb_colors, nb_labels], [4, 5]) +error = error + compare_lists([nb_colors], [4]) # Title bar.Title = 'Pression, Pa'