From fb2fc0723635036634f572b9d1dad6af5d253c61 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Thu, 1 Aug 2019 11:19:48 +0200 Subject: [PATCH] split test smeshplugins to keep apart mg_tetra_parallele which is not working --- .../test_smeshplugin_mg_tetra_parallele.py | 82 +++++++++++++++++++ doc/salome/examples/test_smeshplugins.py | 21 ----- doc/salome/examples/tests.set | 3 +- 3 files changed, 84 insertions(+), 22 deletions(-) create mode 100755 doc/salome/examples/test_smeshplugin_mg_tetra_parallele.py mode change 100644 => 100755 doc/salome/examples/test_smeshplugins.py diff --git a/doc/salome/examples/test_smeshplugin_mg_tetra_parallele.py b/doc/salome/examples/test_smeshplugin_mg_tetra_parallele.py new file mode 100755 index 000000000..a918da29b --- /dev/null +++ b/doc/salome/examples/test_smeshplugin_mg_tetra_parallele.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Test000 +Checks the availability of the external plugins : + 1 MG-TETRA-PARALLELE (GHS3DPRLPLUGIN) +Copyright EDF R&D 2017 +""" +__revision__ = "V1.0" +# +# Computation of the meshes: T/F +ComputeMeshes = True + +import salome + +salome.salome_init() +theStudy = salome.myStudy +# +import iparameters +IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1)) + +# fill list AP_MODULES_LIST +IPAR.append("AP_MODULES_LIST", "Geometry") +IPAR.append("AP_MODULES_LIST", "Mesh") + +ERROR = 0 +MESSAGE = "" +# +while not ERROR : + +### +### A. GEOM component +### + import GEOM + from salome.geom import geomBuilder + geompy = geomBuilder.New() + O = geompy.MakeVertex(0, 0, 0, "0") + OX = geompy.MakeVectorDXDYDZ(1, 0, 0, "OX") + OY = geompy.MakeVectorDXDYDZ(0, 1, 0, "OY") + OZ = geompy.MakeVectorDXDYDZ(0, 0, 1, "OZ") + BOX = geompy.MakeBoxDXDYDZ(200, 200, 200, "BOX") + +### +### B. SMESH component +### + + import SMESH + from salome.smesh import smeshBuilder + + smesh = smeshBuilder.New() + + +# B.7. MG_Tetra_Parallel + TEXTE = "MG_Tetra_Parallel" + MESH_7 = smesh.Mesh(BOX) + smesh.SetName(MESH_7.GetMesh(), "M_"+TEXTE) + MG_CADSurf_Tp = MESH_7.Triangle(algo=smeshBuilder.MG_CADSurf) + try : + MG_Tetra_Parallel = MESH_7.Tetrahedron(algo=smeshBuilder.MG_Tetra_Parallel) + except : + MESSAGE += "\nImpossible d'utiliser "+TEXTE + ERROR += 1 + else : + if ComputeMeshes : + smesh.SetName(MG_Tetra_Parallel.GetAlgorithm(), TEXTE) + OK_COMPUTE = MESH_7.Compute() + if not OK_COMPUTE : + MESSAGE += "\nErreur avec "+TEXTE + ERROR += 1 + else : + print(TEXTE+": OK") + + break + +### +### C. End +### +if ERROR : + raise Exception("\n\nNombre d'erreurs : %d" % ERROR + MESSAGE + "\n") +else : + print("\nAucun problème\n") + diff --git a/doc/salome/examples/test_smeshplugins.py b/doc/salome/examples/test_smeshplugins.py old mode 100644 new mode 100755 index 7449f8e92..0484092e2 --- a/doc/salome/examples/test_smeshplugins.py +++ b/doc/salome/examples/test_smeshplugins.py @@ -9,7 +9,6 @@ Checks the availability of the external plugins : 4 MG-TETRA (GHS3DPLUGIN) 5 MG-HEXA (HEXOTICPLUGIN) 6 MG-HYBRID (HYBRIDPLUGIN) - 7 MG-TETRA-PARALLELE (GHS3DPRLPLUGIN) Copyright EDF R&D 2017 """ __revision__ = "V1.0" @@ -174,26 +173,6 @@ while not ERROR : else : print(TEXTE+": OK") -# B.7. MG_Tetra_Parallel - TEXTE = "MG_Tetra_Parallel" - MESH_7 = smesh.Mesh(BOX) - smesh.SetName(MESH_7.GetMesh(), "M_"+TEXTE) - MG_CADSurf_Tp = MESH_7.Triangle(algo=smeshBuilder.MG_CADSurf) - try : - MG_Tetra_Parallel = MESH_7.Tetrahedron(algo=smeshBuilder.MG_Tetra_Parallel) - except : - MESSAGE += "\nImpossible d'utiliser "+TEXTE - ERROR += 1 - else : - if ComputeMeshes : - smesh.SetName(MG_Tetra_Parallel.GetAlgorithm(), TEXTE) - OK_COMPUTE = MESH_7.Compute() - if not OK_COMPUTE : - MESSAGE += "\nErreur avec "+TEXTE - ERROR += 1 - else : - print(TEXTE+": OK") - break ### diff --git a/doc/salome/examples/tests.set b/doc/salome/examples/tests.set index 674e9a5a9..5199a9c77 100644 --- a/doc/salome/examples/tests.set +++ b/doc/salome/examples/tests.set @@ -43,7 +43,7 @@ SET(BAD_TESTS quality_controls_ex22.py viewing_meshes_ex01.py radial_prism_3d_algo.py - test_smeshplugins.py + test_smeshplugin_mg_tetra_parallele.py ) SET(GOOD_TESTS @@ -181,6 +181,7 @@ SET(GOOD_TESTS split_biquad.py quad_medial_axis_algo.py defining_hypotheses_len_near_vertex.py + test_smeshplugins.py ) SET(EXAMPLES_TESTS ${BAD_TESTS} ${GOOD_TESTS} testme.py) -- 2.39.2