Merge branch 'V9_7_BR'
@ -27,7 +27,7 @@ INCLUDE(CMakeDependentOption)
|
||||
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
|
||||
|
||||
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 9)
|
||||
SET(${PROJECT_NAME_UC}_MINOR_VERSION 6)
|
||||
SET(${PROJECT_NAME_UC}_MINOR_VERSION 7)
|
||||
SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
|
||||
SET(${PROJECT_NAME_UC}_VERSION
|
||||
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
|
||||
|
45
doc/salome/examples/blocFissure_01_without_session.py
Executable file
@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Tests de blocFissure ; en standalone
|
||||
|
||||
Cas tests basés sur les matériels :
|
||||
. cubeAngle
|
||||
. cubeFin
|
||||
|
||||
Copyright 2021 EDF
|
||||
Gérald NICOLAS
|
||||
+33.1.78.19.43.52
|
||||
"""
|
||||
|
||||
__revision__ = "V02.04"
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Lancement des cas-tests
|
||||
import salome
|
||||
salome.standalone()
|
||||
salome.salome_init()
|
||||
|
||||
from blocFissure.CasTests.blocFissureTest import blocFissureTest
|
||||
BLOCFISSURE_TEST = blocFissureTest(["cubeAngle", "cubeAngle_2","cubeCoin", "cubeMilieu", "cubeTransverse"])
|
||||
MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement()
|
||||
#sys.stdout.write(MESSAGE_ERREUR)
|
||||
del BLOCFISSURE_TEST
|
||||
|
||||
# Diagnostic
|
||||
if MESSAGE_ERREUR:
|
||||
if ( "NOOK" in MESSAGE_ERREUR ):
|
||||
LAUX = MESSAGE_ERREUR.split()
|
||||
ERREUR = int(LAUX[LAUX.index("NOOK")+2])
|
||||
else:
|
||||
ERREUR = 0
|
||||
else:
|
||||
MESSAGE_ERREUR = "Impossible de trouver le diagnostic de la procédure de tests."
|
||||
ERREUR = -1
|
||||
|
||||
if ERREUR:
|
||||
sys.stderr.write(MESSAGE_ERREUR)
|
||||
#raise Exception(MESSAGE_ERREUR)
|
||||
assert(False)
|
||||
|
49
doc/salome/examples/blocFissure_02_without_session.py
Executable file
@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Tests de blocFissure ; en standalone
|
||||
|
||||
Cas tests basés sur les matériels :
|
||||
. decoupeCylindre
|
||||
. disque_perce
|
||||
. fissureGauche
|
||||
. fissureGauche_2
|
||||
+ ellipse, ellipse_disque, ellipse_probleme
|
||||
|
||||
Copyright 2021 EDF
|
||||
Gérald NICOLAS
|
||||
+33.1.78.19.43.52
|
||||
"""
|
||||
|
||||
__revision__ = "V02.04"
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Lancement des cas-tests
|
||||
import salome
|
||||
salome.standalone()
|
||||
salome.salome_init()
|
||||
|
||||
from blocFissure.CasTests.blocFissureTest import blocFissureTest
|
||||
BLOCFISSURE_TEST = blocFissureTest(["cylindre", "cylindre_2", "disquePerce", "faceGauche","ellipse_1", "ellipse_2"])
|
||||
#BLOCFISSURE_TEST = blocFissureTest(["cylindre", "cylindre_2", "disquePerce", "faceGauche","ellipse_1", "ellipse_2", "faceGauche_2"])
|
||||
MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement()
|
||||
#sys.stdout.write(MESSAGE_ERREUR)
|
||||
del BLOCFISSURE_TEST
|
||||
|
||||
# Diagnostic
|
||||
if MESSAGE_ERREUR:
|
||||
if ( "NOOK" in MESSAGE_ERREUR ):
|
||||
LAUX = MESSAGE_ERREUR.split()
|
||||
ERREUR = int(LAUX[LAUX.index("NOOK")+2])
|
||||
else:
|
||||
ERREUR = 0
|
||||
else:
|
||||
MESSAGE_ERREUR = "Impossible de trouver le diagnostic de la procédure de tests."
|
||||
ERREUR = -1
|
||||
|
||||
if ERREUR:
|
||||
sys.stderr.write(MESSAGE_ERREUR)
|
||||
#raise Exception(MESSAGE_ERREUR)
|
||||
assert(False)
|
||||
|
45
doc/salome/examples/blocFissure_03_without_session.py
Executable file
@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Tests de blocFissure ; en standalone
|
||||
|
||||
Cas tests basés sur les matériels :
|
||||
. eprouvetteCourbe
|
||||
. eprouvetteDroite
|
||||
|
||||
Copyright 2021 EDF
|
||||
Gérald NICOLAS
|
||||
+33.1.78.19.43.52
|
||||
"""
|
||||
|
||||
__revision__ = "V02.03"
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Lancement des cas-tests
|
||||
import salome
|
||||
salome.standalone()
|
||||
salome.salome_init()
|
||||
|
||||
from blocFissure.CasTests.blocFissureTest import blocFissureTest
|
||||
BLOCFISSURE_TEST = blocFissureTest(["eprouvetteCourbe", "eprouvetteDroite", "eprouvetteDroite_2"])
|
||||
MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement()
|
||||
#sys.stdout.write(MESSAGE_ERREUR)
|
||||
del BLOCFISSURE_TEST
|
||||
|
||||
# Diagnostic
|
||||
if MESSAGE_ERREUR:
|
||||
if ( "NOOK" in MESSAGE_ERREUR ):
|
||||
LAUX = MESSAGE_ERREUR.split()
|
||||
ERREUR = int(LAUX[LAUX.index("NOOK")+2])
|
||||
else:
|
||||
ERREUR = 0
|
||||
else:
|
||||
MESSAGE_ERREUR = "Impossible de trouver le diagnostic de la procédure de tests."
|
||||
ERREUR = -1
|
||||
|
||||
if ERREUR:
|
||||
sys.stderr.write(MESSAGE_ERREUR)
|
||||
#raise Exception(MESSAGE_ERREUR)
|
||||
assert(False)
|
||||
|
43
doc/salome/examples/blocFissure_04_without_session.py
Executable file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Tests de blocFissure ; en standalone
|
||||
|
||||
Cas tests basés sans matériels (1/3)
|
||||
|
||||
Copyright 2021 EDF
|
||||
Gérald NICOLAS
|
||||
+33.1.78.19.43.52
|
||||
"""
|
||||
|
||||
__revision__ = "V02.03"
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Lancement des cas-tests
|
||||
import salome
|
||||
salome.standalone()
|
||||
salome.salome_init()
|
||||
|
||||
from blocFissure.CasTests.blocFissureTest import blocFissureTest
|
||||
BLOCFISSURE_TEST = blocFissureTest(["fissureCoude_1", "fissureCoude_2", "fissureCoude_3", "fissureCoude_4", "fissureCoude_5"])
|
||||
MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement()
|
||||
#sys.stdout.write(MESSAGE_ERREUR)
|
||||
del BLOCFISSURE_TEST
|
||||
|
||||
# Diagnostic
|
||||
if MESSAGE_ERREUR:
|
||||
if ( "NOOK" in MESSAGE_ERREUR ):
|
||||
LAUX = MESSAGE_ERREUR.split()
|
||||
ERREUR = int(LAUX[LAUX.index("NOOK")+2])
|
||||
else:
|
||||
ERREUR = 0
|
||||
else:
|
||||
MESSAGE_ERREUR = "Impossible de trouver le diagnostic de la procédure de tests."
|
||||
ERREUR = -1
|
||||
|
||||
if ERREUR:
|
||||
sys.stderr.write(MESSAGE_ERREUR)
|
||||
#raise Exception(MESSAGE_ERREUR)
|
||||
assert(False)
|
||||
|
43
doc/salome/examples/blocFissure_05_without_session.py
Executable file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Tests de blocFissure ; en standalone
|
||||
|
||||
Cas tests basés sans matériels (1/3)
|
||||
|
||||
Copyright 2021 EDF
|
||||
Gérald NICOLAS
|
||||
+33.1.78.19.43.52
|
||||
"""
|
||||
|
||||
__revision__ = "V02.03"
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Lancement des cas-tests
|
||||
import salome
|
||||
salome.standalone()
|
||||
salome.salome_init()
|
||||
|
||||
from blocFissure.CasTests.blocFissureTest import blocFissureTest
|
||||
BLOCFISSURE_TEST = blocFissureTest(["fissureCoude_6", "fissureCoude_7", "fissureCoude_8", "fissureCoude_9", "fissureCoude_10"])
|
||||
MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement()
|
||||
#sys.stdout.write(MESSAGE_ERREUR)
|
||||
del BLOCFISSURE_TEST
|
||||
|
||||
# Diagnostic
|
||||
if MESSAGE_ERREUR:
|
||||
if ( "NOOK" in MESSAGE_ERREUR ):
|
||||
LAUX = MESSAGE_ERREUR.split()
|
||||
ERREUR = int(LAUX[LAUX.index("NOOK")+2])
|
||||
else:
|
||||
ERREUR = 0
|
||||
else:
|
||||
MESSAGE_ERREUR = "Impossible de trouver le diagnostic de la procédure de tests."
|
||||
ERREUR = -1
|
||||
|
||||
if ERREUR:
|
||||
sys.stderr.write(MESSAGE_ERREUR)
|
||||
#raise Exception(MESSAGE_ERREUR)
|
||||
assert(False)
|
||||
|
43
doc/salome/examples/blocFissure_06_without_session.py
Executable file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Tests de blocFissure ; en standalone
|
||||
|
||||
Cas tests basés sans matériels (1/3)
|
||||
|
||||
Copyright 2021 EDF
|
||||
Gérald NICOLAS
|
||||
+33.1.78.19.43.52
|
||||
"""
|
||||
|
||||
__revision__ = "V02.03"
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Lancement des cas-tests
|
||||
import salome
|
||||
salome.standalone()
|
||||
salome.salome_init()
|
||||
|
||||
from blocFissure.CasTests.blocFissureTest import blocFissureTest
|
||||
BLOCFISSURE_TEST = blocFissureTest(["fissure_Coude", "fissure_Coude_4"])
|
||||
MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement()
|
||||
#sys.stdout.write(MESSAGE_ERREUR)
|
||||
del BLOCFISSURE_TEST
|
||||
|
||||
# Diagnostic
|
||||
if MESSAGE_ERREUR:
|
||||
if ( "NOOK" in MESSAGE_ERREUR ):
|
||||
LAUX = MESSAGE_ERREUR.split()
|
||||
ERREUR = int(LAUX[LAUX.index("NOOK")+2])
|
||||
else:
|
||||
ERREUR = 0
|
||||
else:
|
||||
MESSAGE_ERREUR = "Impossible de trouver le diagnostic de la procédure de tests."
|
||||
ERREUR = -1
|
||||
|
||||
if ERREUR:
|
||||
sys.stderr.write(MESSAGE_ERREUR)
|
||||
#raise Exception(MESSAGE_ERREUR)
|
||||
assert(False)
|
||||
|
46
doc/salome/examples/blocFissure_07_without_session.py
Executable file
@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Tests de blocFissure ; en standalone
|
||||
|
||||
Cas tests basés sur les matériels :
|
||||
. vis
|
||||
. tube
|
||||
|
||||
Copyright 2021 EDF
|
||||
Gérald NICOLAS
|
||||
+33.1.78.19.43.52
|
||||
"""
|
||||
|
||||
__revision__ = "V02.04"
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Lancement des cas-tests
|
||||
import salome
|
||||
salome.standalone()
|
||||
salome.salome_init()
|
||||
|
||||
from blocFissure.CasTests.blocFissureTest import blocFissureTest
|
||||
BLOCFISSURE_TEST = blocFissureTest(["vis_1"])
|
||||
#BLOCFISSURE_TEST = blocFissureTest(["vis_1", "tube"])
|
||||
MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement()
|
||||
#sys.stdout.write(MESSAGE_ERREUR)
|
||||
del BLOCFISSURE_TEST
|
||||
|
||||
# Diagnostic
|
||||
if MESSAGE_ERREUR:
|
||||
if ( "NOOK" in MESSAGE_ERREUR ):
|
||||
LAUX = MESSAGE_ERREUR.split()
|
||||
ERREUR = int(LAUX[LAUX.index("NOOK")+2])
|
||||
else:
|
||||
ERREUR = 0
|
||||
else:
|
||||
MESSAGE_ERREUR = "Impossible de trouver le diagnostic de la procédure de tests."
|
||||
ERREUR = -1
|
||||
|
||||
if ERREUR:
|
||||
sys.stderr.write(MESSAGE_ERREUR)
|
||||
#raise Exception(MESSAGE_ERREUR)
|
||||
assert(False)
|
||||
|
@ -1,48 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Tests de blocFissure ; en standalone
|
||||
|
||||
Copyright 2021 EDF
|
||||
Gérald NICOLAS
|
||||
+33.1.78.19.43.52
|
||||
"""
|
||||
|
||||
__revision__ = "V02.01"
|
||||
|
||||
import os
|
||||
import tempfile
|
||||
import sys
|
||||
|
||||
# Fichier de diagnostic
|
||||
LOGFILE = os.path.join(tempfile.gettempdir(),"blocFissure.log")
|
||||
if os.path.isfile(LOGFILE):
|
||||
os.remove(LOGFILE)
|
||||
|
||||
# Lancement des cas-tests
|
||||
import salome
|
||||
salome.standalone()
|
||||
salome.salome_init()
|
||||
|
||||
from blocFissure.materielCasTests import genereMateriel
|
||||
|
||||
from blocFissure.CasTests import execution_Cas
|
||||
|
||||
# Diagnostic
|
||||
ERREUR = 0
|
||||
if os.path.isfile(LOGFILE):
|
||||
with open(LOGFILE, 'r') as FICHIER:
|
||||
LES_LIGNES = FICHIER.readlines()
|
||||
for LIGNE in LES_LIGNES:
|
||||
#print (LIGNE[:-1])
|
||||
if ( "NOOK" in LIGNE ):
|
||||
MESSAGE_ERREUR = LIGNE
|
||||
ERREUR = int(LIGNE.split()[-1])
|
||||
break
|
||||
else:
|
||||
MESSAGE_ERREUR = "Impossible de trouver le fichier de diagnostic {}".format(LOGFILE)
|
||||
ERREUR = -1
|
||||
|
||||
if ERREUR:
|
||||
sys.stderr.write(MESSAGE_ERREUR)
|
||||
#raise Exception(MESSAGE_ERREUR)
|
||||
assert(False)
|
@ -46,7 +46,13 @@ SET(BAD_TESTS
|
||||
test_smeshplugin_mg_tetra_parallele.py
|
||||
test_smeshplugins.py
|
||||
MGAdaptTests_without_session.py
|
||||
blocFissure_without_session.py
|
||||
blocFissure_01_without_session.py
|
||||
blocFissure_02_without_session.py
|
||||
blocFissure_03_without_session.py
|
||||
blocFissure_04_without_session.py
|
||||
blocFissure_05_without_session.py
|
||||
blocFissure_06_without_session.py
|
||||
blocFissure_07_without_session.py
|
||||
)
|
||||
|
||||
SET(GOOD_TESTS
|
||||
|
@ -136,7 +136,7 @@ namespace SMESH{
|
||||
void GetHistogram(int nbIntervals,
|
||||
std::vector<int>& nbEvents,
|
||||
std::vector<double>& funValues,
|
||||
const std::vector<smIdType>& elements,
|
||||
const std::vector<::smIdType>& elements,
|
||||
const double* minmax=0,
|
||||
const bool isLogarithmic = false);
|
||||
bool IsApplicable( long theElementId ) const;
|
||||
@ -147,7 +147,7 @@ namespace SMESH{
|
||||
void SetPrecision( const long thePrecision );
|
||||
double Round( const double & value );
|
||||
|
||||
bool GetPoints(const smIdType theId, TSequenceOfXYZ& theRes) const;
|
||||
bool GetPoints(const ::smIdType theId, TSequenceOfXYZ& theRes) const;
|
||||
static bool GetPoints(const SMDS_MeshElement* theElem, TSequenceOfXYZ& theRes);
|
||||
protected:
|
||||
const SMDS_Mesh* myMesh;
|
||||
@ -594,7 +594,7 @@ namespace SMESH{
|
||||
virtual void SetMesh( const SMDS_Mesh* theMesh );
|
||||
virtual bool IsSatisfy( long theElementId );
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
static bool IsFreeEdge( const SMDS_MeshNode** theNodes, const smIdType theFaceId );
|
||||
static bool IsFreeEdge( const SMDS_MeshNode** theNodes, const ::smIdType theFaceId );
|
||||
typedef long TElemId;
|
||||
struct Border{
|
||||
TElemId myElemId;
|
||||
@ -653,8 +653,8 @@ namespace SMESH{
|
||||
protected:
|
||||
const SMDS_Mesh* myMesh;
|
||||
|
||||
std::vector< smIdType > myMin;
|
||||
std::vector< smIdType > myMax;
|
||||
std::vector< ::smIdType > myMin;
|
||||
std::vector< ::smIdType > myMax;
|
||||
TIDsMap myIds;
|
||||
|
||||
SMDSAbs_ElementType myType;
|
||||
@ -1165,9 +1165,9 @@ namespace SMESH{
|
||||
public:
|
||||
ConnectedElements();
|
||||
//virtual Predicate* clone() const { return new ConnectedElements( *this ); }
|
||||
void SetNode( smIdType nodeID );
|
||||
void SetNode( ::smIdType nodeID );
|
||||
void SetPoint( double x, double y, double z );
|
||||
smIdType GetNode() const;
|
||||
::smIdType GetNode() const;
|
||||
std::vector<double> GetPoint() const;
|
||||
|
||||
void SetType( SMDSAbs_ElementType theType );
|
||||
@ -1179,14 +1179,14 @@ namespace SMESH{
|
||||
//const std::set<long>& GetDomainIDs() const { return myOkIDs; }
|
||||
|
||||
private:
|
||||
smIdType myNodeID;
|
||||
::smIdType myNodeID;
|
||||
std::vector<double> myXYZ;
|
||||
SMDSAbs_ElementType myType;
|
||||
TMeshModifTracer myMeshModifTracer;
|
||||
|
||||
void clearOkIDs();
|
||||
bool myOkIDsReady;
|
||||
std::set<smIdType> myOkIDs; // empty means that there is one domain
|
||||
std::set<::smIdType> myOkIDs; // empty means that there is one domain
|
||||
};
|
||||
typedef boost::shared_ptr<ConnectedElements> ConnectedElementsPtr;
|
||||
|
||||
|
@ -157,17 +157,17 @@ namespace SMESH
|
||||
}
|
||||
}
|
||||
|
||||
std::map<SMDSAbs_ElementType,smIdType> GetEntitiesFromObject(SMESH_VisualObj *theObject) {
|
||||
std::map<SMDSAbs_ElementType,smIdType> entities;
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_0DElement,
|
||||
std::map<SMDSAbs_ElementType,::smIdType> GetEntitiesFromObject(SMESH_VisualObj *theObject) {
|
||||
std::map<SMDSAbs_ElementType,::smIdType> entities;
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,::smIdType>(SMDSAbs_0DElement,
|
||||
theObject ? theObject->GetNbEntities(SMDSAbs_0DElement) : 0));
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_Ball,
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,::smIdType>(SMDSAbs_Ball,
|
||||
theObject ? theObject->GetNbEntities(SMDSAbs_Ball) : 0));
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_Edge,
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,::smIdType>(SMDSAbs_Edge,
|
||||
theObject ? theObject->GetNbEntities(SMDSAbs_Edge) : 0));
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_Face,
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,::smIdType>(SMDSAbs_Face,
|
||||
theObject ? theObject->GetNbEntities(SMDSAbs_Face) : 0));
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_Volume,
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,::smIdType>(SMDSAbs_Volume,
|
||||
theObject ? theObject->GetNbEntities(SMDSAbs_Volume) : 0));
|
||||
return entities;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ SMESHOBJECT_EXPORT
|
||||
QString def);
|
||||
|
||||
SMESHOBJECT_EXPORT
|
||||
std::map<SMDSAbs_ElementType,smIdType>
|
||||
std::map<SMDSAbs_ElementType,::smIdType>
|
||||
GetEntitiesFromObject(SMESH_VisualObj *theObject);
|
||||
|
||||
SMESHOBJECT_EXPORT
|
||||
|
@ -557,7 +557,7 @@ void SMESH_VisualObjDef::updateEntitiesFlags()
|
||||
unsigned int tmp = myEntitiesState;
|
||||
ClearEntitiesFlags();
|
||||
|
||||
map<SMDSAbs_ElementType,smIdType> entities = SMESH::GetEntitiesFromObject(this);
|
||||
map<SMDSAbs_ElementType,::smIdType> entities = SMESH::GetEntitiesFromObject(this);
|
||||
|
||||
|
||||
if( myEntitiesCache[SMDSAbs_0DElement] != 0 ||
|
||||
|
@ -1226,7 +1226,7 @@ namespace
|
||||
SMESH::Controls::NumericalFunctor* aNumFun =
|
||||
dynamic_cast<SMESH::Controls::NumericalFunctor*>( aFunctor.get() );
|
||||
if ( aNumFun ) {
|
||||
std::vector<SMESH::smIdType> elements;
|
||||
std::vector<smIdType> elements;
|
||||
SMESH::SMESH_Mesh_var mesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(anIO);
|
||||
if ( mesh->_is_nil() ) {
|
||||
SMESH::SMESH_IDSource_var idSource =
|
||||
|
@ -1226,8 +1226,8 @@ namespace SMESH
|
||||
|
||||
int GetEdgeNodes(SVTK_Selector* theSelector,
|
||||
const TVisualObjPtr& theVisualObject,
|
||||
smIdType& theId1,
|
||||
smIdType& theId2)
|
||||
::smIdType& theId1,
|
||||
::smIdType& theId2)
|
||||
{
|
||||
const SALOME_ListIO& selected = theSelector->StoredIObjects();
|
||||
|
||||
@ -1243,9 +1243,9 @@ namespace SMESH
|
||||
if ( aMapIndex.Extent() != 2 )
|
||||
return -1;
|
||||
|
||||
smIdType anObjId = -1, anEdgeNum = -1;
|
||||
for ( smIdType i = 1; i <= aMapIndex.Extent(); i++ ) {
|
||||
smIdType aVal = aMapIndex( i );
|
||||
::smIdType anObjId = -1, anEdgeNum = -1;
|
||||
for ( ::smIdType i = 1; i <= aMapIndex.Extent(); i++ ) {
|
||||
::smIdType aVal = aMapIndex( i );
|
||||
if ( aVal > 0 )
|
||||
anObjId = aVal;
|
||||
else
|
||||
@ -1343,7 +1343,7 @@ namespace SMESH
|
||||
}
|
||||
|
||||
|
||||
int GetEdgeNodes( LightApp_SelectionMgr* theMgr, smIdType& theId1, smIdType& theId2 )
|
||||
int GetEdgeNodes( LightApp_SelectionMgr* theMgr, ::smIdType& theId1, ::smIdType& theId2 )
|
||||
{
|
||||
SALOME_ListIO selected; theMgr->selectedObjects( selected );
|
||||
|
||||
@ -1363,9 +1363,9 @@ namespace SMESH
|
||||
if ( aMapIndex.Extent() != 2 )
|
||||
return -1;
|
||||
|
||||
smIdType anObjId = -1, anEdgeNum = -1;
|
||||
for ( smIdType i = 1; i <= aMapIndex.Extent(); i++ ) {
|
||||
smIdType aVal = aMapIndex( i );
|
||||
::smIdType anObjId = -1, anEdgeNum = -1;
|
||||
for ( ::smIdType i = 1; i <= aMapIndex.Extent(); i++ ) {
|
||||
::smIdType aVal = aMapIndex( i );
|
||||
if ( aVal > 0 )
|
||||
anObjId = aVal;
|
||||
else
|
||||
|
@ -169,7 +169,7 @@ SMESHGUI_EXPORT
|
||||
const Handle(SALOME_InteractiveObject)&,
|
||||
QString& );
|
||||
SMESHGUI_EXPORT
|
||||
int GetEdgeNodes( SVTK_Selector*, const TVisualObjPtr&, smIdType&, smIdType& );
|
||||
int GetEdgeNodes( SVTK_Selector*, const TVisualObjPtr&, ::smIdType&, ::smIdType& );
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
SMESHGUI_EXPORT
|
||||
@ -189,7 +189,7 @@ SMESHGUI_EXPORT
|
||||
const bool = true );
|
||||
|
||||
SMESHGUI_EXPORT
|
||||
int GetEdgeNodes( LightApp_SelectionMgr*, smIdType&, smIdType& );
|
||||
int GetEdgeNodes( LightApp_SelectionMgr*, ::smIdType&, ::smIdType& );
|
||||
|
||||
SMESHGUI_EXPORT
|
||||
void SetControlsPrecision( const long );
|
||||
|
@ -4795,7 +4795,7 @@ Il ne peut pas être supprimé.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Generate mesh from CAD model or import mesh</source>
|
||||
<translation type="unfinished">Generate mesh from CAD model or import mesh</translation>
|
||||
<translation type="unfinished">Créer un maillage à partir d'un modèle CAO ou par importation</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -5151,7 +5151,7 @@ Ouvrez une fenêtre VTK et essayez de nouveau</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>PREF_SELECTION_INCREMENT</source>
|
||||
<translation type="unfinished">Elements width increment</translation>
|
||||
<translation type="unfinished">Incrément de largeur d'éléments</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>PREF_OBJECT_COLOR</source>
|
||||
@ -5247,59 +5247,59 @@ Ouvrez une fenêtre VTK et essayez de nouveau</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_WELCOME_TO_SMESH</source>
|
||||
<translation type="unfinished">Welcome to Mesh</translation>
|
||||
<translation type="unfinished">Bienvenue dans le module Mesh</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_GRP_CREATE_MESH</source>
|
||||
<translation type="unfinished">Create mesh</translation>
|
||||
<translation type="unfinished">Créer un maillage</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_DEFINE_ALGOS</source>
|
||||
<translation type="unfinished">Choose algorithms</translation>
|
||||
<translation type="unfinished">Choisir les algorithmes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_DEFINE_HYPOS</source>
|
||||
<translation type="unfinished">Define hypotheses</translation>
|
||||
<translation type="unfinished">Définir des hypothèses</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_COMPUTE</source>
|
||||
<translation type="unfinished">Compute</translation>
|
||||
<translation type="unfinished">Calculer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_REFINE</source>
|
||||
<translation type="unfinished">Add refinements</translation>
|
||||
<translation type="unfinished">Ajouter des raffinements</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_REFINE_LOCAL_SIZE</source>
|
||||
<translation type="unfinished">via local sizes with some hypotheses</translation>
|
||||
<translation type="unfinished">via des tailles locales dans certaines hypothèses</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_REFINE_SUBMESH</source>
|
||||
<translation type="unfinished">via sub-meshes</translation>
|
||||
<translation type="unfinished">via des sous-maillages</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_GRP_IMPORT_MESH</source>
|
||||
<translation type="unfinished">Import mesh</translation>
|
||||
<translation type="unfinished">Importer un maillage</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_AVAILABLE_FORMATS</source>
|
||||
<translation type="unfinished">Available formats</translation>
|
||||
<translation type="unfinished">Formats disponibles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_GRP_CHECK_MESH</source>
|
||||
<translation type="unfinished"> Check mesh quality</translation>
|
||||
<translation type="unfinished">Contrôler la qualité du maillage</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_DISPLAY</source>
|
||||
<translation type="unfinished">Display mesh</translation>
|
||||
<translation type="unfinished">Afficher le maillage</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_QUALITY_INFO</source>
|
||||
<translation type="unfinished">Display some quality criteria</translation>
|
||||
<translation type="unfinished">Afficher des critères de qualité</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_QUALITY_AREA</source>
|
||||
<translation type="unfinished">area</translation>
|
||||
<translation type="unfinished">surface</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_QUALITY_VOLUME</source>
|
||||
@ -5307,11 +5307,11 @@ Ouvrez une fenêtre VTK et essayez de nouveau</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_QUALITY_ASPECT_RATION</source>
|
||||
<translation type="unfinished">aspect ration</translation>
|
||||
<translation type="unfinished">Facteur de forme</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INFO_CLIPPING</source>
|
||||
<translation type="unfinished">Add clipping planes</translation>
|
||||
<translation type="unfinished">Insérer un plan de coupe</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -60,8 +60,8 @@
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
using namespace SMESH;
|
||||
using namespace SMESH::Controls;
|
||||
//using namespace SMESH;
|
||||
//using namespace SMESH::Controls;
|
||||
|
||||
|
||||
namespace SMESH
|
||||
@ -79,9 +79,9 @@ namespace SMESH
|
||||
|
||||
inline
|
||||
const SMDS_Mesh*
|
||||
MeshPtr2SMDSMesh( SMESH_Mesh_ptr theMesh )
|
||||
MeshPtr2SMDSMesh( SMESH::SMESH_Mesh_ptr theMesh )
|
||||
{
|
||||
SMESH_Mesh_i* anImplPtr = DownCast<SMESH_Mesh_i*>(theMesh);
|
||||
SMESH_Mesh_i* anImplPtr = SMESH::DownCast<SMESH_Mesh_i*>(theMesh);
|
||||
return anImplPtr ? anImplPtr->GetImpl().GetMeshDS() : 0;
|
||||
}
|
||||
|
||||
@ -117,11 +117,11 @@ static SMESH::Filter::Criterion createCriterion()
|
||||
{
|
||||
SMESH::Filter::Criterion aCriterion;
|
||||
|
||||
aCriterion.Type = FT_Undefined;
|
||||
aCriterion.Compare = FT_Undefined;
|
||||
aCriterion.Type = SMESH::FT_Undefined;
|
||||
aCriterion.Compare = SMESH::FT_Undefined;
|
||||
aCriterion.Threshold = 0;
|
||||
aCriterion.UnaryOp = FT_Undefined;
|
||||
aCriterion.BinaryOp = FT_Undefined;
|
||||
aCriterion.UnaryOp = SMESH::FT_Undefined;
|
||||
aCriterion.BinaryOp = SMESH::FT_Undefined;
|
||||
aCriterion.ThresholdStr = "";
|
||||
aCriterion.ThresholdID = "";
|
||||
aCriterion.Tolerance = Precision::Confusion();
|
||||
@ -181,6 +181,22 @@ static TopoDS_Shape getShapeByID (const char* theID)
|
||||
FUNCTORS
|
||||
*/
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* SMESH_Gen_i::CreateFilterManager
|
||||
*
|
||||
* Create filter manager
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH::FilterManager_ptr SMESH_Gen_i::CreateFilterManager()
|
||||
{
|
||||
SMESH::FilterManager_i* aFilter = new SMESH::FilterManager_i();
|
||||
SMESH::FilterManager_var anObj = aFilter->_this();
|
||||
return anObj._retn();
|
||||
}
|
||||
|
||||
namespace SMESH {
|
||||
/*
|
||||
Class : Functor_i
|
||||
Description : An abstract class for all functors
|
||||
@ -228,7 +244,7 @@ SMESH::Histogram* NumericalFunctor_i::GetHistogram(CORBA::Short nbIntervals, COR
|
||||
{
|
||||
std::vector<int> nbEvents;
|
||||
std::vector<double> funValues;
|
||||
std::vector<SMESH::smIdType> elements;
|
||||
std::vector<::smIdType> elements;
|
||||
myNumericalFunctorPtr->GetHistogram(nbIntervals, nbEvents, funValues ,elements, 0, isLogarithmic);
|
||||
|
||||
SMESH::Histogram_var histogram = new SMESH::Histogram;
|
||||
@ -257,7 +273,7 @@ SMESH::Histogram* NumericalFunctor_i::GetLocalHistogram(CORBA::Short
|
||||
|
||||
std::vector<int> nbEvents;
|
||||
std::vector<double> funValues;
|
||||
std::vector<SMESH::smIdType> elements;
|
||||
std::vector<::smIdType> elements;
|
||||
|
||||
SMDS_ElemIteratorPtr elemIt;
|
||||
if ( SMESH::DownCast< SMESH_GroupOnFilter_i* >( object ) ||
|
||||
@ -2477,22 +2493,6 @@ CORBA::Boolean FilterManager_i::DeleteLibrary( const char* aFileName )
|
||||
return remove( aFileName ) ? false : true;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* SMESH_Gen_i::CreateFilterManager
|
||||
*
|
||||
* Create filter manager
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH::FilterManager_ptr SMESH_Gen_i::CreateFilterManager()
|
||||
{
|
||||
SMESH::FilterManager_i* aFilter = new SMESH::FilterManager_i();
|
||||
SMESH::FilterManager_var anObj = aFilter->_this();
|
||||
return anObj._retn();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
FILTER
|
||||
*/
|
||||
@ -2659,7 +2659,7 @@ GetElementsIdFromParts( const ListOfIDSources& theParts )
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH::smIdType_array* ::Filter_i::GetMeshInfo()
|
||||
SMESH::smIdType_array* Filter_i::GetMeshInfo()
|
||||
{
|
||||
SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
|
||||
aRes->length(SMESH::Entity_Last);
|
||||
@ -2687,7 +2687,7 @@ SMESH::smIdType_array* ::Filter_i::GetMeshInfo()
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH::smIdType_array* ::Filter_i::GetNbElementsByType()
|
||||
SMESH::smIdType_array* Filter_i::GetNbElementsByType()
|
||||
{
|
||||
SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
|
||||
aRes->length(SMESH::NB_ELEMENT_TYPES);
|
||||
@ -4200,7 +4200,7 @@ static const char** getFunctNames()
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
const char* SMESH::FunctorTypeToString(SMESH::FunctorType ft)
|
||||
const char* FunctorTypeToString(FunctorType ft)
|
||||
{
|
||||
if ( ft < 0 || ft > SMESH::FT_Undefined )
|
||||
return "FT_Undefined";
|
||||
@ -4213,7 +4213,7 @@ const char* SMESH::FunctorTypeToString(SMESH::FunctorType ft)
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
SMESH::FunctorType SMESH::StringToFunctorType(const char* str)
|
||||
FunctorType StringToFunctorType(const char* str)
|
||||
{
|
||||
std::string name( str + 3 ); // skip "FT_"
|
||||
const char** functNames = getFunctNames();
|
||||
@ -4285,3 +4285,4 @@ bool NotifyerAndWaiter::ContainModifWaiter( NotifyerAndWaiter* waiter )
|
||||
|
||||
return is;
|
||||
}
|
||||
}
|
||||
|
@ -43,8 +43,6 @@
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
using namespace SMESH;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
@ -158,7 +156,7 @@ void SMESH_GroupBase_i::SetName( const char* theName )
|
||||
aGen->SetName( anSO, theName );
|
||||
|
||||
// Update Python script
|
||||
TPythonDump() << anSO << ".SetName( '" << theName << "' )";
|
||||
SMESH::TPythonDump() << anSO << ".SetName( '" << theName << "' )";
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,7 +262,7 @@ void SMESH_Group_i::Clear()
|
||||
myPreMeshInfo->FullLoadFromFile();
|
||||
|
||||
// Update Python script
|
||||
TPythonDump() << SMESH::SMESH_Group_var(_this()) << ".Clear()";
|
||||
SMESH::TPythonDump() << SMESH::SMESH_Group_var(_this()) << ".Clear()";
|
||||
|
||||
// Clear the group
|
||||
SMESHDS_Group* aGroupDS = dynamic_cast<SMESHDS_Group*>( GetGroupDS() );
|
||||
@ -304,7 +302,7 @@ SMESH::smIdType SMESH_Group_i::Add( const SMESH::smIdType_array& theIDs )
|
||||
myPreMeshInfo->FullLoadFromFile();
|
||||
|
||||
// Update Python script
|
||||
TPythonDump() << "nbAdd = " << SMESH::SMESH_Group_var(_this()) << ".Add( " << theIDs << " )";
|
||||
SMESH::TPythonDump() << "nbAdd = " << SMESH::SMESH_Group_var(_this()) << ".Add( " << theIDs << " )";
|
||||
|
||||
// Add elements to the group
|
||||
SMESHDS_Group* aGroupDS = dynamic_cast<SMESHDS_Group*>( GetGroupDS() );
|
||||
@ -335,7 +333,7 @@ SMESH::smIdType SMESH_Group_i::Remove( const SMESH::smIdType_array& theIDs )
|
||||
myPreMeshInfo->FullLoadFromFile();
|
||||
|
||||
// Update Python script
|
||||
TPythonDump() << "nbDel = " << SMESH::SMESH_Group_var(_this())
|
||||
SMESH::TPythonDump() << "nbDel = " << SMESH::SMESH_Group_var(_this())
|
||||
<< ".Remove( " << theIDs << " )";
|
||||
|
||||
// Remove elements from the group
|
||||
@ -366,7 +364,7 @@ typedef bool (SMESHDS_Group::*TFunChangeGroup)(const smIdType);
|
||||
CORBA::Long
|
||||
ChangeByPredicate( SMESH::Predicate_i* thePredicate,
|
||||
SMESHDS_GroupBase* theGroupBase,
|
||||
NotifyerAndWaiter* theGroupImpl,
|
||||
SMESH::NotifyerAndWaiter* theGroupImpl,
|
||||
TFunChangeGroup theFun)
|
||||
{
|
||||
CORBA::Long aNb = 0;
|
||||
@ -394,7 +392,7 @@ AddByPredicate( SMESH::Predicate_ptr thePredicate )
|
||||
myPreMeshInfo->FullLoadFromFile();
|
||||
|
||||
if(SMESH::Predicate_i* aPredicate = SMESH::GetPredicate(thePredicate)){
|
||||
TPythonDump() << SMESH::SMESH_Group_var(_this())
|
||||
SMESH::TPythonDump() << SMESH::SMESH_Group_var(_this())
|
||||
<< ".AddByPredicate( " << aPredicate << " )";
|
||||
return ChangeByPredicate( aPredicate, GetGroupDS(), this, &SMESHDS_Group::Add );
|
||||
}
|
||||
@ -409,7 +407,7 @@ RemoveByPredicate( SMESH::Predicate_ptr thePredicate )
|
||||
myPreMeshInfo->FullLoadFromFile();
|
||||
|
||||
if(SMESH::Predicate_i* aPredicate = SMESH::GetPredicate(thePredicate)){
|
||||
TPythonDump() << SMESH::SMESH_Group_var(_this())
|
||||
SMESH::TPythonDump() << SMESH::SMESH_Group_var(_this())
|
||||
<< ".RemoveByPredicate( " << aPredicate << " )";
|
||||
return ChangeByPredicate(aPredicate,GetGroupDS(),this, &SMESHDS_Group::Remove);
|
||||
}
|
||||
@ -421,7 +419,7 @@ SMESH::smIdType SMESH_Group_i::AddFrom( SMESH::SMESH_IDSource_ptr theSource )
|
||||
if ( myPreMeshInfo )
|
||||
myPreMeshInfo->FullLoadFromFile();
|
||||
|
||||
TPythonDump pd;
|
||||
SMESH::TPythonDump pd;
|
||||
long prevNb = Size();
|
||||
SMESHDS_Group* aGroupDS = dynamic_cast<SMESHDS_Group*>( GetGroupDS() );
|
||||
if (aGroupDS) {
|
||||
@ -475,7 +473,7 @@ SMESH::smIdType_array* SMESH_GroupBase_i::GetListOfID()
|
||||
smIdType aSize = aGroupDS->Extent();
|
||||
aRes->length(aSize);
|
||||
SMDS_ElemIteratorPtr it = aGroupDS->GetElements();
|
||||
for (smIdType i = 0; it->more(); i++)
|
||||
for (::smIdType i = 0; it->more(); i++)
|
||||
aRes[i] = it->next()->GetID();
|
||||
|
||||
if ( 0 < aSize && aSize < 100 ) // for comfortable testing ;)
|
||||
@ -639,7 +637,7 @@ void SMESH_GroupBase_i::SetColor(const SALOMEDS::Color& color)
|
||||
if ( oldColor != aQColor )
|
||||
{
|
||||
aGroupDS->SetColor(aQColor);
|
||||
TPythonDump()<< SMESH::SMESH_GroupBase_var(_this())
|
||||
SMESH::TPythonDump()<< SMESH::SMESH_GroupBase_var(_this())
|
||||
<< ".SetColor( SALOMEDS.Color( "
|
||||
<<color.R<<", "<<color.G<<", "<<color.B<<" ))";
|
||||
}
|
||||
@ -671,7 +669,7 @@ void SMESH_GroupBase_i::SetColorNumber(CORBA::Long color)
|
||||
if (aGroupDS)
|
||||
{
|
||||
aGroupDS->SetColorGroup(color);
|
||||
TPythonDump()<<SMESH::SMESH_GroupBase_var(_this())<<".SetColorNumber( "<<color<<" )";
|
||||
SMESH::TPythonDump()<<SMESH::SMESH_GroupBase_var(_this())<<".SetColorNumber( "<<color<<" )";
|
||||
}
|
||||
return ;
|
||||
}
|
||||
@ -844,7 +842,7 @@ void SMESH_GroupOnFilter_i::SetFilter(SMESH::Filter_ptr theFilter)
|
||||
GetMeshServant()->GetGen()->HighLightInvalid( me, false );
|
||||
|
||||
|
||||
TPythonDump()<< me <<".SetFilter( "<< theFilter <<" )";
|
||||
SMESH::TPythonDump()<< me <<".SetFilter( "<< theFilter <<" )";
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
@ -856,7 +854,7 @@ void SMESH_GroupOnFilter_i::SetFilter(SMESH::Filter_ptr theFilter)
|
||||
SMESH::Filter_ptr SMESH_GroupOnFilter_i::GetFilter()
|
||||
{
|
||||
SMESH::Filter_var f = myFilter;
|
||||
TPythonDump() << f << " = " << SMESH::SMESH_GroupOnFilter_var(_this()) << ".GetFilter()";
|
||||
SMESH::TPythonDump() << f << " = " << SMESH::SMESH_GroupOnFilter_var(_this()) << ".GetFilter()";
|
||||
return f._retn();
|
||||
}
|
||||
|
||||
@ -938,7 +936,7 @@ SMESH::smIdType_array* SMESH_GroupOnFilter_i::GetMeshInfo()
|
||||
|
||||
if ( g->GetType() != SMDSAbs_Node )
|
||||
{
|
||||
std::vector< SMESH::smIdType > nbElems = static_cast< SMESHDS_GroupOnFilter* >( g )->GetMeshInfo();
|
||||
std::vector< smIdType > nbElems = static_cast< SMESHDS_GroupOnFilter* >( g )->GetMeshInfo();
|
||||
for ( size_t i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
|
||||
if ( i < nbElems.size() )
|
||||
aRes[i] = nbElems[ i ];
|
||||
@ -1039,7 +1037,7 @@ SMESH::Filter_ptr SMESH_GroupOnFilter_i::StringToFilter(const std::string& thePe
|
||||
}
|
||||
|
||||
// create a filter
|
||||
TPythonDump pd;
|
||||
SMESH::TPythonDump pd;
|
||||
SMESH::FilterManager_i* aFilterMgr = new SMESH::FilterManager_i();
|
||||
filter = aFilterMgr->CreateFilter();
|
||||
filter->SetCriteria( criteria.inout() );
|
||||
|
@ -22,10 +22,6 @@
|
||||
// File : SMESH_Measurements_i.cxx
|
||||
// Author : Pavel TELKOV, Open CASCADE S.A.S. (pavel.telkov@opencascade.com)
|
||||
|
||||
#ifdef WIN32
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
#include "SMESH_Measurements_i.hxx"
|
||||
|
||||
#include "SMDS_ElemIterator.hxx"
|
||||
@ -40,7 +36,7 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
using namespace SMESH;
|
||||
//using namespace SMESH;
|
||||
|
||||
/**
|
||||
* this local function to avoid uninitialized fields
|
||||
@ -80,7 +76,7 @@ SMESH::Measurements_ptr SMESH_Gen_i::CreateMeasurements()
|
||||
// name : Measurements_i
|
||||
// Purpose : Constructor
|
||||
//=======================================================================
|
||||
Measurements_i::Measurements_i()
|
||||
SMESH::Measurements_i::Measurements_i()
|
||||
: SALOME::GenericObj_i( SMESH_Gen_i::GetPOA() )
|
||||
{
|
||||
//Base class Salome_GenericObject do it inmplicitly by overriding PortableServer::POA_ptr _default_POA() method
|
||||
@ -92,7 +88,7 @@ Measurements_i::Measurements_i()
|
||||
// name : ~Measurements_i
|
||||
// Purpose : Destructor
|
||||
//=======================================================================
|
||||
Measurements_i::~Measurements_i()
|
||||
SMESH::Measurements_i::~Measurements_i()
|
||||
{
|
||||
//TPythonDump()<<this<<".UnRegister()";
|
||||
}
|
||||
@ -152,7 +148,7 @@ static SMESHDS_Mesh* getMesh(SMESH::SMESH_IDSource_ptr theSource)
|
||||
if (!CORBA::is_nil( theSource ))
|
||||
{
|
||||
SMESH::SMESH_Mesh_var mesh = theSource->GetMesh();
|
||||
SMESH_Mesh_i* anImplPtr = DownCast<SMESH_Mesh_i*>( mesh );
|
||||
SMESH_Mesh_i* anImplPtr = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
|
||||
if (anImplPtr)
|
||||
return anImplPtr->GetImpl().GetMeshDS();
|
||||
}
|
||||
@ -187,7 +183,7 @@ static double getNumericalValue(SMESH::SMESH_IDSource_ptr theSource,
|
||||
// name : MinDistance
|
||||
// Purpose : minimal distance between two given entities
|
||||
//=======================================================================
|
||||
SMESH::Measure Measurements_i::MinDistance
|
||||
SMESH::Measure SMESH::Measurements_i::MinDistance
|
||||
(SMESH::SMESH_IDSource_ptr theSource1,
|
||||
SMESH::SMESH_IDSource_ptr theSource2)
|
||||
{
|
||||
@ -289,7 +285,7 @@ static void enlargeBoundingBox(const SMESH::SMESH_IDSource_ptr theObject,
|
||||
if ( !aMesh )
|
||||
return;
|
||||
|
||||
if ( DownCast<SMESH_Mesh_i*>( theObject )) // theObject is mesh
|
||||
if (SMESH::DownCast<SMESH_Mesh_i*>( theObject )) // theObject is mesh
|
||||
{
|
||||
for (SMDS_NodeIteratorPtr aNodeIter = aMesh->nodesIterator(); aNodeIter->more(); )
|
||||
enlargeBoundingBox( aNodeIter->next(), theMeasure);
|
||||
@ -318,7 +314,7 @@ static void enlargeBoundingBox(const SMESH::SMESH_IDSource_ptr theObject,
|
||||
// name : BoundingBox
|
||||
// Purpose : compute common bounding box of entities
|
||||
//=======================================================================
|
||||
SMESH::Measure Measurements_i::BoundingBox (const SMESH::ListOfIDSources& theSources)
|
||||
SMESH::Measure SMESH::Measurements_i::BoundingBox (const SMESH::ListOfIDSources& theSources)
|
||||
{
|
||||
SMESH::Measure aMeasure;
|
||||
initMeasure(aMeasure);
|
||||
@ -334,7 +330,7 @@ SMESH::Measure Measurements_i::BoundingBox (const SMESH::ListOfIDSources& theSou
|
||||
// name : Length
|
||||
// Purpose : sum of length of 1D elements of the source
|
||||
//=======================================================================
|
||||
double Measurements_i::Length(SMESH::SMESH_IDSource_ptr theSource)
|
||||
double SMESH::Measurements_i::Length(SMESH::SMESH_IDSource_ptr theSource)
|
||||
{
|
||||
return getNumericalValue( theSource, SMESH::Controls::NumericalFunctorPtr(new SMESH::Controls::Length()) );
|
||||
}
|
||||
@ -343,7 +339,7 @@ double Measurements_i::Length(SMESH::SMESH_IDSource_ptr theSource)
|
||||
// name : Area
|
||||
// Purpose : sum of area of 2D elements of the source
|
||||
//=======================================================================
|
||||
double Measurements_i::Area(SMESH::SMESH_IDSource_ptr theSource)
|
||||
double SMESH::Measurements_i::Area(SMESH::SMESH_IDSource_ptr theSource)
|
||||
{
|
||||
return getNumericalValue( theSource, SMESH::Controls::NumericalFunctorPtr(new SMESH::Controls::Area()) );
|
||||
}
|
||||
@ -352,7 +348,7 @@ double Measurements_i::Area(SMESH::SMESH_IDSource_ptr theSource)
|
||||
// name : Volume
|
||||
// Purpose : sum of volume of 3D elements of the source
|
||||
//=======================================================================
|
||||
double Measurements_i::Volume(SMESH::SMESH_IDSource_ptr theSource)
|
||||
double SMESH::Measurements_i::Volume(SMESH::SMESH_IDSource_ptr theSource)
|
||||
{
|
||||
return getNumericalValue( theSource, SMESH::Controls::NumericalFunctorPtr(new SMESH::Controls::Volume()) );
|
||||
}
|
||||
@ -362,7 +358,7 @@ double Measurements_i::Volume(SMESH::SMESH_IDSource_ptr theSource)
|
||||
//purpose : return gravity center of the source: average coordinates of all nodes
|
||||
//=======================================================================
|
||||
|
||||
SMESH::PointStruct Measurements_i::GravityCenter(SMESH::SMESH_IDSource_ptr theSource)
|
||||
SMESH::PointStruct SMESH::Measurements_i::GravityCenter(SMESH::SMESH_IDSource_ptr theSource)
|
||||
{
|
||||
SMESH::PointStruct grCenter = { 0.,0.,0. };
|
||||
const SMESHDS_Mesh* mesh = getMesh( theSource );
|
||||
@ -404,7 +400,7 @@ SMESH::PointStruct Measurements_i::GravityCenter(SMESH::SMESH_IDSource_ptr theSo
|
||||
//purpose : Return angle in radians defined by 3 points <(p1,p2,p3)
|
||||
//=======================================================================
|
||||
|
||||
CORBA::Double Measurements_i::Angle(const SMESH::PointStruct& p1,
|
||||
CORBA::Double SMESH::Measurements_i::Angle(const SMESH::PointStruct& p1,
|
||||
const SMESH::PointStruct& p2,
|
||||
const SMESH::PointStruct& p3 )
|
||||
{
|
||||
|
@ -279,13 +279,13 @@ namespace MeshEditor_I {
|
||||
SMDS_MeshElement::Filter & filter = *aFilter;
|
||||
|
||||
if ( aType == SMDSAbs_Node )
|
||||
for ( SMESH::smIdType i = 0; i < IDs.length(); i++ ) {
|
||||
for ( CORBA::ULong i = 0; i < IDs.length(); i++ ) {
|
||||
const SMDS_MeshElement * elem = aMesh->FindNode( IDs[i] );
|
||||
if ( filter( elem ))
|
||||
aMap.insert( aMap.end(), elem );
|
||||
}
|
||||
else
|
||||
for ( SMESH::smIdType i = 0; i<IDs.length(); i++) {
|
||||
for ( CORBA::ULong i = 0; i<IDs.length(); i++) {
|
||||
const SMDS_MeshElement * elem = aMesh->FindElement( IDs[i] );
|
||||
if ( filter( elem ))
|
||||
aMap.insert( aMap.end(), elem );
|
||||
@ -789,7 +789,7 @@ SMESH_MeshEditor_i::RemoveElements(const SMESH::smIdType_array & IDsOfElements)
|
||||
|
||||
list< smIdType > IdList;
|
||||
|
||||
for ( SMESH::smIdType i = 0; i < IDsOfElements.length(); i++ )
|
||||
for ( CORBA::ULong i = 0; i < IDsOfElements.length(); i++ )
|
||||
IdList.push_back( IDsOfElements[i] );
|
||||
|
||||
// Update Python script
|
||||
@ -817,7 +817,7 @@ CORBA::Boolean SMESH_MeshEditor_i::RemoveNodes(const SMESH::smIdType_array & IDs
|
||||
initData();
|
||||
|
||||
list< smIdType > IdList;
|
||||
for ( SMESH::smIdType i = 0; i < IDsOfNodes.length(); i++)
|
||||
for ( CORBA::ULong i = 0; i < IDsOfNodes.length(); i++)
|
||||
IdList.push_back( IDsOfNodes[i] );
|
||||
|
||||
// Update Python script
|
||||
@ -1578,7 +1578,7 @@ CORBA::Boolean SMESH_MeshEditor_i::Reorient(const SMESH::smIdType_array & IDsOfE
|
||||
SMESH_TRY;
|
||||
initData();
|
||||
|
||||
for ( SMESH::smIdType i = 0; i < IDsOfElements.length(); i++ )
|
||||
for ( CORBA::ULong i = 0; i < IDsOfElements.length(); i++ )
|
||||
{
|
||||
SMESH::smIdType index = IDsOfElements[i];
|
||||
const SMDS_MeshElement * elem = getMeshDS()->FindElement(index);
|
||||
@ -2252,7 +2252,7 @@ SMESH_MeshEditor_i::smooth(const SMESH::smIdType_array & IDsOfElements,
|
||||
arrayToSet(IDsOfElements, aMesh, elements, SMDSAbs_Face);
|
||||
|
||||
set<const SMDS_MeshNode*> fixedNodes;
|
||||
for ( SMESH::smIdType i = 0; i < IDsOfFixedNodes.length(); i++) {
|
||||
for ( CORBA::ULong i = 0; i < IDsOfFixedNodes.length(); i++) {
|
||||
SMESH::smIdType index = IDsOfFixedNodes[i];
|
||||
const SMDS_MeshNode * node = aMesh->FindNode(index);
|
||||
if ( node )
|
||||
@ -4342,7 +4342,7 @@ void SMESH_MeshEditor_i::MergeElements(const SMESH::array_of_long_array& theGrou
|
||||
if ( elemTypes->length() == 1 && elemTypes[0] == SMESH::NODE )
|
||||
continue;
|
||||
SMESH::smIdType_array_var elementsId = theElementsToKeep[i]->GetIDs();
|
||||
for ( SMESH::smIdType j = 0; j < elementsId->length(); ++j )
|
||||
for ( CORBA::ULong j = 0; j < elementsId->length(); ++j )
|
||||
idsToKeep.Add( elementsId[ j ]);
|
||||
}
|
||||
|
||||
@ -4353,7 +4353,7 @@ void SMESH_MeshEditor_i::MergeElements(const SMESH::array_of_long_array& theGrou
|
||||
const SMESH::long_array& anElemsIDGroup = theGroupsOfElementsID[ i ];
|
||||
aListOfListOfElementsID.push_back( list< smIdType >() );
|
||||
list< smIdType >& aListOfElemsID = aListOfListOfElementsID.back();
|
||||
for ( SMESH::smIdType j = 0; j < anElemsIDGroup.length(); j++ )
|
||||
for ( CORBA::ULong j = 0; j < anElemsIDGroup.length(); j++ )
|
||||
{
|
||||
SMESH::smIdType id = anElemsIDGroup[ j ];
|
||||
if ( idsToKeep.Contains( id )) aListOfElemsID.push_front( id );
|
||||
|
@ -93,7 +93,7 @@ public:
|
||||
SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::smIdType_array& IDsOfElements,
|
||||
SMESH::ElementType type);
|
||||
static bool IsTemporaryIDSource( SMESH::SMESH_IDSource_ptr& idSource );
|
||||
static SMESH::smIdType* GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, smIdType& nbIds );
|
||||
static SMESH::smIdType* GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, SMESH::smIdType& nbIds );
|
||||
|
||||
/*!
|
||||
* \brief Generates the unique group name
|
||||
|
@ -320,13 +320,8 @@ void StdMeshersGUI_DistrPreview::update()
|
||||
|
||||
setAxisScale( myDensity->xAxis(), min_x, max_x );
|
||||
setAxisScale( myDensity->yAxis(),
|
||||
#ifdef WIN32
|
||||
min( 0.0, min_y ),
|
||||
max( 0.0, max_y )
|
||||
#else
|
||||
std::min( 0.0, min_y ),
|
||||
std::max( 0.0, max_y )
|
||||
#endif
|
||||
);
|
||||
myDensity->setSamples( x, y, size );
|
||||
if( x )
|
||||
|
@ -22,7 +22,8 @@
|
||||
# scripts / static
|
||||
SET(plugin_SCRIPTS
|
||||
__init__.py
|
||||
cubeAngle2.py
|
||||
blocFissureTest.py
|
||||
cubeAngle_2.py
|
||||
cubeAngle.py
|
||||
cubeCoin.py
|
||||
cubeMilieu.py
|
||||
@ -35,7 +36,6 @@ SET(plugin_SCRIPTS
|
||||
eprouvetteCourbe.py
|
||||
eprouvetteDroite_2.py
|
||||
eprouvetteDroite.py
|
||||
execution_Cas.py
|
||||
faceGauche_2.py
|
||||
faceGauche.py
|
||||
fissureCoude_10.py
|
||||
|
522
src/Tools/blocFissure/CasTests/blocFissureTest.py
Normal file
@ -0,0 +1,522 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2021 EDF R&D
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
__revision__ = "V03.02"
|
||||
|
||||
"""Lancement des cas-tests de blocFissure
|
||||
|
||||
Temps par type de matériel :
|
||||
. cubeAngle : 24s ["cubeAngle", "cubeAngle_2"])
|
||||
. cubeFin : 42s ["cubeCoin", "cubeMilieu", "cubeTransverse"]
|
||||
. decoupeCylindre : 8s ["cylindre", "cylindre_2"]
|
||||
. disquePerce (+ ellipse_disque) : 9s ["disquePerce"]
|
||||
. fissureGauche : 26s ["faceGauche"]
|
||||
. fissureGauche_2 (+ ellipse + ellipse_probleme): 22s ["ellipse_1", "ellipse_2", "faceGauche_2"]
|
||||
. eprouvetteCourbe : 22s ["eprouvetteCourbe"]
|
||||
. eprouvetteDroite : 31s ["eprouvetteDroite", "eprouvetteDroite_2"]
|
||||
. vis : 9s ["vis"]
|
||||
. tube : ["tube"]
|
||||
. sans matériel : 66s ["fissureCoude_1", "fissureCoude_2", "fissureCoude_3", "fissureCoude_4", "fissureCoude_5"]
|
||||
. sans matériel : 69s ["fissureCoude_6", "fissureCoude_7", "fissureCoude_8", "fissureCoude_9", "fissureCoude_10"]
|
||||
. sans matériel : 28s ["fissure_Coude", "fissure_Coude_4"]
|
||||
"""
|
||||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
import traceback
|
||||
|
||||
from blocFissure.gmu import initLog
|
||||
from blocFissure.gmu.casStandard import casStandard
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
LOGFILE = os.path.join(tempfile.gettempdir(),"blocFissure.log")
|
||||
#initLog.setDebug(LOGFILE) # debug = 10
|
||||
#initLog.setVerbose(LOGFILE) # info = 20
|
||||
#initLog.setRelease(LOGFILE) # warning = 30
|
||||
#initLog.setPerfTests(LOGFILE) # critical = 50
|
||||
#initLog.setAlways(LOGFILE) # critical = 50
|
||||
|
||||
# Les cas qui marchent ...
|
||||
TORUNOK = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 ] # OK 19/04/2021
|
||||
# 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28
|
||||
TORUNPB = list()
|
||||
for IAUX in TORUNOK:
|
||||
TORUNPB.append((IAUX+1)%2)
|
||||
print ("TORUN = {} # OK".format(TORUNOK))
|
||||
print ("TORUN = {} # PB".format(TORUNPB))
|
||||
|
||||
# Numéro de référence associé à chaque problème défini par le nom de son fichier dans le répertoire CasTests
|
||||
NREF_PB = dict()
|
||||
NREF_PB["cubeAngle"] = 0
|
||||
NREF_PB["cubeAngle_2"] = 1
|
||||
NREF_PB["cubeCoin"] = 2
|
||||
NREF_PB["cubeMilieu"] = 3
|
||||
NREF_PB["cubeTransverse"] = 4
|
||||
NREF_PB["cylindre"] = 5
|
||||
NREF_PB["cylindre_2"] = 6
|
||||
NREF_PB["disquePerce"] = 7
|
||||
NREF_PB["ellipse_1"] = 8
|
||||
NREF_PB["ellipse_2"] = 9
|
||||
NREF_PB["eprouvetteCourbe"] = 10
|
||||
NREF_PB["eprouvetteDroite"] = 11
|
||||
NREF_PB["eprouvetteDroite_2"] = 12
|
||||
NREF_PB["faceGauche"] = 13
|
||||
NREF_PB["faceGauche_2"] = 14
|
||||
NREF_PB["fissureCoude_1"] = 15
|
||||
NREF_PB["fissureCoude_2"] = 16
|
||||
NREF_PB["fissureCoude_3"] = 17
|
||||
NREF_PB["fissureCoude_4"] = 18
|
||||
NREF_PB["fissureCoude_5"] = 19
|
||||
NREF_PB["fissureCoude_6"] = 20
|
||||
NREF_PB["fissureCoude_7"] = 21
|
||||
NREF_PB["fissureCoude_8"] = 22
|
||||
NREF_PB["fissureCoude_9"] = 23
|
||||
NREF_PB["fissureCoude_10"] = 24
|
||||
NREF_PB["fissure_Coude"] = 25
|
||||
NREF_PB["fissure_Coude_4"] = 26
|
||||
NREF_PB["vis_1"] = 27
|
||||
NREF_PB["tube"] = 28
|
||||
|
||||
#========================= Début de la classe ===================================
|
||||
|
||||
class blocFissureTest (object):
|
||||
|
||||
"""Test de blocFissure
|
||||
|
||||
Options facultatives
|
||||
********************
|
||||
Le(s) numéro/nom du/des tests à passer. Si aucun n'est donné, tous les cas sont passés.
|
||||
"""
|
||||
|
||||
# A. La base
|
||||
|
||||
message_info = ""
|
||||
_verbose = 0
|
||||
_verbose_max = 0
|
||||
affiche_aide_globale = 0
|
||||
|
||||
# B. Les variables
|
||||
|
||||
l_cas = None
|
||||
l_problemes = None
|
||||
d_nom_probleme = None
|
||||
l_materiels = None
|
||||
|
||||
#=========================== Début de la méthode =================================
|
||||
|
||||
def __init__ ( self, liste_option ):
|
||||
|
||||
"""Le constructeur de la classe blocFissureTest"""
|
||||
|
||||
self.l_cas = list()
|
||||
erreur = False
|
||||
|
||||
for option in liste_option :
|
||||
|
||||
#print (option, type(option))
|
||||
if isinstance(option, str):
|
||||
saux = option.upper()
|
||||
else:
|
||||
saux = option
|
||||
#print (saux)
|
||||
# Options générales de pilotage
|
||||
if saux in ( "-H", "-HELP" ):
|
||||
self.affiche_aide_globale = 1
|
||||
elif saux == "-V" :
|
||||
self._verbose = 1
|
||||
elif saux == "-VMAX" :
|
||||
self._verbose = 1
|
||||
self._verbose_max = 1
|
||||
|
||||
else :
|
||||
# Options du traitement
|
||||
if isinstance(option, int):
|
||||
self.l_cas.append(option)
|
||||
elif ( option in NREF_PB ):
|
||||
self.l_cas.append(NREF_PB[option])
|
||||
else:
|
||||
print ("Option inconnue : {}".format(option))
|
||||
erreur = True
|
||||
|
||||
# Si aucun cas n'est donné, on prend tous ceux par défaut
|
||||
if not self.l_cas:
|
||||
for i_aux, valeur in enumerate(TORUNOK):
|
||||
if valeur:
|
||||
self.l_cas.append(i_aux)
|
||||
|
||||
if erreur:
|
||||
self.l_cas = list()
|
||||
|
||||
if self._verbose_max:
|
||||
print ("Liste des cas : {}".format(self.l_cas))
|
||||
|
||||
if self._verbose_max:
|
||||
initLog.setVerbose(LOGFILE) # info = 20
|
||||
|
||||
#=========================== Fin de la méthode ==================================
|
||||
|
||||
#=========================== Début de la méthode =================================
|
||||
|
||||
def __del__(self):
|
||||
"""A la suppression de l'instance de classe"""
|
||||
if self._verbose_max:
|
||||
print ("Suppression de l'instance de la classe.")
|
||||
|
||||
#=========================== Fin de la méthode ==================================
|
||||
|
||||
#=========================== Début de la méthode =================================
|
||||
|
||||
def caract_l_problemes (self):
|
||||
"""Caractérisation des problèmes"""
|
||||
self.d_nom_probleme = dict()
|
||||
self.l_problemes = list()
|
||||
self.l_materiels = list()
|
||||
|
||||
n_cas = 0
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.cubeAngle import cubeAngle
|
||||
self.l_problemes.append(cubeAngle(n_cas))
|
||||
self.l_materiels.append("cubeAngle")
|
||||
|
||||
n_cas = 1
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.cubeAngle_2 import cubeAngle_2
|
||||
self.l_problemes.append(cubeAngle_2(n_cas))
|
||||
self.l_materiels.append("cubeAngle")
|
||||
|
||||
n_cas = 2
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests import cubeCoin
|
||||
self.l_problemes.append(casStandard(cubeCoin.dicoParams, cubeCoin.referencesMaillageFissure, n_cas))
|
||||
self.d_nom_probleme[n_cas] = "cubeCoin"
|
||||
self.l_materiels.append("cubeFin")
|
||||
|
||||
n_cas = 3
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests import cubeMilieu
|
||||
self.l_problemes.append(casStandard(cubeMilieu.dicoParams, cubeMilieu.referencesMaillageFissure, n_cas))
|
||||
self.d_nom_probleme[n_cas] = "cubeMilieu"
|
||||
self.l_materiels.append("cubeFin")
|
||||
|
||||
n_cas = 4
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests import cubeTransverse
|
||||
self.l_problemes.append(casStandard(cubeTransverse.dicoParams, cubeTransverse.referencesMaillageFissure, n_cas))
|
||||
self.d_nom_probleme[n_cas] = "cubeTransverse"
|
||||
self.l_materiels.append("cubeFin")
|
||||
|
||||
n_cas = 5
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.cylindre import cylindre
|
||||
self.l_problemes.append(cylindre(n_cas))
|
||||
self.l_materiels.append("decoupeCylindre")
|
||||
|
||||
n_cas = 6
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.cylindre_2 import cylindre_2
|
||||
self.l_problemes.append(cylindre_2(n_cas))
|
||||
self.l_materiels.append("decoupeCylindre")
|
||||
|
||||
n_cas = 7
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests import disquePerce
|
||||
self.l_problemes.append(casStandard(disquePerce.dicoParams, disquePerce.referencesMaillageFissure, n_cas))
|
||||
self.d_nom_probleme[n_cas] = "disquePerce"
|
||||
self.l_materiels.append("disquePerce")
|
||||
self.l_materiels.append("ellipse_disque")
|
||||
|
||||
n_cas = 8
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.ellipse_1 import ellipse_1
|
||||
self.l_problemes.append(ellipse_1(n_cas))
|
||||
self.l_materiels.append("ellipse")
|
||||
self.l_materiels.append("fissureGauche_2")
|
||||
|
||||
n_cas = 9
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.ellipse_2 import ellipse_2
|
||||
self.l_problemes.append(ellipse_2(n_cas))
|
||||
self.l_materiels.append("ellipse_probleme")
|
||||
self.l_materiels.append("fissureGauche_2")
|
||||
|
||||
n_cas = 10
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.eprouvetteCourbe import eprouvetteCourbe
|
||||
self.l_problemes.append(eprouvetteCourbe(n_cas))
|
||||
self.l_materiels.append("eprouvetteCourbe")
|
||||
|
||||
n_cas = 11
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.eprouvetteDroite import eprouvetteDroite
|
||||
self.l_problemes.append(eprouvetteDroite(n_cas))
|
||||
self.l_materiels.append("eprouvetteDroite")
|
||||
|
||||
n_cas = 12
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.eprouvetteDroite_2 import eprouvetteDroite_2
|
||||
self.l_problemes.append(eprouvetteDroite_2(n_cas))
|
||||
self.l_materiels.append("eprouvetteDroite")
|
||||
|
||||
n_cas = 13
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.faceGauche import faceGauche
|
||||
self.l_problemes.append(faceGauche(n_cas))
|
||||
self.l_materiels.append("fissureGauche")
|
||||
|
||||
n_cas = 14
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.faceGauche_2 import faceGauche_2
|
||||
self.l_problemes.append(faceGauche_2(n_cas))
|
||||
self.l_materiels.append("fissureGauche_2")
|
||||
|
||||
n_cas = 15
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.fissureCoude_1 import fissureCoude_1
|
||||
self.l_problemes.append(fissureCoude_1(n_cas))
|
||||
|
||||
n_cas = 16
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.fissureCoude_2 import fissureCoude_2
|
||||
self.l_problemes.append(fissureCoude_2(n_cas))
|
||||
|
||||
n_cas = 17
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.fissureCoude_3 import fissureCoude_3
|
||||
self.l_problemes.append(fissureCoude_3(n_cas))
|
||||
|
||||
n_cas = 18
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.fissureCoude_4 import fissureCoude_4
|
||||
self.l_problemes.append(fissureCoude_4(n_cas))
|
||||
|
||||
n_cas = 19
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.fissureCoude_5 import fissureCoude_5
|
||||
self.l_problemes.append(fissureCoude_5(n_cas))
|
||||
|
||||
n_cas = 20
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.fissureCoude_6 import fissureCoude_6
|
||||
self.l_problemes.append(fissureCoude_6(n_cas))
|
||||
|
||||
n_cas = 21
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.fissureCoude_7 import fissureCoude_7
|
||||
self.l_problemes.append(fissureCoude_7(n_cas))
|
||||
|
||||
n_cas = 22
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.fissureCoude_8 import fissureCoude_8
|
||||
self.l_problemes.append(fissureCoude_8(n_cas))
|
||||
|
||||
n_cas = 23
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.fissureCoude_9 import fissureCoude_9
|
||||
self.l_problemes.append(fissureCoude_9(n_cas))
|
||||
|
||||
n_cas = 24
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.fissureCoude_10 import fissureCoude_10
|
||||
self.l_problemes.append(fissureCoude_10(n_cas))
|
||||
|
||||
n_cas = 25
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.fissure_Coude import fissure_Coude
|
||||
self.l_problemes.append(fissure_Coude(n_cas))
|
||||
|
||||
n_cas = 26
|
||||
if n_cas in self.l_cas:
|
||||
from blocFissure.CasTests.fissure_Coude_4 import fissure_Coude_4
|
||||
self.l_problemes.append(fissure_Coude_4(n_cas))
|
||||
|
||||
n_cas = 27
|
||||
if n_cas in self.l_cas:
|
||||
# genereMateriel : vis
|
||||
from blocFissure.CasTests.vis_1 import vis_1
|
||||
self.l_problemes.append(vis_1(n_cas))
|
||||
self.l_materiels.append("vis")
|
||||
|
||||
n_cas = 28
|
||||
if n_cas in self.l_cas:
|
||||
# genereMateriel : tube
|
||||
from blocFissure.CasTests.tube import tube
|
||||
self.l_problemes.append(tube(n_cas))
|
||||
self.l_materiels.append("tube")
|
||||
#"Mesh_13" has not been computed:
|
||||
#- "algo2d_facePeau_0" failed on "FACE_12 to mesh". Error: Algorithm failed. NgException at Surface meshing: Problem in Surface mesh generation
|
||||
#- "algo1d_cercle1_0" failed on EDGE #20. Error: Algorithm failed. Source elements don't cover totally the geometrical edge
|
||||
#- "algo1d_cercle1_0" failed on EDGE #17. Error: Algorithm failed. Source elements don't cover totally the geometrical edge
|
||||
#- "algo1d_cercle1_0" failed on EDGE #15. Error: Algorithm failed. Source elements don't cover totally the geometrical edge
|
||||
#- "algo1d_cercle1_0" failed on EDGE #12. Error: Algorithm failed. Source elements don't cover totally the geometrical edge
|
||||
|
||||
return
|
||||
|
||||
#=========================== Fin de la méthode ==================================
|
||||
|
||||
#=========================== Début de la méthode =================================
|
||||
|
||||
def cree_materiels (self):
|
||||
"""Création des matériels"""
|
||||
|
||||
if "cubeAngle" in self.l_materiels:
|
||||
from blocFissure.materielCasTests import cubeAngle
|
||||
|
||||
if "cubeFin" in self.l_materiels:
|
||||
from blocFissure.materielCasTests import cubeFin
|
||||
|
||||
if "decoupeCylindre" in self.l_materiels:
|
||||
from blocFissure.materielCasTests import decoupeCylindre
|
||||
|
||||
if "disquePerce" in self.l_materiels:
|
||||
from blocFissure.materielCasTests import disquePerce
|
||||
|
||||
if "ellipse_disque" in self.l_materiels:
|
||||
from blocFissure.materielCasTests import ellipse_disque
|
||||
|
||||
if "ellipse_probleme" in self.l_materiels:
|
||||
from blocFissure.materielCasTests import ellipse_probleme
|
||||
|
||||
if "ellipse" in self.l_materiels:
|
||||
from blocFissure.materielCasTests import ellipse
|
||||
|
||||
if "fissureGauche" in self.l_materiels:
|
||||
from blocFissure.materielCasTests import fissureGauche
|
||||
|
||||
if "fissureGauche_2" in self.l_materiels:
|
||||
from blocFissure.materielCasTests import fissureGauche_2
|
||||
|
||||
if "eprouvetteCourbe" in self.l_materiels:
|
||||
from blocFissure.materielCasTests import eprouvetteCourbe
|
||||
|
||||
if "eprouvetteDroite" in self.l_materiels:
|
||||
from blocFissure.materielCasTests import eprouvetteDroite
|
||||
|
||||
if "vis" in self.l_materiels:
|
||||
from blocFissure.materielCasTests import vis
|
||||
|
||||
if "tube" in self.l_materiels:
|
||||
from blocFissure.materielCasTests import tube
|
||||
|
||||
return
|
||||
|
||||
#=========================== Fin de la méthode ==================================
|
||||
|
||||
#=========================== Début de la méthode =================================
|
||||
|
||||
def calcul_cas (self, n_cas, cas, ligne):
|
||||
"""Calcul d'un cas"""
|
||||
texte = ""
|
||||
if n_cas in self.d_nom_probleme:
|
||||
nom = self.d_nom_probleme[n_cas]
|
||||
else:
|
||||
nom = cas.nomProbleme
|
||||
texte_a = "\n=== Exécution du cas n° {}, '{}'".format(NREF_PB[nom],nom)
|
||||
logging.critical(ligne+texte_a)
|
||||
|
||||
try:
|
||||
ok_maillage = cas.executeProbleme()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
ok_maillage = False
|
||||
if not ok_maillage:
|
||||
texte = "Problème avec le cas n° {}, '{}'\n".format(NREF_PB[nom],nom)
|
||||
print(ligne)
|
||||
|
||||
return ok_maillage, texte
|
||||
|
||||
#=========================== Fin de la méthode ==================================
|
||||
|
||||
#=========================== Début de la méthode =================================
|
||||
|
||||
def calcul_tout (self):
|
||||
"""Calcul de tous les cas"""
|
||||
|
||||
ligne = "---------------------------------------------------------------------"
|
||||
texte = "\n"
|
||||
nb_cas_ok = 0
|
||||
nb_cas_nook = 0
|
||||
for n_cas, cas in enumerate(self.l_problemes):
|
||||
#print ("Cas n° {}, '{}'".format(n_cas,cas.nomProbleme))
|
||||
ok_maillage, texte_a = self.calcul_cas (n_cas, cas, ligne)
|
||||
texte += texte_a
|
||||
if ok_maillage:
|
||||
nb_cas_ok += 1
|
||||
else:
|
||||
nb_cas_nook += 1
|
||||
print(ligne)
|
||||
|
||||
nb_cas = nb_cas_nook + nb_cas_ok
|
||||
if ( nb_cas > 1):
|
||||
if nb_cas_nook:
|
||||
texte += ". Nombre de cas_tests OK : {}\n".format(nb_cas_ok)
|
||||
texte += ". Nombre de cas_tests NOOK : {}\n".format(nb_cas_nook)
|
||||
else:
|
||||
texte += "Les {} tests se sont bien passés.\n".format(nb_cas)
|
||||
print (texte+ligne)
|
||||
logging.critical(ligne+texte)
|
||||
|
||||
return texte
|
||||
|
||||
#=========================== Fin de la méthode ==================================
|
||||
|
||||
#=========================== Début de la méthode =================================
|
||||
|
||||
def lancement (self):
|
||||
"""Lancement général"""
|
||||
|
||||
# Tri des problèmes
|
||||
self.caract_l_problemes ()
|
||||
|
||||
# Création des matériels
|
||||
self.cree_materiels ()
|
||||
|
||||
# Calcul des fissures
|
||||
texte = self.calcul_tout ()
|
||||
|
||||
return texte
|
||||
|
||||
#=========================== Fin de la méthode ==================================
|
||||
|
||||
#========================== Fin de la classe ====================================
|
||||
|
||||
#==================================================================================
|
||||
# Lancement
|
||||
#==================================================================================
|
||||
|
||||
if __name__ == "__main__" :
|
||||
|
||||
# 1. Options
|
||||
|
||||
L_OPTIONS = sys.argv[1:]
|
||||
L_OPTIONS.append("-v")
|
||||
|
||||
# 2. Lancement de la classe
|
||||
|
||||
#print ("L_OPTIONS :", L_OPTIONS)
|
||||
BLOCFISSURE_TEST = blocFissureTest(L_OPTIONS)
|
||||
|
||||
if BLOCFISSURE_TEST.affiche_aide_globale:
|
||||
sys.stdout.write(BLOCFISSURE_TEST.__doc__+"\n")
|
||||
else:
|
||||
TEXTE = BLOCFISSURE_TEST.lancement()
|
||||
sys.stdout.write(TEXTE)
|
||||
|
||||
del BLOCFISSURE_TEST
|
@ -23,13 +23,13 @@ import os
|
||||
|
||||
from .cubeAngle import cubeAngle
|
||||
|
||||
class cubeAngle2(cubeAngle):
|
||||
class cubeAngle_2(cubeAngle):
|
||||
"""problème de fissure plane coupant 2 faces (angle), débouches normaux, objet plan
|
||||
|
||||
detection d'un probleme de tolerance sur les edges de jonction pipe et face fissure externe
|
||||
"""
|
||||
|
||||
nomProbleme = "cubeAngle2"
|
||||
nomProbleme = "cubeAngle_2"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def setParamShapeFissure(self):
|
@ -33,7 +33,7 @@ from .cylindre import cylindre
|
||||
class cylindre_2(cylindre):
|
||||
"""problème de fissure plane sur cylindre hexa, fond de fissure complexe : polyline"""
|
||||
|
||||
nomProbleme = "cylindre2"
|
||||
nomProbleme = "cylindre_2"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams, \
|
||||
|
@ -23,8 +23,8 @@
|
||||
import os
|
||||
from blocFissure import gmu
|
||||
|
||||
dicoParams = dict(nomCas = 'disque',
|
||||
nomProbleme = "disque",
|
||||
dicoParams = dict(nomCas = 'disquePerce',
|
||||
nomProbleme = "disquePerce",
|
||||
maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "disque.med"),
|
||||
CAOFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "ellipse_disque.brep"),
|
||||
edgeFiss = [3],
|
||||
|
@ -34,7 +34,7 @@ from blocFissure.gmu.putName import putName
|
||||
class ellipse_1(fissureGenerique):
|
||||
"""problème de fissure non plane, débouchante non normale"""
|
||||
|
||||
nomProbleme = "ellipse1"
|
||||
nomProbleme = "ellipse_1"
|
||||
shapeFissureParams = dict()
|
||||
maillageFissureParams = dict()
|
||||
referencesMaillageFissure = dict()
|
||||
@ -78,7 +78,7 @@ class ellipse_1(fissureGenerique):
|
||||
|
||||
lgInfluence = shapeFissureParams['lgInfluence']
|
||||
|
||||
shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "ellipse1.brep"))
|
||||
shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "ellipse_1.brep"))
|
||||
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionIDs(fondFiss, [3])
|
||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||
|
@ -32,7 +32,7 @@ from .ellipse_1 import ellipse_1
|
||||
class ellipse_2(ellipse_1):
|
||||
"""problème de fissure non plane, débouchante non normale"""
|
||||
|
||||
nomProbleme = "ellipse2"
|
||||
nomProbleme = "ellipse_2"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams, \
|
||||
@ -43,7 +43,7 @@ class ellipse_2(ellipse_1):
|
||||
|
||||
lgInfluence = shapeFissureParams['lgInfluence']
|
||||
|
||||
shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "ellipse1_pb.brep"))
|
||||
shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "ellipse_1_pb.brep"))
|
||||
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionIDs(fondFiss, [3])
|
||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||
|
@ -1,302 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2021 EDF R&D
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
"""Lancement des cas-tests de blocFissure"""
|
||||
|
||||
import logging
|
||||
import os
|
||||
import tempfile
|
||||
import traceback
|
||||
|
||||
from blocFissure.gmu import initLog
|
||||
from blocFissure.gmu.casStandard import casStandard
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
LOGFILE = os.path.join(tempfile.gettempdir(),"blocFissure.log")
|
||||
#initLog.setDebug(LOGFILE) # debug = 10
|
||||
#initLog.setVerbose(LOGFILE) # info = 20
|
||||
#initLog.setRelease(LOGFILE) # warning = 30
|
||||
#initLog.setPerfTests(LOGFILE) # critical = 50
|
||||
#initLog.setAlways(LOGFILE) # critical = 50
|
||||
|
||||
# ---tous les cas en séquence, ou les cas sélectionnés ...
|
||||
TORUNOK = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 ] # OK 19/04/2021
|
||||
# 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28
|
||||
#RUNALL = False
|
||||
RUNALL = True
|
||||
if RUNALL:
|
||||
TORUN = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
|
||||
# 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28
|
||||
TORUN = TORUNOK
|
||||
else:
|
||||
TORUNPB = list()
|
||||
for IAUX in TORUNOK:
|
||||
TORUNPB.append((IAUX+1)%2)
|
||||
print ("TORUN = {} # OK".format(TORUNOK))
|
||||
print ("TORUN = {} # PB".format(TORUNPB))
|
||||
# genereMateriel
|
||||
TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0] # aucun
|
||||
TORUN = [ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # cubeAngle
|
||||
TORUN = [ 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # cubeFin
|
||||
TORUN = [ 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # decoupeCylindre
|
||||
TORUN = [ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # disque_perce + ellipse_disque
|
||||
TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # ellipse + fissureGauche2
|
||||
TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # ellipse_probleme + fissureGauche2
|
||||
TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # eprouvetteCourbe
|
||||
TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # eprouvetteDroite
|
||||
TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # fissureGauche
|
||||
TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # fissureGauche2
|
||||
TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0] # vis
|
||||
TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] # tube
|
||||
# 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28
|
||||
TORUN = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0] # OK
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
|
||||
def caract_l_problemes ():
|
||||
"""Caractérisation des problèmes"""
|
||||
d_aux = dict()
|
||||
l_problemes = list()
|
||||
|
||||
n_cas = 0
|
||||
# genereMateriel : cubeAngle
|
||||
from blocFissure.CasTests.cubeAngle import cubeAngle
|
||||
l_problemes.append(cubeAngle(n_cas))
|
||||
|
||||
n_cas = 1
|
||||
# genereMateriel : cubeAngle
|
||||
from blocFissure.CasTests.cubeAngle2 import cubeAngle2
|
||||
l_problemes.append(cubeAngle2(n_cas))
|
||||
|
||||
n_cas = 2
|
||||
# genereMateriel : cubeFin
|
||||
from blocFissure.CasTests import cubeCoin
|
||||
l_problemes.append(casStandard(cubeCoin.dicoParams, cubeCoin.referencesMaillageFissure, n_cas))
|
||||
d_aux[n_cas] = "cubeCoin"
|
||||
|
||||
n_cas = 3
|
||||
# genereMateriel : cubeFin
|
||||
from blocFissure.CasTests import cubeMilieu
|
||||
l_problemes.append(casStandard(cubeMilieu.dicoParams, cubeMilieu.referencesMaillageFissure, n_cas))
|
||||
d_aux[n_cas] = "cubeMilieu"
|
||||
|
||||
n_cas = 4
|
||||
# genereMateriel : cubeFin
|
||||
from blocFissure.CasTests import cubeTransverse
|
||||
l_problemes.append(casStandard(cubeTransverse.dicoParams, cubeTransverse.referencesMaillageFissure, n_cas))
|
||||
d_aux[n_cas] = "cubeTransverse"
|
||||
|
||||
n_cas = 5
|
||||
# genereMateriel : decoupeCylindre
|
||||
from blocFissure.CasTests.cylindre import cylindre
|
||||
l_problemes.append(cylindre(n_cas))
|
||||
|
||||
n_cas = 6
|
||||
# genereMateriel : decoupeCylindre
|
||||
from blocFissure.CasTests.cylindre_2 import cylindre_2
|
||||
l_problemes.append(cylindre_2(n_cas))
|
||||
|
||||
n_cas = 7
|
||||
# genereMateriel : disque_perce
|
||||
# genereMateriel : ellipse_disque
|
||||
from blocFissure.CasTests import disquePerce
|
||||
l_problemes.append(casStandard(disquePerce.dicoParams, disquePerce.referencesMaillageFissure, n_cas))
|
||||
d_aux[n_cas] = "disquePerce"
|
||||
|
||||
n_cas = 8
|
||||
# genereMateriel: ellipse
|
||||
# genereMateriel : fissureGauche2
|
||||
from blocFissure.CasTests.ellipse_1 import ellipse_1
|
||||
l_problemes.append(ellipse_1(n_cas))
|
||||
|
||||
n_cas = 9
|
||||
# genereMateriel: ellipse_probleme
|
||||
# genereMateriel : fissureGauche2
|
||||
from blocFissure.CasTests.ellipse_2 import ellipse_2
|
||||
l_problemes.append(ellipse_2(n_cas))
|
||||
|
||||
n_cas = 10
|
||||
# genereMateriel : eprouvetteCourbe
|
||||
from blocFissure.CasTests.eprouvetteCourbe import eprouvetteCourbe
|
||||
l_problemes.append(eprouvetteCourbe(n_cas))
|
||||
|
||||
n_cas = 11
|
||||
# genereMateriel : eprouvetteDroite
|
||||
from blocFissure.CasTests.eprouvetteDroite import eprouvetteDroite
|
||||
l_problemes.append(eprouvetteDroite(n_cas))
|
||||
|
||||
n_cas = 12
|
||||
# genereMateriel : eprouvetteDroite
|
||||
from blocFissure.CasTests.eprouvetteDroite_2 import eprouvetteDroite_2
|
||||
l_problemes.append(eprouvetteDroite_2(n_cas))
|
||||
|
||||
n_cas = 13
|
||||
# genereMateriel : fissureGauche
|
||||
from blocFissure.CasTests.faceGauche import faceGauche
|
||||
l_problemes.append(faceGauche(n_cas))
|
||||
|
||||
n_cas = 14
|
||||
# genereMateriel : fissureGauche2
|
||||
from blocFissure.CasTests.faceGauche_2 import faceGauche_2
|
||||
l_problemes.append(faceGauche_2(n_cas))
|
||||
|
||||
n_cas = 15
|
||||
# genereMateriel : aucun
|
||||
from blocFissure.CasTests.fissureCoude_1 import fissureCoude_1
|
||||
l_problemes.append(fissureCoude_1(n_cas))
|
||||
|
||||
n_cas = 16
|
||||
# genereMateriel : aucun
|
||||
from blocFissure.CasTests.fissureCoude_2 import fissureCoude_2
|
||||
l_problemes.append(fissureCoude_2(n_cas))
|
||||
|
||||
n_cas = 17
|
||||
# genereMateriel : aucun
|
||||
from blocFissure.CasTests.fissureCoude_3 import fissureCoude_3
|
||||
l_problemes.append(fissureCoude_3(n_cas))
|
||||
|
||||
n_cas = 18
|
||||
# genereMateriel : aucun
|
||||
from blocFissure.CasTests.fissureCoude_4 import fissureCoude_4
|
||||
l_problemes.append(fissureCoude_4(n_cas))
|
||||
|
||||
n_cas = 19
|
||||
# genereMateriel : aucun
|
||||
from blocFissure.CasTests.fissureCoude_5 import fissureCoude_5
|
||||
l_problemes.append(fissureCoude_5(n_cas))
|
||||
|
||||
n_cas = 20
|
||||
# genereMateriel : aucun
|
||||
from blocFissure.CasTests.fissureCoude_6 import fissureCoude_6
|
||||
l_problemes.append(fissureCoude_6(n_cas))
|
||||
|
||||
n_cas = 21
|
||||
# genereMateriel : aucun
|
||||
from blocFissure.CasTests.fissureCoude_7 import fissureCoude_7
|
||||
l_problemes.append(fissureCoude_7(n_cas))
|
||||
|
||||
n_cas = 22
|
||||
# genereMateriel : aucun
|
||||
from blocFissure.CasTests.fissureCoude_8 import fissureCoude_8
|
||||
l_problemes.append(fissureCoude_8(n_cas))
|
||||
|
||||
n_cas = 23
|
||||
# genereMateriel : aucun
|
||||
from blocFissure.CasTests.fissureCoude_9 import fissureCoude_9
|
||||
l_problemes.append(fissureCoude_9(n_cas))
|
||||
|
||||
n_cas = 24
|
||||
# genereMateriel : aucun
|
||||
from blocFissure.CasTests.fissureCoude_10 import fissureCoude_10
|
||||
l_problemes.append(fissureCoude_10(n_cas))
|
||||
|
||||
n_cas = 25
|
||||
# genereMateriel : aucun
|
||||
from blocFissure.CasTests.fissure_Coude import fissure_Coude
|
||||
l_problemes.append(fissure_Coude(n_cas))
|
||||
|
||||
n_cas = 26
|
||||
# genereMateriel : aucun
|
||||
from blocFissure.CasTests.fissure_Coude_4 import fissure_Coude_4
|
||||
l_problemes.append(fissure_Coude_4(n_cas))
|
||||
|
||||
n_cas = 27
|
||||
# genereMateriel : vis
|
||||
from blocFissure.CasTests.vis_1 import vis_1
|
||||
l_problemes.append(vis_1(n_cas))
|
||||
|
||||
n_cas = 28
|
||||
# genereMateriel : tube
|
||||
from blocFissure.CasTests.tube import tube
|
||||
l_problemes.append(tube(n_cas))
|
||||
#"Mesh_13" has not been computed:
|
||||
#- "algo2d_facePeau_0" failed on "FACE_12 to mesh". Error: Algorithm failed. NgException at Surface meshing: Problem in Surface mesh generation
|
||||
#- "algo1d_cercle1_0" failed on EDGE #20. Error: Algorithm failed. Source elements don't cover totally the geometrical edge
|
||||
#- "algo1d_cercle1_0" failed on EDGE #17. Error: Algorithm failed. Source elements don't cover totally the geometrical edge
|
||||
#- "algo1d_cercle1_0" failed on EDGE #15. Error: Algorithm failed. Source elements don't cover totally the geometrical edge
|
||||
#- "algo1d_cercle1_0" failed on EDGE #12. Error: Algorithm failed. Source elements don't cover totally the geometrical edge
|
||||
|
||||
return l_problemes, d_aux
|
||||
#=============================================================
|
||||
def calcul_cas (n_cas, cas, d_aux, ligne):
|
||||
"""Calcul d'un cas"""
|
||||
texte = ""
|
||||
if n_cas in d_aux:
|
||||
nom = d_aux[n_cas]
|
||||
else:
|
||||
nom = cas.nomProbleme
|
||||
texte_a = "\n=== Exécution du cas n° {}, '{}'".format(n_cas,nom)
|
||||
logging.critical(ligne+texte_a)
|
||||
|
||||
try:
|
||||
ok_maillage = cas.executeProbleme()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
ok_maillage = False
|
||||
if not ok_maillage:
|
||||
texte = "Problème avec le cas n° {}, '{}'\n".format(n_cas,nom)
|
||||
print(ligne)
|
||||
|
||||
return ok_maillage, texte
|
||||
#=============================================================
|
||||
def calcul_tout (l_problemes, d_aux):
|
||||
"""Calcul de tous les cas"""
|
||||
|
||||
ligne = "---------------------------------------------------------------------"
|
||||
texte = "\n"
|
||||
nb_cas_ok = 0
|
||||
nb_cas_nook = 0
|
||||
for n_cas, cas in enumerate(l_problemes):
|
||||
#print ("Cas n° {}, '{}'".format(n_cas,cas.nomProbleme))
|
||||
if TORUN[n_cas]:
|
||||
ok_maillage, texte_a = calcul_cas (n_cas, cas, d_aux, ligne)
|
||||
texte += texte_a
|
||||
if ok_maillage:
|
||||
nb_cas_ok += 1
|
||||
else:
|
||||
nb_cas_nook += 1
|
||||
print(ligne)
|
||||
|
||||
nb_cas = nb_cas_nook + nb_cas_ok
|
||||
if ( nb_cas > 1):
|
||||
if nb_cas_nook:
|
||||
texte += ". Nombre de cas_tests OK : {}\n".format(nb_cas_ok)
|
||||
texte += ". Nombre de cas_tests NOOK : {}\n".format(nb_cas_nook)
|
||||
else:
|
||||
texte += "Les {} tests se sont bien passés.\n".format(nb_cas)
|
||||
print (texte+ligne)
|
||||
logging.critical(ligne+texte)
|
||||
|
||||
return
|
||||
#=============================================================
|
||||
#=============================================================
|
||||
|
||||
while True:
|
||||
|
||||
L_PROBLEMES, D_AUX = caract_l_problemes()
|
||||
|
||||
if ( len(L_PROBLEMES) != len(TORUN) ):
|
||||
TEXTE = "\nNombre de problèmes définis : {}\n".format(len(L_PROBLEMES))
|
||||
TEXTE += "Longueur de la liste 'TORUN' : {}\n".format(len(TORUN))
|
||||
TEXTE += "\t==> Incohérence de programmation à corriger dans {}".format(__name__)
|
||||
print (TEXTE)
|
||||
break
|
||||
|
||||
calcul_tout (L_PROBLEMES, D_AUX)
|
||||
|
||||
break
|
@ -43,7 +43,7 @@ master_doc = 'index'
|
||||
|
||||
# General substitutions.
|
||||
project = 'Plug-in blocFissure'
|
||||
copyright = '2010-2021 EDF R&D'
|
||||
copyright = '2010-2021 EDF'
|
||||
|
||||
# The default replacements for |version| and |release|, also used in various
|
||||
# other places throughout the built documents.
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
@ -51,21 +51,21 @@ Geometrical parameters of the tore are illustrated :
|
||||
:align: center
|
||||
:alt: Geometrical parameters of the tore
|
||||
|
||||
Different levels of verbose are available. Use one of this 4 optional functions to set verbose type:
|
||||
Different levels of verbose are available. The prints are located in the file ''LOGFILE''. Use one of this 4 optional functions to set verbose type:
|
||||
|
||||
- / **setDebug()**
|
||||
- / **setDebug(LOGFILE)**
|
||||
|
||||
- / **setVerbose()**
|
||||
- / **setVerbose(LOGFILE)**
|
||||
|
||||
- / **setRelease()**
|
||||
- / **setRelease(LOGFILE)**
|
||||
|
||||
- / **setUnitTests()**
|
||||
- / **setUnitTests(LOGFILE)**
|
||||
|
||||
**example to run in salome session**::
|
||||
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu import initLog
|
||||
initLog.setDebug()
|
||||
initLog.setDebug("/tmp/blocFissure.log")
|
||||
|
||||
from blocFissure.casStandard import casStandard
|
||||
|
||||
@ -83,6 +83,8 @@ Different levels of verbose are available. Use one of this 4 optional functions
|
||||
|
||||
execInstance = casStandard(dicoParams)
|
||||
|
||||
newmesh = execInstance.maillageFissure
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -4,96 +4,102 @@
|
||||
Test cases
|
||||
#######################
|
||||
|
||||
A base of 30 test cases guarantees the correct functioning of « Bloc Fissure ». 12 cases are dedicated to :ref:`cracked bended pipes <pipeTC>` and the others 13 are for other :ref:`generic geometries <genericTC>`. They are shown here in order to illustrate cases on which « Bloc Fissure » works.
|
||||
A base of 28 test cases guarantees the correct functioning of « Bloc Fissure ». 12 cases are dedicated to :ref:`cracked bended pipes <pipeTC>` and the others 16 are for other :ref:`generic geometries <genericTC>`. They are shown here in order to illustrate cases on which « Bloc Fissure » works.
|
||||
|
||||
.. _genericTC:
|
||||
|
||||
Generic cases
|
||||
===============================
|
||||
|
||||
All 13 cases are shown Table 2. Two views show the whole cracked structure and a zoom onto the crack with its tore.
|
||||
All 16 cases are shown Table 2. Two views show the whole cracked structure and a zoom onto the crack with its tore.
|
||||
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| CubeAngle |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
|.. image:: images/01_CubeAngle.png | .. image:: images/01_CubeAngle_2.png |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
|.. image:: images/01_CubeAngle.png | .. image:: images/01_CubeAngle_a.png |
|
||||
| :height: 300 | :height: 300 |
|
||||
| :align: center | :align: center |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
| CubeAngle2 |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
|.. image:: images/02_CubeAngle2.png | .. image:: images/02_CubeAngle2_2.png |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| CubeAngle_2 |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
|.. image:: images/02_CubeAngle_2.png | .. image:: images/02_CubeAngle_2_a.png |
|
||||
| :height: 300 | :height: 300 |
|
||||
| :align: center | :align: center |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| cubeCoin |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| cubeMilieu |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| cubeTransverse |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| cylindre |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
|.. image:: images/03_cylindre.png | .. image:: images/03_cylindre_2.png |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
|.. image:: images/03_cylindre.png | .. image:: images/03_cylindre_a.png |
|
||||
| :height: 300 | :height: 300 |
|
||||
| :align: center | :align: center |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
| cylindre2 |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
|.. image:: images/04_cylindre2.png | .. image:: images/04_cylindre2_2.png |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| cylindre_2 |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
|.. image:: images/04_cylindre_2.png | .. image:: images/04_cylindre_2_a.png |
|
||||
| :height: 300 | :height: 300 |
|
||||
| :align: center | :align: center |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
| disque |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
|.. image:: images/05_disque.png | .. image:: images/05_disque_2.png |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| disquePerce |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
|.. image:: images/05_disque.png | .. image:: images/05_disque_a.png |
|
||||
| :height: 300 | :height: 300 |
|
||||
| :align: center | :align: center |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
| ellipse1 |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
|.. image:: images/06_ellipse1.png | .. image:: images/06_ellipse1_2.png |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| ellipse_1 |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
|.. image:: images/06_ellipse_1.png | .. image:: images/06_ellipse_1_a.png |
|
||||
| :height: 300 | :height: 300 |
|
||||
| :align: center | :align: center |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
| ellipse2 (tilted crack) |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
|.. image:: images/07_ellipse2.png | .. image:: images/07_ellipse2_2.png |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| ellipse_2 (tilted crack) |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
|.. image:: images/07_ellipse_2.png | .. image:: images/07_ellipse_2_a.png |
|
||||
| :height: 300 | :height: 300 |
|
||||
| :align: center | :align: center |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| eprouvetteCourbe |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
|.. image:: images/08_eprouvetteCourbe.png | .. image:: images/08_eprouvetteCourbe_2.png |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
|.. image:: images/08_eprouvetteCourbe.png | .. image:: images/08_eprouvetteCourbe_a.png |
|
||||
| :height: 300 | :height: 300 |
|
||||
| :align: center | :align: center |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| eprouvetteDroite |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
|.. image:: images/09_eprouvetteDroite.png | .. image:: images/09_eprouvetteDroite_2.png |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
|.. image:: images/09_eprouvetteDroite.png | .. image:: images/09_eprouvetteDroite_a.png |
|
||||
| :height: 300 | :height: 300 |
|
||||
| :align: center | :align: center |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
| eprouvetteDroite2 |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
|.. image:: images/10_eprouvetteDroite2.png | .. image:: images/10_eprouvetteDroite2_2.png |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| eprouvetteDroite_2 |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
|.. image:: images/10_eprouvetteDroite_2.png | .. image:: images/10_eprouvetteDroite_2_a.png |
|
||||
| :height: 300 | :height: 300 |
|
||||
| :align: center | :align: center |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| faceGauche |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
|.. image:: images/11_faceGauche.png | .. image:: images/11_faceGauche_2.png |
|
||||
| :height: 300 | :height: 300 |
|
||||
| :align: center | :align: center |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
| faceGauche2 |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
|.. image:: images/12_faceGauche2.png | .. image:: images/12_faceGauche2_2.png |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| faceGauche_2 |
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
|.. image:: images/12_faceGauche_2.png | .. image:: images/12_faceGauche_2_a.png |
|
||||
| :height: 300 | :height: 300 |
|
||||
| :align: center | :align: center |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| vis (Crack is in the radius filet between the screw head and the screw shank) |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
|.. image:: images/13_vis_1.png | .. image:: images/13_vis_1_2.png |
|
||||
| :width: 400 | :width: 400 |
|
||||
| :align: center | :align: center |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
| tube |
|
||||
+-------------------------------------------+----------------------------------------------+
|
||||
+--------------------------------------------+-----------------------------------------------+
|
||||
|
||||
.. _pipeTC:
|
||||
|
||||
@ -123,16 +129,14 @@ coude_0 can be computed using this file for the data:
|
||||
|
||||
« Bloc Fissure » is very efficient for the case of bended pipes. The generation of the geometry and the crack insertion takes only around 15s.
|
||||
|
||||
Running test cases
|
||||
Data for the test cases
|
||||
=====================================
|
||||
|
||||
All the files for these test cases are stored in the directory of the installation of SALOME:
|
||||
|
||||
``Salome-VXXXX_package-YY/modules/SMESH_VXXXX/lib/python3.6/site-packages/salome/blocFissure``
|
||||
|
||||
The test cases can be runned either through the python window of the SALOME GUI or with a python script.
|
||||
|
||||
0) **Generate med and breps files.**::
|
||||
The set of the med, xao and brep files can be created by the following importation:
|
||||
|
||||
from blocFissure.materielCasTests import genereMateriel
|
||||
|
||||
@ -142,48 +146,36 @@ Once the files are generated, they are saved into the directory of the installat
|
||||
|
||||
There is no need to generate them again.
|
||||
|
||||
1) **To execute all test cases**::
|
||||
To check the installation of salome, the test cases can be computed by the salome test process::
|
||||
|
||||
from blocFissure.CasTests import execution_Cas
|
||||
salome -test blocFissure
|
||||
|
||||
2) **To execute only selected test cases**:
|
||||
Running test cases
|
||||
=====================================
|
||||
|
||||
modify the file ``CasTests/execution_Cas.py`` and change::
|
||||
The test cases can be runned by the following instructions::
|
||||
|
||||
runall = False. #old : True
|
||||
from blocFissure.CasTests.blocFissureTest import blocFissureTest
|
||||
BLOCFISSURE_TEST = blocFissureTest(list_of_cases)
|
||||
MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement()
|
||||
sys.stdout.write(MESSAGE_ERREUR)
|
||||
del BLOCFISSURE_TEST
|
||||
|
||||
And change from 0 to 1 of the index of the test you want to launch::
|
||||
If ``list_of_cases`` is an empty list, all the cases are computed.
|
||||
|
||||
torun = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
|
||||
then launch the test cases::
|
||||
|
||||
from blocFissure.CasTests import execution_Cas
|
||||
|
||||
The index of each test is the position of the test in the following table, from 0 for cubeAngle, 1 for cubeAngle2,
|
||||
2 for cubeCoin... from top to bottom, then from left to right.
|
||||
If not, ``list_of_cases`` is made of the list of the numbers and/or the name of the requested case. The index of each test is the position of the test in the following table, from 0 for cubeAngle, 1 for cubeAngle_2, 2 for cubeCoin... from top to bottom, then from left to right.
|
||||
|
||||
+--------------------+--------------------+--------------------+-----------------+-----------------+
|
||||
| cubeAngle | cylindre_2 | eprouvetteDroite_2 | fissureCoude_3 | fissureCoude_9 |
|
||||
+--------------------+--------------------+--------------------+-----------------+-----------------+
|
||||
| cubeAngle2 | disquePerce | faceGauche | fissureCoude_4 | fissure_Coude |
|
||||
| cubeAngle_2 | disquePerce | faceGauche | fissureCoude_4 | fissure_Coude |
|
||||
+--------------------+--------------------+--------------------+-----------------+-----------------+
|
||||
| cubeCoin | ellipse_1 | faceGauche_2 | fissureCoude_5 | fissure_Coude_4 |
|
||||
+--------------------+--------------------+--------------------+-----------------+-----------------+
|
||||
| cubeMilieu | ellipse_2 | fissureCoude_1 | fissureCoude_6 | vis_1 |
|
||||
+--------------------+--------------------+--------------------+-----------------+-----------------+
|
||||
| cubeTransverse | eprouvetteCourbe | fissureCoude_10 | fissureCoude_7 | tube |
|
||||
| cubeTransverse | eprouvetteCourbe | fissureCoude_10 | fissureCoude_7 | |
|
||||
+--------------------+--------------------+--------------------+-----------------+-----------------+
|
||||
| cylindre | eprouvetteDroite | fissureCoude_2 | fissureCoude_8 | |
|
||||
+--------------------+--------------------+--------------------+-----------------+-----------------+
|
||||
|
||||
3) **To execute only one test case**::
|
||||
|
||||
from blocFissure.CasTests.[TEST_CASE_NAME] import [TEST_CASE_NAME]
|
||||
|
||||
[TEST_CASE_NAME](0).executeProbleme()
|
||||
|
||||
[TEST_CASE_NAME] is the name of the test case in the previous list. Note that the test cases fissureCoude_4 and fissure_Coude_4 are very similar.
|
||||
|
||||
|
||||
|
||||
|
@ -132,8 +132,8 @@ def construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
|
||||
# --- inventaire des faces de peau coupées par la fissure
|
||||
|
||||
ptEdgeFond, fsFissuExt, edFisExtPe, edFisExtPi, \
|
||||
facesPeaux, edCircPeau, ptCircPeau, gpedgeBord, gpedgeVifs, edFissPeau, ptFisExtPi, \
|
||||
ptEdgeFond, fsFissuExt, edFisExtPe, edFisExtPi, facesPeaux, edCircPeau, \
|
||||
gpedgeBord, gpedgeVifs, edFissPeau, ptFisExtPi, \
|
||||
edgeRadFacePipePeau, facesPipePeau = \
|
||||
construitFissureGenerale_b( partitionsPeauFissFond, \
|
||||
edgesPipeFiss, edgesFondFiss, wireFondFiss, aretesVivesC, \
|
||||
@ -201,7 +201,7 @@ def construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
# --- maillage faces de peau
|
||||
|
||||
meshesFacesPeau = mailleFacesPeau(partitionsPeauFissFond, idFillingFromBout, facesDefaut, \
|
||||
facesPeaux, edCircPeau, ptCircPeau, gpedgeBord, gpedgeVifs, edFissPeau, \
|
||||
facesPeaux, edCircPeau, gpedgeBord, gpedgeVifs, edFissPeau, \
|
||||
bordsLibres, grpEdgesPeauFissureExterne, grpAretesVives, \
|
||||
edgesCircPipeGroup, dmoyen, rayonPipe, nbsegRad, \
|
||||
mailleur, nro_cas)
|
||||
|
@ -50,7 +50,6 @@ pour chaque face de peau : 0, 1 ou 2 faces débouchante du fond de fissure
|
||||
edFisExtPi = [ list() for _ in range(nbFacesFilling)] # pour chaque face [edge commun au pipe des faces de fissure externes]
|
||||
facesPeaux = [None for _ in range(nbFacesFilling)] # pour chaque face : la face de peau finale a mailler (percée des faces débouchantes)
|
||||
edCircPeau = [ list() for _ in range(nbFacesFilling)] # pour chaque face de peau : [subshape edge circulaire aux débouchés du pipe]
|
||||
ptCircPeau = [ list() for _ in range(nbFacesFilling)] # pour chaque face de peau : [subshape point sur edge circulaire aux débouchés du pipe]
|
||||
gpedgeBord = [None for _ in range(nbFacesFilling)] # pour chaque face de peau : groupe subshape des edges aux bords liés à la partie saine
|
||||
gpedgeVifs = [None for _ in range(nbFacesFilling)] # pour chaque face de peau : groupes subshape des edges aux arêtes vives entre fillings
|
||||
edFissPeau = [ list() for _ in range(nbFacesFilling)] # pour chaque face de peau : [subshape edge en peau des faces de fissure externes]
|
||||
@ -70,7 +69,6 @@ pour chaque face de peau : 0, 1 ou 2 faces débouchante du fond de fissure
|
||||
edFisExtPi[ifil] = dataPPFF['edgesFissExtPipe']
|
||||
facesPeaux[ifil] = dataPPFF['facePeau']
|
||||
edCircPeau[ifil] = dataPPFF['edgesCircPeau']
|
||||
ptCircPeau[ifil] = dataPPFF['verticesCircPeau']
|
||||
gpedgeBord[ifil] = dataPPFF['groupEdgesBordPeau']
|
||||
gpedgeVifs[ifil] = dataPPFF['bordsVifs']
|
||||
edFissPeau[ifil] = dataPPFF['edgesFissurePeau']
|
||||
@ -87,5 +85,5 @@ pour chaque face de peau : 0, 1 ou 2 faces débouchante du fond de fissure
|
||||
geomPublish(initLog.debug, avc, name, nro_cas)
|
||||
|
||||
return ptEdgeFond, fsFissuExt, edFisExtPe, edFisExtPi, facesPeaux, edCircPeau, \
|
||||
ptCircPeau, gpedgeBord, gpedgeVifs, edFissPeau, ptFisExtPi, \
|
||||
gpedgeBord, gpedgeVifs, edFissPeau, ptFisExtPi, \
|
||||
edgeRadFacePipePeau, facesPipePeau
|
||||
|
@ -34,6 +34,7 @@ class fissureGenerique(object):
|
||||
"""
|
||||
|
||||
nomProbleme = "fissureGenerique"
|
||||
maillageFissure = None
|
||||
geomParams = dict()
|
||||
meshParams = dict()
|
||||
shapeFissureParams = dict()
|
||||
@ -132,10 +133,10 @@ class fissureGenerique(object):
|
||||
if step == 4:
|
||||
return
|
||||
|
||||
maillageFissure = self.genereMaillageFissure(geometriesSaines, maillagesSains, \
|
||||
self.maillageFissure = self.genereMaillageFissure(geometriesSaines, maillagesSains, \
|
||||
shapesFissure, self.shapeFissureParams, self.maillageFissureParams, \
|
||||
elementsDefaut, step, mailleur)
|
||||
|
||||
self.setReferencesMaillageFissure()
|
||||
ok_maillage = getStatsMaillageFissure(maillageFissure, self.referencesMaillageFissure, self.maillageFissureParams)
|
||||
ok_maillage = getStatsMaillageFissure(self.maillageFissure, self.referencesMaillageFissure, self.maillageFissureParams)
|
||||
return ok_maillage
|
||||
|
@ -57,6 +57,6 @@ def identifieEdgesPeau(edgesFissExtPipe, verticesPipePeau, facePeau, facesPeauSo
|
||||
# --- edges de la face de peau partagées avec la face de fissure
|
||||
edgesFissurePeau = identifieEdgesPeau_c(verticesPipePeau, facePeau, edgesListees, verticesCircPeau)
|
||||
|
||||
return (endsEdgeFond, facesPipePeau, edgeRadFacePipePeau,
|
||||
edgesCircPeau, verticesCircPeau, groupEdgesBordPeau,
|
||||
return (endsEdgeFond, facesPipePeau, edgeRadFacePipePeau, \
|
||||
edgesCircPeau, groupEdgesBordPeau, \
|
||||
bordsVifs, edgesFissurePeau, aretesVivesCoupees)
|
||||
|
@ -32,6 +32,7 @@ def identifieEdgesPeau_a(edgesFissExtPipe, facePeau, facesPeauSorted, edgesPeauF
|
||||
nro_cas=None):
|
||||
"""Identification précise des edges et disques des faces de peau selon index extremité fissure"""
|
||||
logging.info('start')
|
||||
logging.info("Traitement des arêtes de '%s'", facePeau.GetName())
|
||||
|
||||
for face in facesPeauSorted[:-1]: # la ou les faces débouchantes, pas la grande face de peau
|
||||
logging.debug("examen face debouchante circulaire")
|
||||
@ -46,7 +47,6 @@ def identifieEdgesPeau_a(edgesFissExtPipe, facePeau, facesPeauSorted, edgesPeauF
|
||||
sharedVertices = geompy.GetSharedShapesMulti([face, edgesPeauFondIn[j_aux_0]], geompy.ShapeType["VERTEX"])
|
||||
nameFace = "facePipePeau_{}".format(i_aux)
|
||||
nameVert = "endEdgeFond_{}".format(i_aux)
|
||||
nameEdge = "edgeRadFacePipePeau_{}".format(i_aux)
|
||||
facesPipePeau[i_aux] = face
|
||||
endsEdgeFond[i_aux] = sharedVertices[0]
|
||||
geomPublish(initLog.debug, face, nameFace, nro_cas)
|
||||
@ -55,29 +55,30 @@ def identifieEdgesPeau_a(edgesFissExtPipe, facePeau, facesPeauSorted, edgesPeauF
|
||||
for edge in edgesFace:
|
||||
if geompy.MinDistance(edge, sharedVertices[0]) < 1e-3:
|
||||
edgeRadFacePipePeau[i_aux] = edge
|
||||
nameEdge = "edgeRadFacePipePeau_{}".format(i_aux)
|
||||
geomPublish(initLog.debug, edge, nameEdge, nro_cas)
|
||||
break
|
||||
|
||||
# --- edges elliptiques de la face de peau et points de jonction de la face externe de fissure
|
||||
logging.info("Traitement des arêtes de '%s'", facePeau.GetName())
|
||||
edgesCircPeau = [None for _ in range(len(facesPipePeau))]
|
||||
verticesCircPeau = [None for _ in range(len(facesPipePeau))]
|
||||
logging.info('Nombre de faces : len(facesPipePeau) = %d', len(facesPipePeau))
|
||||
edgesCircPeau = list()
|
||||
verticesCircPeau = list()
|
||||
for i_aux,fcirc in enumerate(facesPipePeau):
|
||||
logging.info(". Partage avec la face '%s'", fcirc.GetName())
|
||||
# Arêtes
|
||||
edges = geompy.GetSharedShapesMulti([facePeau, fcirc], geompy.ShapeType["EDGE"])
|
||||
grpEdgesCirc = geompy.CreateGroup(facePeau, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionList(grpEdgesCirc, edges)
|
||||
edgesCircPeau[i_aux] = grpEdgesCirc
|
||||
name = "edgeCirc_{}".format(i_aux)
|
||||
geomPublishInFather(initLog.always, facePeau, grpEdgesCirc, name)
|
||||
groupe = geompy.CreateGroup(facePeau, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionList(groupe, edges)
|
||||
geomPublishInFather(initLog.always, facePeau, groupe, "edgeCirc_{}".format(i_aux))
|
||||
edgesCircPeau.append(groupe)
|
||||
edgesListees = edgesListees + edges
|
||||
# Sommets
|
||||
vertices = geompy.GetSharedShapesMulti([facePeau, fcirc], geompy.ShapeType["VERTEX"])
|
||||
grpVertCircPeau = geompy.CreateGroup(facePeau, geompy.ShapeType["VERTEX"])
|
||||
geompy.UnionList(grpVertCircPeau, vertices)
|
||||
verticesCircPeau[i_aux] = grpVertCircPeau
|
||||
name = "pointEdgeCirc_{}".format(i_aux)
|
||||
geomPublishInFather(initLog.info, facePeau, grpVertCircPeau, name)
|
||||
groupe = geompy.CreateGroup(facePeau, geompy.ShapeType["VERTEX"])
|
||||
geompy.UnionList(groupe, vertices)
|
||||
geomPublishInFather(initLog.info, facePeau, groupe, "point(s)EdgeCirc_{}".format(i_aux))
|
||||
verticesCircPeau.append(groupe)
|
||||
|
||||
logging.info('==> Nombre de sommets : len(verticesCircPeau) = %d', len(verticesCircPeau))
|
||||
logging.info("==> Nombre de groupes d'arêtes : len(edgesCircPeau) = %d", len(edgesCircPeau))
|
||||
logging.info("==> Nombre de groupes de sommets : len(verticesCircPeau) = %d", len(verticesCircPeau))
|
||||
|
||||
return edgesCircPeau, verticesCircPeau
|
||||
|
@ -32,7 +32,9 @@ def identifieEdgesPeau_b(facePeau, edgesListees, \
|
||||
"""edges de bord de la face de peau"""
|
||||
logging.info('start')
|
||||
|
||||
# Liste des arêtes de bord
|
||||
edgesFilling = geompy.ExtractShapes(fillingFaceExterne, geompy.ShapeType["EDGE"], False)
|
||||
logging.info('Détermination des arêtes de bord à partir des %d arêtes de fillingFaceExterne', len(edgesFilling))
|
||||
edgesBords = list()
|
||||
for i_aux, edge in enumerate(edgesFilling):
|
||||
edgepeau = geompy.GetInPlace(facePeau, edge)
|
||||
@ -42,18 +44,19 @@ def identifieEdgesPeau_b(facePeau, edgesListees, \
|
||||
if geompy.ShapeInfo(edgepeau)['EDGE'] > 1:
|
||||
logging.debug(" EDGES multiples")
|
||||
l_edges = geompy.ExtractShapes(edgepeau, geompy.ShapeType["EDGE"], False)
|
||||
edgesBords += l_edges
|
||||
edgesListees += l_edges
|
||||
edgesBords.extend(l_edges)
|
||||
edgesListees.extend(l_edges)
|
||||
else:
|
||||
logging.debug(" EDGE")
|
||||
edgesBords.append(edgepeau)
|
||||
edgesListees.append(edgepeau)
|
||||
logging.info('==> Nombre d arêtes de bord : len(edgesBords) = %d', len(edgesBords))
|
||||
|
||||
groupEdgesBordPeau = geompy.CreateGroup(facePeau, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionList(groupEdgesBordPeau, edgesBords)
|
||||
bordsVifs = None
|
||||
if aretesVivesC is not None:
|
||||
logging.debug("identification des bords vifs par GetInPlace")
|
||||
logging.info("identification des bords vifs par GetInPlace")
|
||||
bordsVifs = geompy.GetInPlace(facePeau, aretesVivesC)
|
||||
if bordsVifs is None:
|
||||
logging.debug("pas d'identification des bords vifs par GetInPlace: test par distance")
|
||||
@ -69,7 +72,8 @@ def identifieEdgesPeau_b(facePeau, edgesListees, \
|
||||
if ( dist < 0.001 ):
|
||||
edvifs.append(edge)
|
||||
break
|
||||
if len(edvifs) >0:
|
||||
if edvifs:
|
||||
logging.info('==> Nombre d arêtes de bord vif : len(edvifs) = %d', len(edvifs))
|
||||
bordsVifs = geompy.CreateGroup(facePeau,geompy.ShapeType["EDGE"])
|
||||
for edge in edvifs:
|
||||
geompy.AddObject(bordsVifs, geompy.GetSubShapeID(facePeau, edge))
|
||||
|
@ -33,38 +33,39 @@ def identifieEdgesPeau_c(verticesPipePeau, facePeau, edgesListees, verticesCircP
|
||||
logging.info('start')
|
||||
logging.info("Traitement des arêtes de '%s'", facePeau.GetName())
|
||||
logging.info('Nombre de sommets : len(verticesPipePeau) = %d', len(verticesPipePeau))
|
||||
#logging.info('verticesPipePeau = %s', verticesPipePeau)
|
||||
logging.info('Nombre de sommets : len(verticesCircPeau) = %d', len(verticesCircPeau))
|
||||
#logging.info('verticesCircPeau = %s', verticesCircPeau)
|
||||
|
||||
edgesPeau = geompy.ExtractShapes(facePeau, geompy.ShapeType["EDGE"], False)
|
||||
logging.info('Nombre total d arêtes de la peau : len(edgesPeau) = %d', len(edgesPeau))
|
||||
|
||||
edges = substractSubShapes(facePeau, edgesPeau, edgesListees)
|
||||
|
||||
edgesFissurePeau = list()
|
||||
# --- au moins une extrémité du pipe sur cette face de peau
|
||||
l_edge_cercle = list()
|
||||
# --- au moins une extrémité du pipe sur cette face de peau : arêtes sui les prenent toutes
|
||||
if verticesPipePeau:
|
||||
# En premier, les edges associés aux extrémités du pipe
|
||||
edgesFissurePeau = [None for _ in range(len(verticesCircPeau))]
|
||||
i_aux = -1
|
||||
for edge in edges:
|
||||
for i_aux, vertex in enumerate(verticesCircPeau):
|
||||
logging.info(".. distance %s", geompy.MinDistance(vertex, edge))
|
||||
if ( ( geompy.MinDistance(vertex, edge) < 1.e-3 ) and ( edge not in edgesFissurePeau ) ):
|
||||
edgesFissurePeau[i_aux] = edge
|
||||
name = "edgeFissurePeau_{}".format(i_aux)
|
||||
logging.info("... entrée de %s à la place %d", edge, i_aux)
|
||||
geomPublishInFather(initLog.debug, facePeau, edge, name)
|
||||
# Ensuite, on ajoute les edges manquantes
|
||||
for edge in edges:
|
||||
if edge not in edgesFissurePeau:
|
||||
logging.info("... ajout")
|
||||
edgesFissurePeau.append(edge)
|
||||
for groupe in verticesCircPeau:
|
||||
cercle = True
|
||||
for id_vertex in geompy.GetObjectIDs(groupe):
|
||||
vertex = geompy.GetSubShape(facePeau, [id_vertex])
|
||||
distance = geompy.MinDistance(vertex, edge)
|
||||
logging.info(".. distance %s", distance)
|
||||
if ( distance > 1.e-3 ):
|
||||
cercle = False
|
||||
break
|
||||
if cercle:
|
||||
logging.info("... entrée de %s dans l_edge_cercle", edge)
|
||||
l_edge_cercle.append(edge)
|
||||
i_aux += 1
|
||||
name = "edgeFissurePeauCercle_{}".format(i_aux)
|
||||
geomPublishInFather(initLog.info, facePeau, edge, name)
|
||||
|
||||
else:
|
||||
# --- Les arêtes n'appartenant pas aux cercles
|
||||
edgesFissurePeau = list()
|
||||
for i_aux, edge in enumerate(edges):
|
||||
if edge not in l_edge_cercle:
|
||||
edgesFissurePeau.append(edge)
|
||||
name = "edgeFissurePeau{}".format(i_aux)
|
||||
name = "edgeFissurePeau_{}".format(i_aux)
|
||||
geomPublishInFather(initLog.debug, facePeau, edge, name)
|
||||
|
||||
logging.info('==> Nombre d arêtes : len(edgesFissurePeau) = %d', len(edgesFissurePeau))
|
||||
|
@ -27,10 +27,9 @@ from .trouveEdgesFissPeau import trouveEdgesFissPeau
|
||||
from .identifieFacesPeau import identifieFacesPeau
|
||||
from .identifieEdgesPeau import identifieEdgesPeau
|
||||
|
||||
def identifieElementsGeometriquesPeau(ifil, partitionPeauFissFond, edgesPipeFiss, \
|
||||
edgesFondFiss, wireFondFiss, aretesVivesC, \
|
||||
facesDefaut, centreFondFiss, rayonPipe, \
|
||||
aretesVivesCoupees, \
|
||||
def identifieElementsGeometriquesPeau(ifil, partitionPeauFissFond, \
|
||||
edgesPipeFiss, edgesFondFiss, wireFondFiss, aretesVivesC, \
|
||||
facesDefaut, centreFondFiss, rayonPipe, aretesVivesCoupees, \
|
||||
nro_cas=None):
|
||||
"""Identification des éléments géométriques de la face de peau"""
|
||||
logging.info('start')
|
||||
@ -69,7 +68,8 @@ def identifieElementsGeometriquesPeau(ifil, partitionPeauFissFond, edgesPipeFiss
|
||||
|
||||
# --- identification précise des edges et disques des faces de peau selon index extremité fissure
|
||||
|
||||
(endsEdgeFond, facesPipePeau, edgeRadFacePipePeau, edgesCircPeau, verticesCircPeau, groupEdgesBordPeau, \
|
||||
(endsEdgeFond, facesPipePeau, edgeRadFacePipePeau, \
|
||||
edgesCircPeau, groupEdgesBordPeau, \
|
||||
bordsVifs, edgesFissurePeau, aretesVivesCoupees) = \
|
||||
identifieEdgesPeau(edgesFissExtPipe, verticesPipePeau, facePeau, facesPeauSorted, \
|
||||
edgesPeauFondIn, fillingFaceExterne, aretesVivesC, aretesVivesCoupees, \
|
||||
@ -83,7 +83,6 @@ def identifieElementsGeometriquesPeau(ifil, partitionPeauFissFond, edgesPipeFiss
|
||||
edgesFissExtPipe = edgesFissExtPipe, # pour chaque face [edge commun au pipe des faces de fissure externes]
|
||||
facePeau = facePeau, # pour chaque face : la face de peau finale a mailler (percee des faces débouchantes)
|
||||
edgesCircPeau = edgesCircPeau, # pour chaque face de peau : [groupe subshapes edges circulaires aux débouchés du pipe]
|
||||
verticesCircPeau = verticesCircPeau, # pour chaque face de peau : [groupe subshapes points sur edges circulaires aux débouchés du pipe]
|
||||
groupEdgesBordPeau = groupEdgesBordPeau, # pour chaque face de peau : groupe subshape des edges aux bords liés à la partie saine
|
||||
bordsVifs = bordsVifs, # pour chaque face de peau : groupe subshape des edges aux bords correspondant à des arêtes vives
|
||||
edgesFissurePeau = edgesFissurePeau, # pour chaque face de peau : [subshape edge en peau des faces de fissure externes]
|
||||
|
@ -60,7 +60,8 @@ def mailleFacesFissure(faceFissureExterne, \
|
||||
hypo2d.SetQuadAllowed( 0 )
|
||||
putName(hypo2d, "faceFiss", i_pref=nro_cas)
|
||||
|
||||
logging.info("UseExisting1DElements depuis '%s'", edgesPipeFissureExterneC.GetName())
|
||||
logging.info("UseExisting1DElements sur la géométrie '%s' avec les mailles de '%s'", \
|
||||
edgesPipeFissureExterneC.GetName(), edgeFaceFissGroup.GetName())
|
||||
algo1d = meshFaceFiss.UseExisting1DElements(geom=edgesPipeFissureExterneC)
|
||||
putName(algo1d.GetSubMesh(), "edgeFissPeau", i_pref=nro_cas)
|
||||
hypo1d = algo1d.SourceEdges([ edgeFaceFissGroup ],0,0)
|
||||
|
@ -34,7 +34,7 @@ from . import initLog
|
||||
from .putName import putName
|
||||
|
||||
def mailleFacesPeau(partitionsPeauFissFond, idFillingFromBout, facesDefaut, \
|
||||
facesPeaux, edCircPeau, ptCircPeau, gpedgeBord, gpedgeVifs, edFissPeau, \
|
||||
facesPeaux, edCircPeau, gpedgeBord, gpedgeVifs, edFissPeau, \
|
||||
bordsLibres, grpEdgesPeauFissureExterne, grpAretesVives, \
|
||||
edgesCircPipeGroup, dmoyen, rayonPipe, nbsegRad, \
|
||||
mailleur="MeshGems", nro_cas=None):
|
||||
@ -91,13 +91,13 @@ def mailleFacesPeau(partitionsPeauFissFond, idFillingFromBout, facesDefaut, \
|
||||
# --- edges de bord de la face de filling
|
||||
filling = facesDefaut[ifil]
|
||||
edgesFilling = geompy.ExtractShapes(filling, geompy.ShapeType["EDGE"], False)
|
||||
groupEdgesBordPeau = geompy.CreateGroup(filling, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionList(groupEdgesBordPeau, edgesFilling)
|
||||
geomPublishInFather(initLog.always, filling, groupEdgesBordPeau, "EdgesBords", nro_cas)
|
||||
gpedgeBord[ifil] = geompy.CreateGroup(filling, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionList(gpedgeBord[ifil], edgesFilling)
|
||||
geomPublishInFather(initLog.always, filling, gpedgeBord[ifil], "EdgesBords", nro_cas)
|
||||
|
||||
logging.info("UseExisting1DElements sur la géométrie '%s' avec les mailles de '%s'", \
|
||||
groupEdgesBordPeau.GetName(), bordsLibres.GetName())
|
||||
algo1d = meshFacePeau.UseExisting1DElements(geom=groupEdgesBordPeau)
|
||||
gpedgeBord[ifil].GetName(), bordsLibres.GetName())
|
||||
algo1d = meshFacePeau.UseExisting1DElements(geom=gpedgeBord[ifil])
|
||||
putName(algo1d.GetSubMesh(), "bordsLibres", ifil, nro_cas)
|
||||
hypo1d = algo1d.SourceEdges([ bordsLibres ],0,0)
|
||||
putName(hypo1d, "SourceEdges_{}".format(bordsLibres.GetName()), ifil, nro_cas)
|
||||
@ -105,21 +105,20 @@ def mailleFacesPeau(partitionsPeauFissFond, idFillingFromBout, facesDefaut, \
|
||||
else:
|
||||
|
||||
logging.info("face de peau %d coupée par la fissure", ifil)
|
||||
edgesCircPeau = edCircPeau[ifil] # pour chaque face de peau : [subshape edge circulaire aux débouchés du pipe]
|
||||
_ = ptCircPeau[ifil] # pour chaque face de peau : [subshape point sur edge circulaire aux débouchés du pipe]
|
||||
groupEdgesBordPeau = gpedgeBord[ifil] # pour chaque face de peau : groupe subshape des edges aux bords liés à la partie saine
|
||||
bordsVifs = gpedgeVifs[ifil] # pour chaque face de peau : groupe subshape des edges aux bords correspondant à des arêtes vives
|
||||
edgesFissurePeau = edFissPeau[ifil] # pour chaque face de peau : [subshape edge en peau des faces de fissure externes]
|
||||
# edCircPeau[ifil] # pour chaque face de peau : [subshape edge circulaire aux débouchés du pipe]
|
||||
# gpedgeBord[ifil] : pour chaque face de peau : groupe subshape des edges aux bords liés à la partie saine
|
||||
# gpedgeVifs[ifil] : pour chaque face de peau : groupe subshape des edges aux bords correspondant à des arêtes vives
|
||||
# edFissPeau[ifil] : pour chaque face de peau : [subshape edge en peau des faces de fissure externes]
|
||||
|
||||
logging.info("UseExisting1DElements sur la géométrie '%s' avec les mailles de '%s'", \
|
||||
groupEdgesBordPeau.GetName(), bordsLibres.GetName())
|
||||
algo1d = meshFacePeau.UseExisting1DElements(geom=groupEdgesBordPeau)
|
||||
gpedgeBord[ifil].GetName(), bordsLibres.GetName())
|
||||
algo1d = meshFacePeau.UseExisting1DElements(geom=gpedgeBord[ifil])
|
||||
putName(algo1d.GetSubMesh(), "bordsLibres", ifil, nro_cas)
|
||||
hypo1d = algo1d.SourceEdges([ bordsLibres ],0,0)
|
||||
putName(hypo1d, "SourceEdges_{}".format(bordsLibres.GetName()), i_pref=nro_cas)
|
||||
|
||||
objet = geompy.MakeCompound(edgesFissurePeau)
|
||||
geomPublishInFather(initLog.always, facePeau, objet, "edgesFissurePeau")
|
||||
objet = geompy.MakeCompound(edFissPeau[ifil])
|
||||
geomPublishInFather(initLog.always, facePeau, objet, "edFissPeau_{}".format(ifil))
|
||||
logging.info("UseExisting1DElements sur la géométrie '%s' avec les mailles de '%s'", \
|
||||
objet.GetName(), grpEdgesPeauFissureExterne.GetName())
|
||||
algo1d = meshFacePeau.UseExisting1DElements(geom=objet)
|
||||
@ -127,15 +126,15 @@ def mailleFacesPeau(partitionsPeauFissFond, idFillingFromBout, facesDefaut, \
|
||||
hypo1d = algo1d.SourceEdges([ grpEdgesPeauFissureExterne ],0,0)
|
||||
putName(hypo1d, "SourceEdges_{}".format(grpEdgesPeauFissureExterne.GetName()), i_pref=nro_cas)
|
||||
|
||||
if bordsVifs is not None:
|
||||
if gpedgeVifs[ifil] is not None:
|
||||
logging.info("UseExisting1DElements sur la géométrie '%s' avec les mailles de '%s'", \
|
||||
bordsVifs.GetName(), grpAretesVives.GetName())
|
||||
algo1d = meshFacePeau.UseExisting1DElements(geom=bordsVifs)
|
||||
putName(algo1d.GetSubMesh(), "bordsVifs", ifil, nro_cas)
|
||||
gpedgeVifs[ifil].GetName(), grpAretesVives.GetName())
|
||||
algo1d = meshFacePeau.UseExisting1DElements(geom=gpedgeVifs[ifil])
|
||||
putName(algo1d.GetSubMesh(), "gpedgeVifs", ifil, nro_cas)
|
||||
hypo1d = algo1d.SourceEdges([ grpAretesVives ],0,0)
|
||||
putName(hypo1d, "SourceEdges_{}".format(grpAretesVives.GetName()), i_pref=nro_cas)
|
||||
|
||||
for i_aux, edgeCirc in enumerate(edgesCircPeau):
|
||||
for i_aux, edgeCirc in enumerate(edCircPeau[ifil]):
|
||||
texte = "i_aux = {}".format(i_aux)
|
||||
logging.info(texte)
|
||||
if edgeCirc is not None:
|
||||
|
@ -25,13 +25,13 @@ SET(plugin_SCRIPTS
|
||||
cubeAngle.py
|
||||
cubeFin.py
|
||||
decoupeCylindre.py
|
||||
disque_perce.py
|
||||
disquePerce.py
|
||||
ellipse_disque.py
|
||||
ellipse_probleme.py
|
||||
ellipse.py
|
||||
eprouvetteCourbe.py
|
||||
eprouvetteDroite.py
|
||||
fissureGauche2.py
|
||||
fissureGauche_2.py
|
||||
fissureGauche.py
|
||||
genereMateriel.py
|
||||
tube.py
|
||||
|
@ -19,7 +19,7 @@
|
||||
#
|
||||
"""Géométries et maillages de base nécessaires aux cas-tests :
|
||||
. cubeAngle
|
||||
. cubeAngle2
|
||||
. cubeAngle_2
|
||||
"""
|
||||
|
||||
import os
|
||||
|
@ -18,7 +18,7 @@
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
"""Géométrie et maillage de base nécessaire au cas-test :
|
||||
. disque_perce
|
||||
. disquePerce
|
||||
"""
|
||||
|
||||
import os
|
@ -54,8 +54,8 @@ Scale_1 = geompy.MakeScaleAlongAxes(Rotation_1, Vertex_1, 1, 1.5, 1)
|
||||
Vertex_3 = geompy.MakeVertex(420, -400, 300)
|
||||
Vertex_4 = geompy.MakeVertex(500, 400, 500)
|
||||
Box_1 = geompy.MakeBoxTwoPnt(Vertex_4, Vertex_3)
|
||||
ellipse1 = geompy.MakeCut(Scale_1, Box_1)
|
||||
[fondFiss] = geompy.SubShapes(ellipse1, [4])
|
||||
ellipse_1 = geompy.MakeCut(Scale_1, Box_1)
|
||||
[fondFiss] = geompy.SubShapes(ellipse_1, [4])
|
||||
geompy.addToStudy( O, 'O' )
|
||||
geompy.addToStudy( OX, 'OX' )
|
||||
geompy.addToStudy( OY, 'OY' )
|
||||
@ -69,9 +69,9 @@ geompy.addToStudy( Scale_1, 'Scale_1' )
|
||||
geompy.addToStudy( Vertex_3, 'Vertex_3' )
|
||||
geompy.addToStudy( Vertex_4, 'Vertex_4' )
|
||||
geompy.addToStudy( Box_1, 'Box_1' )
|
||||
geompy.addToStudy( ellipse1, 'ellipse1' )
|
||||
geompy.addToStudyInFather( ellipse1, fondFiss, 'fondFiss' )
|
||||
geompy.ExportBREP(ellipse1, os.path.join(gmu.pathBloc, "materielCasTests", "ellipse1.brep"))
|
||||
geompy.addToStudy( ellipse_1, 'ellipse_1' )
|
||||
geompy.addToStudyInFather( ellipse_1, fondFiss, 'fondFiss' )
|
||||
geompy.ExportBREP(ellipse_1, os.path.join(gmu.pathBloc, "materielCasTests", "ellipse_1.brep"))
|
||||
|
||||
|
||||
if salome.sg.hasDesktop():
|
||||
|
@ -54,7 +54,7 @@ Vertex_2 = geompy.MakeVertex(20, -100, -50)
|
||||
Vertex_4 = geompy.MakeVertex(100, 100, 50)
|
||||
Box_1 = geompy.MakeBoxTwoPnt(Vertex_2, Vertex_4)
|
||||
Cut_1 = geompy.MakeCut(Rotation_1, Box_1)
|
||||
ellipse1 = geompy.MakeTranslation(Cut_1, 400, 0, 400)
|
||||
ellipse_1 = geompy.MakeTranslation(Cut_1, 400, 0, 400)
|
||||
geompy.addToStudy( Disk_1, 'Disk_1' )
|
||||
geompy.addToStudy( O, 'O' )
|
||||
geompy.addToStudy( OX, 'OX' )
|
||||
@ -68,8 +68,8 @@ geompy.addToStudy( Vertex_2, 'Vertex_2' )
|
||||
geompy.addToStudy( Box_1, 'Box_1' )
|
||||
geompy.addToStudy( Vertex_4, 'Vertex_4' )
|
||||
geompy.addToStudy( Cut_1, 'Cut_1' )
|
||||
geompy.addToStudy( ellipse1, 'ellipse1_pb' )
|
||||
geompy.ExportBREP(ellipse1, os.path.join(gmu.pathBloc, "materielCasTests", "ellipse1_pb.brep"))
|
||||
geompy.addToStudy( ellipse_1, 'ellipse_1_pb' )
|
||||
geompy.ExportBREP(ellipse_1, os.path.join(gmu.pathBloc, "materielCasTests", "ellipse_1_pb.brep"))
|
||||
|
||||
|
||||
if salome.sg.hasDesktop():
|
||||
|
@ -21,13 +21,13 @@
|
||||
from blocFissure.materielCasTests import cubeAngle
|
||||
from blocFissure.materielCasTests import cubeFin
|
||||
from blocFissure.materielCasTests import decoupeCylindre
|
||||
from blocFissure.materielCasTests import disque_perce
|
||||
from blocFissure.materielCasTests import disquePerce
|
||||
from blocFissure.materielCasTests import ellipse_disque
|
||||
from blocFissure.materielCasTests import ellipse
|
||||
from blocFissure.materielCasTests import ellipse_probleme
|
||||
from blocFissure.materielCasTests import eprouvetteCourbe
|
||||
from blocFissure.materielCasTests import eprouvetteDroite
|
||||
from blocFissure.materielCasTests import fissureGauche
|
||||
from blocFissure.materielCasTests import fissureGauche2
|
||||
from blocFissure.materielCasTests import fissureGauche_2
|
||||
from blocFissure.materielCasTests import vis
|
||||
from blocFissure.materielCasTests import tube
|
||||
|