mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 01:10:35 +05:00
Merge commit 'd1a4e96b1a71671fa1f529461744d55df36df7b6'
This commit is contained in:
commit
fd3745e6c2
@ -1,82 +0,0 @@
|
||||
#!/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_without_session()
|
||||
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")
|
||||
|
@ -67,11 +67,6 @@ SET(BAD_TESTS
|
||||
SMESH_create_dual_mesh_tpipe.py
|
||||
netgen_runner.py
|
||||
)
|
||||
IF(NOT WIN32)
|
||||
LIST(APPEND BAD_TESTS
|
||||
test_smeshplugin_mg_tetra_parallele.py
|
||||
)
|
||||
ENDIF(NOT WIN32)
|
||||
|
||||
# The following tests can be executed with both 'make test' and 'salome test'.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user