mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
Update tests to run on Windows platform.
This commit is contained in:
parent
741a54331a
commit
8efe344000
@ -24,11 +24,21 @@ import unittest, sys, os
|
|||||||
class SalomeSession(object):
|
class SalomeSession(object):
|
||||||
def __init__(self, script):
|
def __init__(self, script):
|
||||||
import runSalome
|
import runSalome
|
||||||
sys.argv = ["runSalome.py"]
|
run_script = "runSalome.py"
|
||||||
|
if sys.platform == 'win32':
|
||||||
|
module_variable = "KERNEL_ROOT_DIR"
|
||||||
|
if os.environ.has_key(module_variable):
|
||||||
|
run_script = os.environ[module_variable] + "\\bin\\salome\\" + run_script
|
||||||
|
sys.argv = [run_script]
|
||||||
sys.argv += ["--terminal"]
|
sys.argv += ["--terminal"]
|
||||||
sys.argv += ["--modules=GEOM,MED,SMESH"]
|
sys.argv += ["--modules=GEOM,MED,SMESH"]
|
||||||
sys.argv += ["%s" % script]
|
sys.argv += ["%s" % script]
|
||||||
|
if sys.platform == 'win32':
|
||||||
|
main_module_path = sys.modules['__main__'].__file__
|
||||||
|
sys.modules['__main__'].__file__ = ''
|
||||||
clt, d = runSalome.main()
|
clt, d = runSalome.main()
|
||||||
|
if sys.platform == 'win32':
|
||||||
|
sys.modules['__main__'].__file__ = main_module_path
|
||||||
return
|
return
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
|
@ -1536,7 +1536,7 @@ SMESH_MeshAlgos::FindFaceInSet(const SMDS_MeshNode* n1,
|
|||||||
int* n2ind)
|
int* n2ind)
|
||||||
|
|
||||||
{
|
{
|
||||||
int i1, i2;
|
int i1 = 0, i2 = 0;
|
||||||
const SMDS_MeshElement* face = 0;
|
const SMDS_MeshElement* face = 0;
|
||||||
|
|
||||||
SMDS_ElemIteratorPtr invElemIt = n1->GetInverseElementIterator(SMDSAbs_Face);
|
SMDS_ElemIteratorPtr invElemIt = n1->GetInverseElementIterator(SMDSAbs_Face);
|
||||||
|
@ -1307,7 +1307,7 @@ bool AdaptiveAlgo::Compute(SMESH_Mesh & theMesh,
|
|||||||
// << "\t SetSize " << allowedSize << " at "
|
// << "\t SetSize " << allowedSize << " at "
|
||||||
// << pIt1->myP.X() <<", "<< pIt1->myP.Y()<<", "<<pIt1->myP.Z() << endl;
|
// << pIt1->myP.X() <<", "<< pIt1->myP.Y()<<", "<<pIt1->myP.Z() << endl;
|
||||||
pIt2 = pIt1;
|
pIt2 = pIt1;
|
||||||
if ( --pIt2 != eData.myPoints.end() && pIt2->mySegSize > allowedSize )
|
if ( pIt2 != eData.myPoints.begin() && --pIt2 != eData.myPoints.end() && pIt2->mySegSize > allowedSize )
|
||||||
sizeTree.SetSize( eData.myC3d.Value( 0.6*pIt2->myU + 0.4*pIt1->myU ), allowedSize );
|
sizeTree.SetSize( eData.myC3d.Value( 0.6*pIt2->myU + 0.4*pIt1->myU ), allowedSize );
|
||||||
pIt2 = pIt1;
|
pIt2 = pIt1;
|
||||||
if ( ++pIt2 != eData.myPoints.end() && pIt2->mySegSize > allowedSize )
|
if ( ++pIt2 != eData.myPoints.end() && pIt2->mySegSize > allowedSize )
|
||||||
@ -1316,7 +1316,7 @@ bool AdaptiveAlgo::Compute(SMESH_Mesh & theMesh,
|
|||||||
pIt1->mySegSize = allowedSize;
|
pIt1->mySegSize = allowedSize;
|
||||||
}
|
}
|
||||||
++pIt1;
|
++pIt1;
|
||||||
if ( & (*pIt1) == & eData.Last() )
|
if ( pIt1 != eData.myPoints.end() && ( & (*pIt1) == & eData.Last() ) )
|
||||||
avoidPnt = & eData.Last().myP;
|
avoidPnt = & eData.Last().myP;
|
||||||
else
|
else
|
||||||
avoidPnt = NULL;
|
avoidPnt = NULL;
|
||||||
|
@ -657,7 +657,7 @@ void StdMeshers_Penta_3D::MakeVolumeMesh()
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
// 2. Make pentahedrons
|
// 2. Make pentahedrons
|
||||||
int aID0, k , aJ[3];
|
int aID0, k , aJ[4];
|
||||||
vector<const SMDS_MeshNode*> aN;
|
vector<const SMDS_MeshNode*> aN;
|
||||||
//
|
//
|
||||||
SMDS_ElemIteratorPtr itf, aItNodes;
|
SMDS_ElemIteratorPtr itf, aItNodes;
|
||||||
|
@ -913,10 +913,10 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh& aMesh,
|
|||||||
aTrsf2d.Transforms( cx, cy );
|
aTrsf2d.Transforms( cx, cy );
|
||||||
// set node on face
|
// set node on face
|
||||||
meshDS->SetNodeOnFace( node, faceID, cx, cy );
|
meshDS->SetNodeOnFace( node, faceID, cx, cy );
|
||||||
tmpNodes[j-1] = node;
|
tmpNodes.push_back(node);
|
||||||
}
|
}
|
||||||
// create faces
|
// create faces
|
||||||
tmpNodes[Points.Length()] = CNodes[i];
|
tmpNodes.push_back( CNodes[i] );
|
||||||
// quad
|
// quad
|
||||||
for(j=0; j<Nodes1.size()-1; j++) {
|
for(j=0; j<Nodes1.size()-1; j++) {
|
||||||
SMDS_MeshFace* MF;
|
SMDS_MeshFace* MF;
|
||||||
|
Loading…
Reference in New Issue
Block a user