Salome HOME
projects
/
plugins
/
blsurfplugin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6174650
)
Deleted Study parameter
author
mpa
<mpa@opencascade.com>
Fri, 3 Feb 2017 13:17:05 +0000
(16:17 +0300)
committer
mpa
<mpa@opencascade.com>
Fri, 3 Feb 2017 13:17:05 +0000
(16:17 +0300)
19 files changed:
doc/salome/examples/blsurfdemo.py
patch
|
blob
|
history
doc/salome/examples/test_periodicity_precad.py
patch
|
blob
|
history
src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx
patch
|
blob
|
history
src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx
patch
|
blob
|
history
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx
patch
|
blob
|
history
src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx
patch
|
blob
|
history
tests/test_enforced_internal_vertex.py
patch
|
blob
|
history
tests/test_enforced_vertex.py
patch
|
blob
|
history
tests/test_periodicity_2D_precad.py
patch
|
blob
|
history
tests/test_periodicity_precad.py
patch
|
blob
|
history
tests/test_periodicity_reflexion_2D_precad.py
patch
|
blob
|
history
tests/test_periodicity_reflexion_precad.py
patch
|
blob
|
history
tests/test_periodicity_with_points_2D_precad.py
patch
|
blob
|
history
tests/test_precad_intersections.py
patch
|
blob
|
history
tests/test_precad_keep_gaps.py
patch
|
blob
|
history
tests/test_proximity.py
patch
|
blob
|
history
tests/test_quadrangles_gradation.py
patch
|
blob
|
history
tests/test_remove_tiny_edges.py
patch
|
blob
|
history
tests/test_sphere.py
patch
|
blob
|
history
diff --git
a/doc/salome/examples/blsurfdemo.py
b/doc/salome/examples/blsurfdemo.py
index 75221c16a0e8d7f2c0465511022f27c0ce3ad1e5..4d98941ec6d02422fe7af0bb4d040b16e99af344 100644
(file)
--- a/
doc/salome/examples/blsurfdemo.py
+++ b/
doc/salome/examples/blsurfdemo.py
@@
-6,11
+6,11
@@
import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
salome.myStudy
)
+smesh = smeshBuilder.New()
# create a box
box = geompy.MakeBoxDXDYDZ(200., 200., 200.)
# create a box
box = geompy.MakeBoxDXDYDZ(200., 200., 200.)
diff --git
a/doc/salome/examples/test_periodicity_precad.py
b/doc/salome/examples/test_periodicity_precad.py
index c15afcbad1157ad3d0071ddf9a1fc686e7267dad..f901cc12defa9c3bdec2278ba5654f90f3b72bf7 100644
(file)
--- a/
doc/salome/examples/test_periodicity_precad.py
+++ b/
doc/salome/examples/test_periodicity_precad.py
@@
-5,7
+5,7
@@
import math
import GEOM
from salome.geom import geomBuilder
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
simple = False
simple = False
@@
-90,7
+90,7
@@
geompy.addToStudyInFather(part, sources, "sources")
import SMESH
from salome.smesh import smeshBuilder
import SMESH
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
salome.myStudy
)
+smesh = smeshBuilder.New()
Mesh = smesh.Mesh(part, "Mesh")
Mesh = smesh.Mesh(part, "Mesh")
@@
-136,5
+136,5
@@
checkProjection(gr_right, left_translated)
checkProjection(gr_back, front_translated)
checkProjection(gr_top, bottom_translated)
checkProjection(gr_back, front_translated)
checkProjection(gr_top, bottom_translated)
-salome.sg.updateObjBrowser(
True
)
+salome.sg.updateObjBrowser()
diff --git
a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx
b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx
index 568f3dd6a3315dfddc314462521f60f9c86dd2a3..434b73268c19ebb78fa8d9da1a9f6dbe4cb7e09b 100644
(file)
--- a/
src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx
+++ b/
src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx
@@
-252,12
+252,6
@@
BLSURFPlugin_BLSURF::BLSURFPlugin_BLSURF(int hypId, SMESH_Gen* gen)
_hypothesis = NULL;
_supportSubmeshes = true;
_hypothesis = NULL;
_supportSubmeshes = true;
- smeshGen_i = SMESH_Gen_i::GetSMESHGen();
- CORBA::Object_var anObject = smeshGen_i->GetNS()->Resolve("/Study");
- myStudy = SALOMEDS::Study::_narrow(anObject);
- if ( !myStudy->_is_nil() )
- MESSAGE("myStudy not empty");
-
/* Initialize the Python interpreter */
assert(Py_IsInitialized());
PyGILState_STATE gstate;
/* Initialize the Python interpreter */
assert(Py_IsInitialized());
PyGILState_STATE gstate;
@@
-439,14
+433,14
@@
TopoDS_Shape BLSURFPlugin_BLSURF::entryToShape(std::string entry)
MESSAGE("BLSURFPlugin_BLSURF::entryToShape "<<entry );
GEOM::GEOM_Object_var aGeomObj;
TopoDS_Shape S = TopoDS_Shape();
MESSAGE("BLSURFPlugin_BLSURF::entryToShape "<<entry );
GEOM::GEOM_Object_var aGeomObj;
TopoDS_Shape S = TopoDS_Shape();
- SALOMEDS::SObject_var aSObj =
myStudy
->FindObjectID( entry.c_str() );
+ SALOMEDS::SObject_var aSObj =
SMESH_Gen_i::getStudyServant()
->FindObjectID( entry.c_str() );
if (!aSObj->_is_nil()) {
CORBA::Object_var obj = aSObj->GetObject();
aGeomObj = GEOM::GEOM_Object::_narrow(obj);
aSObj->UnRegister();
}
if ( !aGeomObj->_is_nil() )
if (!aSObj->_is_nil()) {
CORBA::Object_var obj = aSObj->GetObject();
aGeomObj = GEOM::GEOM_Object::_narrow(obj);
aSObj->UnRegister();
}
if ( !aGeomObj->_is_nil() )
- S =
smeshGen_i
->GeomObjectToShape( aGeomObj.in() );
+ S =
SMESH_Gen_i::GetSMESHGen()
->GeomObjectToShape( aGeomObj.in() );
return S;
}
return S;
}
diff --git
a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx
b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx
index bd51354ce3e846724dc2c41e5becf1819f21ef34..e87d33e948395b7daeac601ab9e7e7eea754e1cc 100644
(file)
--- a/
src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx
+++ b/
src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx
@@
-158,8
+158,6
@@
class BLSURFPlugin_BLSURF: public SMESH_2D_Algo {
PyObject * main_mod;
PyObject * main_dict;
SMESH_Mesh* myMesh;
PyObject * main_mod;
PyObject * main_dict;
SMESH_Mesh* myMesh;
- SALOMEDS::Study_var myStudy;
- SMESH_Gen_i* smeshGen_i;
volatile bool _compute_canceled;
};
volatile bool _compute_canceled;
};
diff --git
a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx
b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx
index cf5f574787722c247c27e399cd2533e8fbd2c242..12d12bfdfbecbf082ca6bc31fcb0672cda5cbc77 100644
(file)
--- a/
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx
+++ b/
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx
@@
-246,18
+246,16
@@
TopoDS_Shape BLSURFPlugin_Hypothesis::entryToShape(std::string entry)
{
MESSAGE("BLSURFPlugin_Hypothesis::entryToShape "<<entry );
GEOM::GEOM_Object_var aGeomObj;
{
MESSAGE("BLSURFPlugin_Hypothesis::entryToShape "<<entry );
GEOM::GEOM_Object_var aGeomObj;
- SMESH_Gen_i* smeshGen_i = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::Study_ptr myStudy = smeshGen_i->GetStudy();
TopoDS_Shape S = TopoDS_Shape();
TopoDS_Shape S = TopoDS_Shape();
- SALOMEDS::SObject_var aSObj =
myStudy
->FindObjectID( entry.c_str() );
+ SALOMEDS::SObject_var aSObj =
SMESH_Gen_i::getStudyServant()
->FindObjectID( entry.c_str() );
if (!aSObj->_is_nil() ) {
CORBA::Object_var obj = aSObj->GetObject();
aGeomObj = GEOM::GEOM_Object::_narrow(obj);
aSObj->UnRegister();
}
if ( !aGeomObj->_is_nil() )
if (!aSObj->_is_nil() ) {
CORBA::Object_var obj = aSObj->GetObject();
aGeomObj = GEOM::GEOM_Object::_narrow(obj);
aSObj->UnRegister();
}
if ( !aGeomObj->_is_nil() )
- S =
smeshGen_i
->GeomObjectToShape( aGeomObj.in() );
+ S =
SMESH_Gen_i::GetSMESHGen()
->GeomObjectToShape( aGeomObj.in() );
return S;
}
return S;
}
diff --git
a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx
b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx
index 7d9341d9048b70169b835ded6518a7aabff1cbb7..d28d03610a91dec34ba3698a8c71777a45498eab 100644
(file)
--- a/
src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx
+++ b/
src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx
@@
-478,9
+478,8
@@
BLSURFPluginGUI_HypothesisCreator::~BLSURFPluginGUI_HypothesisCreator()
GeomSelectionTools* BLSURFPluginGUI_HypothesisCreator::getGeomSelectionTool() const
{
BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
GeomSelectionTools* BLSURFPluginGUI_HypothesisCreator::getGeomSelectionTool() const
{
BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
- _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
- if (that->GeomToolSelected == NULL || that->GeomToolSelected->getMyStudy() != aStudy) {
- that->GeomToolSelected = new GeomSelectionTools(aStudy);
+ if (that->GeomToolSelected == NULL) {
+ that->GeomToolSelected = new GeomSelectionTools();
}
return that->GeomToolSelected;
}
}
return that->GeomToolSelected;
}
@@
-3384,10
+3383,8
@@
LightApp_SelectionMgr* BLSURFPluginGUI_HypothesisCreator::selectionMgr()
CORBA::Object_var BLSURFPluginGUI_HypothesisCreator::entryToObject(QString entry)
{
CORBA::Object_var BLSURFPluginGUI_HypothesisCreator::entryToObject(QString entry)
{
- SMESH_Gen_i* smeshGen_i = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::Study_var myStudy = smeshGen_i->GetStudy();
CORBA::Object_var obj;
CORBA::Object_var obj;
- SALOMEDS::SObject_var aSObj =
myStudy
->FindObjectID( entry.toStdString().c_str() );
+ SALOMEDS::SObject_var aSObj =
SMESH_Gen_i::getStudyServant()
->FindObjectID( entry.toStdString().c_str() );
if (!aSObj->_is_nil()) {
obj = aSObj->GetObject();
aSObj->UnRegister();
if (!aSObj->_is_nil()) {
obj = aSObj->GetObject();
aSObj->UnRegister();
diff --git
a/tests/test_enforced_internal_vertex.py
b/tests/test_enforced_internal_vertex.py
index 5459def29e8e7fb5f2573ca878c4b71882dba258..574101d9e71a736c277a4d0276192d16d9ce5e90 100644
(file)
--- a/
tests/test_enforced_internal_vertex.py
+++ b/
tests/test_enforced_internal_vertex.py
@@
-5,7
+5,7
@@
import math
import GEOM
from salome.geom import geomBuilder
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
r = 10
dist = 10
r = 10
dist = 10
@@
-31,7
+31,7
@@
geompy.addToStudyInFather(box, left, "left")
import SMESH
from salome.smesh import smeshBuilder
import SMESH
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
salome.myStudy
)
+smesh = smeshBuilder.New()
Mesh = smesh.Mesh(part, "Mesh")
Mesh = smesh.Mesh(part, "Mesh")
@@
-50,5
+50,5
@@
x, y, z = Mesh.GetNodeXYZ(id_node)
assert("%.2f, %.2f, %.2f"%(x, y, z) == "%.2f, %.2f, %.2f"%(dist_coin, 0, dist_coin))
assert("%.2f, %.2f, %.2f"%(x, y, z) == "%.2f, %.2f, %.2f"%(dist_coin, 0, dist_coin))
-salome.sg.updateObjBrowser(
True
)
+salome.sg.updateObjBrowser()
diff --git
a/tests/test_enforced_vertex.py
b/tests/test_enforced_vertex.py
index 19172cd12414094d14f8e0f4e34791319bc88ee0..395c75a99a76793b15912767fddb1657d9a53ef9 100644
(file)
--- a/
tests/test_enforced_vertex.py
+++ b/
tests/test_enforced_vertex.py
@@
-5,7
+5,7
@@
import math
import GEOM
from salome.geom import geomBuilder
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
r = 10
dist = 10
r = 10
dist = 10
@@
-27,7
+27,7
@@
geompy.addToStudyInFather(box, left, "left")
import SMESH
from salome.smesh import smeshBuilder
import SMESH
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
salome.myStudy
)
+smesh = smeshBuilder.New()
Mesh = smesh.Mesh(box, "Mesh")
Mesh = smesh.Mesh(box, "Mesh")
@@
-48,5
+48,5
@@
x, y, z = Mesh.GetNodeXYZ(id_node)
assert("%.2f, %.2f, %.2f"%(x, y, z) == "%.2f, %.2f, %.2f"%(dist_coin, 0, dist_coin))
assert("%.2f, %.2f, %.2f"%(x, y, z) == "%.2f, %.2f, %.2f"%(dist_coin, 0, dist_coin))
-salome.sg.updateObjBrowser(
True
)
+salome.sg.updateObjBrowser()
diff --git
a/tests/test_periodicity_2D_precad.py
b/tests/test_periodicity_2D_precad.py
index 0bad8e8ec950c9d883a8ccd6f323e4af65cc7462..771a0fc8b841576b2c9f44254ebf7a94d891cf4b 100644
(file)
--- a/
tests/test_periodicity_2D_precad.py
+++ b/
tests/test_periodicity_2D_precad.py
@@
-11,7
+11,7
@@
import math
import GEOM
from salome.geom import geomBuilder
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
O = geompy.MakeVertex(0, 0, 0)
OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
O = geompy.MakeVertex(0, 0, 0)
OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
@@
-61,7
+61,7
@@
geompy.addToStudyInFather(part, source_face, "source_face")
import SMESH
from salome.smesh import smeshBuilder
import SMESH
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
salome.myStudy
)
+smesh = smeshBuilder.New()
Mesh = smesh.Mesh(part, "Mesh")
Mesh = smesh.Mesh(part, "Mesh")
@@
-107,4
+107,4
@@
checkProjection(gr_right, left_translated)
checkProjection(gr_top, bottom_translated)
if salome.sg.hasDesktop():
checkProjection(gr_top, bottom_translated)
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(
True
)
+ salome.sg.updateObjBrowser()
diff --git
a/tests/test_periodicity_precad.py
b/tests/test_periodicity_precad.py
index c15afcbad1157ad3d0071ddf9a1fc686e7267dad..f901cc12defa9c3bdec2278ba5654f90f3b72bf7 100644
(file)
--- a/
tests/test_periodicity_precad.py
+++ b/
tests/test_periodicity_precad.py
@@
-5,7
+5,7
@@
import math
import GEOM
from salome.geom import geomBuilder
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
simple = False
simple = False
@@
-90,7
+90,7
@@
geompy.addToStudyInFather(part, sources, "sources")
import SMESH
from salome.smesh import smeshBuilder
import SMESH
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
salome.myStudy
)
+smesh = smeshBuilder.New()
Mesh = smesh.Mesh(part, "Mesh")
Mesh = smesh.Mesh(part, "Mesh")
@@
-136,5
+136,5
@@
checkProjection(gr_right, left_translated)
checkProjection(gr_back, front_translated)
checkProjection(gr_top, bottom_translated)
checkProjection(gr_back, front_translated)
checkProjection(gr_top, bottom_translated)
-salome.sg.updateObjBrowser(
True
)
+salome.sg.updateObjBrowser()
diff --git
a/tests/test_periodicity_reflexion_2D_precad.py
b/tests/test_periodicity_reflexion_2D_precad.py
index 975258f178e565b2261049f736988869c7209c08..cf44fb1f9ec505c37729a8d00ed5eafef31bc03f 100644
(file)
--- a/
tests/test_periodicity_reflexion_2D_precad.py
+++ b/
tests/test_periodicity_reflexion_2D_precad.py
@@
-11,7
+11,7
@@
import math
import GEOM
from salome.geom import geomBuilder
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
O = geompy.MakeVertex(0, 0, 0)
OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
O = geompy.MakeVertex(0, 0, 0)
OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
@@
-74,7
+74,7
@@
geompy.addToStudy(p_haut_droite, "p_haut_droite")
import SMESH
from salome.smesh import smeshBuilder
import SMESH
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
salome.myStudy
)
+smesh = smeshBuilder.New()
Mesh = smesh.Mesh(part, "Mesh")
Mesh = smesh.Mesh(part, "Mesh")
@@
-122,5
+122,5
@@
checkProjection(gr_right, bottom_rotated)
#salome.myStudy.SaveAs("test.hdf", 0)
if salome.sg.hasDesktop():
#salome.myStudy.SaveAs("test.hdf", 0)
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(
True
)
+ salome.sg.updateObjBrowser()
diff --git
a/tests/test_periodicity_reflexion_precad.py
b/tests/test_periodicity_reflexion_precad.py
index 8c9d7cdad1e5163635c354cced86ac77d9c3dd3d..2eeb6e9ce19ae58e1021ca2c1014852eb3570fdf 100644
(file)
--- a/
tests/test_periodicity_reflexion_precad.py
+++ b/
tests/test_periodicity_reflexion_precad.py
@@
-6,7
+6,7
@@
import math
import GEOM
from salome.geom import geomBuilder
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
simple = False
simple = False
@@
-77,7
+77,7
@@
geompy.addToStudy(p5, "p5")
import SMESH
from salome.smesh import smeshBuilder
import SMESH
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
salome.myStudy
)
+smesh = smeshBuilder.New()
Mesh = smesh.Mesh(part, "Mesh")
Mesh = smesh.Mesh(part, "Mesh")
@@
-118,5
+118,5
@@
def checkProjection(gr, mesh_translated, tol=1e-7):
checkProjection(gr_front, left_rotated)
checkProjection(gr_front, left_rotated)
-salome.sg.updateObjBrowser(
True
)
+salome.sg.updateObjBrowser()
diff --git
a/tests/test_periodicity_with_points_2D_precad.py
b/tests/test_periodicity_with_points_2D_precad.py
index 3dbc01dd6aa8936614858801856cc8a24f26641a..f0b12c6b88b48e7c67520f8c3840cd93f1b3d68a 100644
(file)
--- a/
tests/test_periodicity_with_points_2D_precad.py
+++ b/
tests/test_periodicity_with_points_2D_precad.py
@@
-11,7
+11,7
@@
import math
import GEOM
from salome.geom import geomBuilder
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
O = geompy.MakeVertex(0, 0, 0)
OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
O = geompy.MakeVertex(0, 0, 0)
OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
@@
-73,7
+73,7
@@
geompy.addToStudy(p_haut_droite, "p_haut_droite")
import SMESH
from salome.smesh import smeshBuilder
import SMESH
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
salome.myStudy
)
+smesh = smeshBuilder.New()
Mesh = smesh.Mesh(part, "Mesh")
Mesh = smesh.Mesh(part, "Mesh")
@@
-120,6
+120,6
@@
def checkProjection(gr, mesh_translated, tol=1e-7):
checkProjection(gr_top, bottom_translated)
if salome.sg.hasDesktop():
checkProjection(gr_top, bottom_translated)
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(
True
)
+ salome.sg.updateObjBrowser()
diff --git
a/tests/test_precad_intersections.py
b/tests/test_precad_intersections.py
index 0602459c7ec36dcfdef27d42bc5708bb4cdbcece..7c135089e7a7e97d8c02ac0305fb4ef1a6a4e995 100644
(file)
--- a/
tests/test_precad_intersections.py
+++ b/
tests/test_precad_intersections.py
@@
-4,7
+4,6
@@
import sys
import salome
salome.salome_init()
import salome
salome.salome_init()
-theStudy = salome.myStudy
###
### GEOM component
###
### GEOM component
@@
-12,10
+11,10
@@
theStudy = salome.myStudy
import GEOM
from salome.geom import geomBuilder
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
-geompy.init_geom(
theStudy
)
+geompy.init_geom()
Face_1 = geompy.MakeFaceHW(10, 10, 1)
Translation_1 = geompy.MakeTranslation(Face_1, 10.0001, 0.0001, 0)
Face_1 = geompy.MakeFaceHW(10, 10, 1)
Translation_1 = geompy.MakeTranslation(Face_1, 10.0001, 0.0001, 0)
@@
-39,7
+38,7
@@
geompy.addToStudyInFather(Partition_1, gr_vertices, "vertices")
import SMESH
from salome.smesh import smeshBuilder
import SMESH
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
salome.myStudy
)
+smesh = smeshBuilder.New()
Mesh_1 = smesh.Mesh(Partition_1)
Mesh_1 = smesh.Mesh(Partition_1)
@@
-66,4
+65,4
@@
nodesGroup = Mesh_1.MakeGroupByIds("nodes", SMESH.NODE, nodes)
assert nodesGroup.Size() == 1, nodesGroup.GetIDs()
if salome.sg.hasDesktop():
assert nodesGroup.Size() == 1, nodesGroup.GetIDs()
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(
True
)
+ salome.sg.updateObjBrowser()
diff --git
a/tests/test_precad_keep_gaps.py
b/tests/test_precad_keep_gaps.py
index 4ca8a068137e4a15c36f227ed8f1a4225647deef..242cbfb8687e4ab8c31f9eea1f21fa1eca18efb1 100644
(file)
--- a/
tests/test_precad_keep_gaps.py
+++ b/
tests/test_precad_keep_gaps.py
@@
-4,7
+4,6
@@
import sys
import salome
salome.salome_init()
import salome
salome.salome_init()
-theStudy = salome.myStudy
###
### GEOM component
###
### GEOM component
@@
-12,10
+11,10
@@
theStudy = salome.myStudy
import GEOM
from salome.geom import geomBuilder
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
-geompy.init_geom(
theStudy
)
+geompy.init_geom()
Face_1 = geompy.MakeFaceHW(10, 10, 1)
Translation_1 = geompy.MakeTranslation(Face_1, 10.0001, 0.0001, 0)
Face_1 = geompy.MakeFaceHW(10, 10, 1)
Translation_1 = geompy.MakeTranslation(Face_1, 10.0001, 0.0001, 0)
@@
-39,7
+38,7
@@
geompy.addToStudyInFather(Partition_1, gr_vertices, "vertices")
import SMESH
from salome.smesh import smeshBuilder
import SMESH
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
salome.myStudy
)
+smesh = smeshBuilder.New()
Mesh_1 = smesh.Mesh(Partition_1)
Mesh_1 = smesh.Mesh(Partition_1)
@@
-65,4
+64,4
@@
Mesh_1.MakeGroupByIds("nodes", SMESH.NODE, nodes)
assert len(nodes) == 3, "We should have 3 nodes. We got %i. => The preprocessing has done something, but we did not ask him to."%len(nodes)
if salome.sg.hasDesktop():
assert len(nodes) == 3, "We should have 3 nodes. We got %i. => The preprocessing has done something, but we did not ask him to."%len(nodes)
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(
True
)
+ salome.sg.updateObjBrowser()
diff --git
a/tests/test_proximity.py
b/tests/test_proximity.py
index a649832c8aa9490716ee154654ce806ee6251ded..c177ef580cbd20efe2be9ed06501ac86ac7a44c1 100644
(file)
--- a/
tests/test_proximity.py
+++ b/
tests/test_proximity.py
@@
-4,7
+4,6
@@
import sys
import salome
salome.salome_init()
import salome
salome.salome_init()
-theStudy = salome.myStudy
###
### GEOM component
###
### GEOM component
@@
-16,7
+15,7
@@
import math
import SALOMEDS
import SALOMEDS
-geompy = geomBuilder.New(
theStudy
)
+geompy = geomBuilder.New()
# Create a box
box = geompy.MakeBoxDXDYDZ(100, 100, 100)
# Create a box
box = geompy.MakeBoxDXDYDZ(100, 100, 100)
@@
-50,7
+49,7
@@
geompy.addToStudyInFather(part, gr_spheres_faces, "spheres_faces")
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
theStudy
)
+smesh = smeshBuilder.New()
Mesh_1 = smesh.Mesh(part, "Mesh_part")
BLSURF = Mesh_1.Triangle(algo=smeshBuilder.BLSURF)
BLSURF_Parameters_1 = BLSURF.Parameters()
Mesh_1 = smesh.Mesh(part, "Mesh_part")
BLSURF = Mesh_1.Triangle(algo=smeshBuilder.BLSURF)
BLSURF_Parameters_1 = BLSURF.Parameters()
@@
-86,4
+85,4
@@
if min_area > 1.5:
raise Exception("Wrong minimal area on box. Proximity has not worked.")
if salome.sg.hasDesktop():
raise Exception("Wrong minimal area on box. Proximity has not worked.")
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(
True
)
+ salome.sg.updateObjBrowser()
diff --git
a/tests/test_quadrangles_gradation.py
b/tests/test_quadrangles_gradation.py
index 2fd6f80b0c907a7f31e227bf2fe6789ef5f94426..bb8c9a2ac332bbd43533f8bf1f7097b624a14d1c 100644
(file)
--- a/
tests/test_quadrangles_gradation.py
+++ b/
tests/test_quadrangles_gradation.py
@@
-4,7
+4,7
@@
import salome
import GEOM
from salome.geom import geomBuilder
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
import math
import math
@@
-76,7
+76,7
@@
for i, face in enumerate(faces):
import SMESH
from salome.smesh import smeshBuilder
import SMESH
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
salome.myStudy
)
+smesh = smeshBuilder.New()
# Test gradation with quadrangles
Mesh_1 = smesh.Mesh(part, "Mesh")
# Test gradation with quadrangles
Mesh_1 = smesh.Mesh(part, "Mesh")
@@
-150,6
+150,6
@@
if abs(nb_faces_2-nb_faces_2_ref) > nb_faces_tolerance:
raise Exception("Number of faces of Mesh_2 incorrect")
if salome.sg.hasDesktop():
raise Exception("Number of faces of Mesh_2 incorrect")
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(
True
)
+ salome.sg.updateObjBrowser()
diff --git
a/tests/test_remove_tiny_edges.py
b/tests/test_remove_tiny_edges.py
index 1e863ee6e7c07d703ed8b563081d7dac529bcd3c..426e37ee240b5c8c8376ecdfbd706bfd026f1d08 100644
(file)
--- a/
tests/test_remove_tiny_edges.py
+++ b/
tests/test_remove_tiny_edges.py
@@
-4,7
+4,7
@@
import salome
import GEOM
from salome.geom import geomBuilder
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
import math
import math
@@
-64,7
+64,7
@@
for i, face in enumerate(faces):
import SMESH
from salome.smesh import smeshBuilder
import SMESH
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
salome.myStudy
)
+smesh = smeshBuilder.New()
Mesh = smesh.Mesh(part, "Mesh")
Mesh = smesh.Mesh(part, "Mesh")
@@
-107,4
+107,4
@@
if min_length<tiny_edge_length:
raise Exception("Small edge has not been removed")
if salome.sg.hasDesktop():
raise Exception("Small edge has not been removed")
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(
True
)
+ salome.sg.updateObjBrowser()
diff --git
a/tests/test_sphere.py
b/tests/test_sphere.py
index bea9381625675c00cc70b3c534a60c430d475a7c..5f622107283edaabfffa82a44c31e87b9403165e 100644
(file)
--- a/
tests/test_sphere.py
+++ b/
tests/test_sphere.py
@@
-4,7
+4,6
@@
import sys
import salome
salome.salome_init()
import salome
salome.salome_init()
-theStudy = salome.myStudy
###
### GEOM component
###
### GEOM component
@@
-12,10
+11,10
@@
theStudy = salome.myStudy
import GEOM
from salome.geom import geomBuilder
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
-geompy.init_geom(
theStudy
)
+geompy.init_geom()
sphere = geompy.MakeSphereR(10)
geompy.addToStudy( sphere, 'sphere' )
sphere = geompy.MakeSphereR(10)
geompy.addToStudy( sphere, 'sphere' )
@@
-26,7
+25,7
@@
geompy.addToStudy( sphere, 'sphere' )
import SMESH
from salome.smesh import smeshBuilder
import SMESH
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
salome.myStudy
)
+smesh = smeshBuilder.New()
Mesh_1 = smesh.Mesh(sphere)
Mesh_1 = smesh.Mesh(sphere)
@@
-50,4
+49,4
@@
if not ok:
raise Exception("Error when computing volume mesh")
if salome.sg.hasDesktop():
raise Exception("Error when computing volume mesh")
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(
True
)
+ salome.sg.updateObjBrowser()