From 7ac82e74330ce8df5fe30918e4999f68fb8d9256 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 8 Oct 2014 17:21:23 +0200 Subject: [PATCH] Porting (new API) to PV4.2 the tests. --- src/Plugins/MEDReader/Test/testMEDReader11.py | 6 ++---- src/Plugins/MEDReader/Test/testMEDReader12.py | 3 +-- src/Plugins/MEDReader/Test/testMEDReader2.py | 3 +-- src/Plugins/MEDReader/Test/testMEDReader4.py | 4 ++-- src/Plugins/MEDReader/Test/testMEDReader5.py | 3 +-- src/Plugins/MEDReader/Test/testMEDReader6.py | 2 +- 6 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/Plugins/MEDReader/Test/testMEDReader11.py b/src/Plugins/MEDReader/Test/testMEDReader11.py index 5b5db779..95a7b258 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader11.py +++ b/src/Plugins/MEDReader/Test/testMEDReader11.py @@ -155,9 +155,8 @@ a1_ENTHALPIE_PiecewiseFunction = CreatePiecewiseFunction( Points=[1278022.919558 DataRepresentation1.Representation = 'Wireframe' DataRepresentation1.ScalarOpacityFunction = a1_ENTHALPIE_PiecewiseFunction -DataRepresentation1.ColorArrayName = ('CELL_DATA', 'ENTHALPIE') +DataRepresentation1.ColorArrayName = ('CELLS', 'ENTHALPIE') DataRepresentation1.LookupTable = a1_ENTHALPIE_PVLookupTable -DataRepresentation1.ColorAttributeType = 'CELL_DATA' testMEDReader11_med = MEDReader( FileName=fname ) @@ -178,9 +177,8 @@ a1_VITESSEX_PVLookupTable = GetLookupTableForArray( "VITESSE X", 1, RGBPoints=[0 a1_VITESSEX_PiecewiseFunction = CreatePiecewiseFunction( Points=[0.0, 0.0, 0.5, 0.0, 1e-16, 1.0, 0.5, 0.0] ) DataRepresentation2.ScalarOpacityFunction = a1_VITESSEX_PiecewiseFunction -DataRepresentation2.ColorArrayName = ('CELL_DATA', 'VITESSE X') +DataRepresentation2.ColorArrayName = ('CELLS', 'VITESSE X') DataRepresentation2.LookupTable = a1_VITESSEX_PVLookupTable -DataRepresentation2.ColorAttributeType = 'CELL_DATA' a1_VITESSEX_PVLookupTable.RGBPoints = [-0.04176214531137861, 0.23, 0.299, 0.754, 0.35689831830849095, 0.865, 0.865, 0.865, 0.7555587819283606, 0.706, 0.016, 0.15] a1_VITESSEX_PVLookupTable.ScalarOpacityFunction = a1_VITESSEX_PiecewiseFunction diff --git a/src/Plugins/MEDReader/Test/testMEDReader12.py b/src/Plugins/MEDReader/Test/testMEDReader12.py index 5c700b60..d2fb0179 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader12.py +++ b/src/Plugins/MEDReader/Test/testMEDReader12.py @@ -86,9 +86,8 @@ a1_POROSITE_PVLookupTable = GetLookupTableForArray( "POROSITE", 1, RGBPoints=[0. a1_POROSITE_PiecewiseFunction = CreatePiecewiseFunction( Points=[0.4734426322438599, 0.0, 0.5, 0.0, 0.5814307903048255, 1.0, 0.5, 0.0] ) DataRepresentation2.ScalarOpacityFunction = a1_POROSITE_PiecewiseFunction -DataRepresentation2.ColorArrayName = ('CELL_DATA', 'POROSITE') +DataRepresentation2.ColorArrayName = ('CELLS', 'POROSITE') DataRepresentation2.LookupTable = a1_POROSITE_PVLookupTable -DataRepresentation2.ColorAttributeType = 'CELL_DATA' Render() RenderView1.ViewSize =[300,300] diff --git a/src/Plugins/MEDReader/Test/testMEDReader2.py b/src/Plugins/MEDReader/Test/testMEDReader2.py index bc3e24c5..460e8ed7 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader2.py +++ b/src/Plugins/MEDReader/Test/testMEDReader2.py @@ -94,9 +94,8 @@ a2_ACellField_PVLookupTable=GetLookupTableForArray( "ACellField", 2, RGBPoints=[ a2_ACellField_PiecewiseFunction=CreatePiecewiseFunction( Points=[0.0, 0.0, 0.5, 0.0, 1.0, 1.0, 0.5, 0.0] ) a2_ACellField_PVLookupTable.ScalarOpacityFunction = a2_ACellField_PiecewiseFunction DataRepresentation5.ScalarOpacityFunction = a2_ACellField_PiecewiseFunction -DataRepresentation5.ColorArrayName = 'ACellField' DataRepresentation5.LookupTable = a2_ACellField_PVLookupTable -DataRepresentation5.ColorAttributeType = 'CELL_DATA' +DataRepresentation5.ColorArrayName = ("CELLS", "ACellField") RenderView1 = GetRenderView() RenderView1.CenterOfRotation = [3.0, 3.0, 3.0] diff --git a/src/Plugins/MEDReader/Test/testMEDReader4.py b/src/Plugins/MEDReader/Test/testMEDReader4.py index 6aec3369..6857b141 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader4.py +++ b/src/Plugins/MEDReader/Test/testMEDReader4.py @@ -68,9 +68,9 @@ testMEDReader4_med=MEDReader(FileName=fname) testMEDReader4_med.AllArrays=['TS0/mesh/ComSup0/f0NoPfl@@][@@P1','TS0/mesh/ComSup0/mesh@@][@@P1'] #testMEDReader4_med.AllTimeSteps=['0000'] -Glyph1=Glyph(GlyphType="Sphere",GlyphTransform="Transform2" ) +Glyph1=Glyph(Input=testMEDReader4_med,GlyphType='Sphere') Glyph1.Scalars=['POINTS','f0NoPfl'] -Glyph1.SetScaleFactor=0.3 +Glyph1.ScaleFactor=0.3 Glyph1.Vectors=['POINTS', ''] Glyph1.GlyphTransform="Transform2" diff --git a/src/Plugins/MEDReader/Test/testMEDReader5.py b/src/Plugins/MEDReader/Test/testMEDReader5.py index 0f211a2f..0e1c62a4 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader5.py +++ b/src/Plugins/MEDReader/Test/testMEDReader5.py @@ -106,9 +106,8 @@ DataRepresentation2.EdgeColor = [0.0, 0.0, 0.5000076295109483] DataRepresentation2.ScalarOpacityUnitDistance = 1.5768745057161244 DataRepresentation2.ExtractedBlockIndex = 1 DataRepresentation2.ScaleFactor = 0.4 -DataRepresentation2.ColorArrayName='fNode' +DataRepresentation2.ColorArrayName=('POINTS','fNode') DataRepresentation2.LookupTable=LookupTable -DataRepresentation2.ColorAttributeType='POINT_DATA' RenderView1.ViewSize=[300,300] diff --git a/src/Plugins/MEDReader/Test/testMEDReader6.py b/src/Plugins/MEDReader/Test/testMEDReader6.py index a576f67d..ec4680f1 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader6.py +++ b/src/Plugins/MEDReader/Test/testMEDReader6.py @@ -71,7 +71,7 @@ GaussPoints1.SelectSourceArray = ['CELLS','ELGA@0'] Glyph1 = Glyph( Input=GaussPoints1, GlyphType="Sphere", GlyphTransform="Transform2" ) Glyph1.GlyphType = "Sphere" Glyph1.Vectors = ['POINTS', ''] -Glyph1.SetScaleFactor = 0.29 +Glyph1.ScaleFactor = 0.29 RenderView1 = GetRenderView() RenderView1.CameraFocalPoint = [1.5, 1.5, 0.0] -- 2.39.2