Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Préparation pour le cas simple précision
[modules/smesh.git]
/
src
/
SMESH_I
/
SMESH_Filter_i.cxx
diff --git
a/src/SMESH_I/SMESH_Filter_i.cxx
b/src/SMESH_I/SMESH_Filter_i.cxx
index de808d62ea042f913ee90fc709e7009f4fb4e402..e284279951a1c538bbd269bf9dbc169b89883c16 100644
(file)
--- a/
src/SMESH_I/SMESH_Filter_i.cxx
+++ b/
src/SMESH_I/SMESH_Filter_i.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
19
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
20
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-136,7
+136,9
@@
static TopoDS_Shape getShapeByName( const char* theName )
if ( theName != 0 )
{
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
if ( theName != 0 )
{
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::Study::ListOfSObject_var aList = SMESH_Gen_i::getStudyServant()->FindObjectByName( theName, "GEOM" );
+ SALOMEDS::Study::ListOfSObject_var aList = SMESH_Gen_i::GetSMESHGen()->getStudyServant()->FindObjectByName( theName, "GEOM" );
+ if ( aList->length() == 0 )
+ aList = SMESH_Gen_i::GetSMESHGen()->getStudyServant()->FindObjectByName( theName, "SHAPERSTUDY" );
if ( aList->length() > 0 )
{
CORBA::Object_var anObj = aList[ 0 ]->GetObject();
if ( aList->length() > 0 )
{
CORBA::Object_var anObj = aList[ 0 ]->GetObject();
@@
-153,7
+155,7
@@
static TopoDS_Shape getShapeByID (const char* theID)
{
if ( theID && strlen( theID ) > 0 ) {
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
{
if ( theID && strlen( theID ) > 0 ) {
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::SObject_wrap aSObj = SMESH_Gen_i::getStudyServant()->FindObjectID(theID);
+ SALOMEDS::SObject_wrap aSObj = SMESH_Gen_i::
GetSMESHGen()->
getStudyServant()->FindObjectID(theID);
if ( !aSObj->_is_nil() ) {
CORBA::Object_var obj = aSObj->GetObject();
GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(obj);
if ( !aSObj->_is_nil() ) {
CORBA::Object_var obj = aSObj->GetObject();
GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(obj);
@@
-716,7
+718,7
@@
BadOrientedVolume_i::BadOrientedVolume_i()
{
Controls::PredicatePtr control( new Controls::BadOrientedVolume() );
myFunctorPtr = myPredicatePtr = control;
{
Controls::PredicatePtr control( new Controls::BadOrientedVolume() );
myFunctorPtr = myPredicatePtr = control;
-}
;
+}
FunctorType BadOrientedVolume_i::GetFunctorType()
{
FunctorType BadOrientedVolume_i::GetFunctorType()
{
@@
-731,7
+733,7
@@
BareBorderVolume_i::BareBorderVolume_i()
{
Controls::PredicatePtr control( new Controls::BareBorderVolume() );
myFunctorPtr = myPredicatePtr = control;
{
Controls::PredicatePtr control( new Controls::BareBorderVolume() );
myFunctorPtr = myPredicatePtr = control;
-}
;
+}
FunctorType BareBorderVolume_i::GetFunctorType()
{
FunctorType BareBorderVolume_i::GetFunctorType()
{
@@
-746,7
+748,7
@@
BareBorderFace_i::BareBorderFace_i()
{
Controls::PredicatePtr control( new Controls::BareBorderFace() );
myFunctorPtr = myPredicatePtr = control;
{
Controls::PredicatePtr control( new Controls::BareBorderFace() );
myFunctorPtr = myPredicatePtr = control;
-}
;
+}
FunctorType BareBorderFace_i::GetFunctorType()
{
FunctorType BareBorderFace_i::GetFunctorType()
{
@@
-761,7
+763,7
@@
OverConstrainedVolume_i::OverConstrainedVolume_i()
{
Controls::PredicatePtr control( new Controls::OverConstrainedVolume() );
myFunctorPtr = myPredicatePtr = control;
{
Controls::PredicatePtr control( new Controls::OverConstrainedVolume() );
myFunctorPtr = myPredicatePtr = control;
-}
;
+}
FunctorType OverConstrainedVolume_i::GetFunctorType()
{
FunctorType OverConstrainedVolume_i::GetFunctorType()
{
@@
-776,7
+778,7
@@
OverConstrainedFace_i::OverConstrainedFace_i()
{
Controls::PredicatePtr control( new Controls::OverConstrainedFace() );
myFunctorPtr = myPredicatePtr = control;
{
Controls::PredicatePtr control( new Controls::OverConstrainedFace() );
myFunctorPtr = myPredicatePtr = control;
-}
;
+}
FunctorType OverConstrainedFace_i::GetFunctorType()
{
FunctorType OverConstrainedFace_i::GetFunctorType()
{
@@
-826,7
+828,7
@@
void BelongToMeshGroup_i::SetGroupID( const char* theID ) // IOR or StoreName
}
else if ( strncmp( "0:", myID.c_str(), 2 ) == 0 ) // transient mode + GUI
{
}
else if ( strncmp( "0:", myID.c_str(), 2 ) == 0 ) // transient mode + GUI
{
- SALOMEDS::SObject_wrap aSObj = SMESH_Gen_i::getStudyServant()->FindObjectID( myID.c_str() );
+ SALOMEDS::SObject_wrap aSObj = SMESH_Gen_i::
GetSMESHGen()->
getStudyServant()->FindObjectID( myID.c_str() );
if ( !aSObj->_is_nil() ) {
CORBA::Object_var obj = aSObj->GetObject();
SetGroup( SMESH::SMESH_GroupBase::_narrow( obj ));
if ( !aSObj->_is_nil() ) {
CORBA::Object_var obj = aSObj->GetObject();
SetGroup( SMESH::SMESH_GroupBase::_narrow( obj ));
@@
-841,7
+843,7
@@
void BelongToMeshGroup_i::SetGroupID( const char* theID ) // IOR or StoreName
std::string BelongToMeshGroup_i::GetGroupID()
{
if ( myGroup->_is_nil() )
std::string BelongToMeshGroup_i::GetGroupID()
{
if ( myGroup->_is_nil() )
- SMESH::SMESH_GroupBase_var( GetGroup() );
+ SMESH::SMESH_GroupBase_var( GetGroup() );
// decref the returned pointer
if ( !myGroup->_is_nil() )
myID = SMESH_Gen_i::GetORB()->object_to_string( myGroup );
if ( !myGroup->_is_nil() )
myID = SMESH_Gen_i::GetORB()->object_to_string( myGroup );
@@
-903,9
+905,7
@@
void BelongToGeom_i::SetGeom( GEOM::GEOM_Object_ptr theGeom )
{
if ( theGeom->_is_nil() )
return;
{
if ( theGeom->_is_nil() )
return;
- SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- GEOM::GEOM_Gen_ptr aGEOMGen = SMESH_Gen_i::GetGeomEngine();
- TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, theGeom );
+ TopoDS_Shape aLocShape = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( theGeom );
myBelongToGeomPtr->SetGeom( aLocShape );
TPythonDump()<<this<<".SetGeom("<<theGeom<<")";
}
myBelongToGeomPtr->SetGeom( aLocShape );
TPythonDump()<<this<<".SetGeom("<<theGeom<<")";
}
@@
-1001,9
+1001,7
@@
void BelongToSurface_i::SetSurface( GEOM::GEOM_Object_ptr theGeom, ElementType t
{
if ( theGeom->_is_nil() )
return;
{
if ( theGeom->_is_nil() )
return;
- SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- GEOM::GEOM_Gen_ptr aGEOMGen = SMESH_Gen_i::GetGeomEngine();
- TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, theGeom );
+ TopoDS_Shape aLocShape = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( theGeom );
if ( aLocShape.ShapeType() == TopAbs_FACE )
{
if ( aLocShape.ShapeType() == TopAbs_FACE )
{
@@
-1173,9
+1171,7
@@
void LyingOnGeom_i::SetGeom( GEOM::GEOM_Object_ptr theGeom )
{
if ( theGeom->_is_nil() )
return;
{
if ( theGeom->_is_nil() )
return;
- SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- GEOM::GEOM_Gen_ptr aGEOMGen = SMESH_Gen_i::GetGeomEngine();
- TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, theGeom );
+ TopoDS_Shape aLocShape = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( theGeom );
myLyingOnGeomPtr->SetGeom( aLocShape );
TPythonDump()<<this<<".SetGeom("<<theGeom<<")";
}
myLyingOnGeomPtr->SetGeom( aLocShape );
TPythonDump()<<this<<".SetGeom("<<theGeom<<")";
}
@@
-1641,7
+1637,6
@@
void ConnectedElements_i::SetPoint( CORBA::Double x, CORBA::Double y, CORBA::Dou
}
void ConnectedElements_i::SetVertex( GEOM::GEOM_Object_ptr vertex )
}
void ConnectedElements_i::SetVertex( GEOM::GEOM_Object_ptr vertex )
- throw (SALOME::SALOME_Exception)
{
TopoDS_Shape shape = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( vertex );
if ( shape.IsNull() )
{
TopoDS_Shape shape = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( vertex );
if ( shape.IsNull() )
@@
-1663,7
+1658,6
@@
void ConnectedElements_i::SetVertex( GEOM::GEOM_Object_ptr vertex )
}
void ConnectedElements_i::SetNode ( CORBA::Long nodeID )
}
void ConnectedElements_i::SetNode ( CORBA::Long nodeID )
- throw (SALOME::SALOME_Exception)
{
if ( nodeID < 1 )
THROW_SALOME_CORBA_EXCEPTION( "ConnectedElements_i::SetNode(): nodeID must be > 0",
{
if ( nodeID < 1 )
THROW_SALOME_CORBA_EXCEPTION( "ConnectedElements_i::SetNode(): nodeID must be > 0",
@@
-1679,7
+1673,6
@@
void ConnectedElements_i::SetNode ( CORBA::Long nodeID )
*/
void ConnectedElements_i::SetThreshold ( const char* threshold,
SMESH::ConnectedElements::ThresholdType type )
*/
void ConnectedElements_i::SetThreshold ( const char* threshold,
SMESH::ConnectedElements::ThresholdType type )
- throw (SALOME::SALOME_Exception)
{
if ( !threshold )
THROW_SALOME_CORBA_EXCEPTION( "ConnectedElements_i::SetThreshold(): NULL threshold",
{
if ( !threshold )
THROW_SALOME_CORBA_EXCEPTION( "ConnectedElements_i::SetThreshold(): NULL threshold",
@@
-1720,7
+1713,7
@@
void ConnectedElements_i::SetThreshold ( const char*
}
case SMESH::ConnectedElements::VERTEX: // get a VERTEX by its entry /////////////////
{
}
case SMESH::ConnectedElements::VERTEX: // get a VERTEX by its entry /////////////////
{
- SALOMEDS::SObject_wrap sobj = SMESH_Gen_i::getStudyServant()->FindObjectID( threshold );
+ SALOMEDS::SObject_wrap sobj = SMESH_Gen_i::
GetSMESHGen()->
getStudyServant()->FindObjectID( threshold );
if ( sobj->_is_nil() )
THROW_SALOME_CORBA_EXCEPTION
( "ConnectedElements_i::SetThreshold(): invalid vertex study entry", SALOME::BAD_PARAM );
if ( sobj->_is_nil() )
THROW_SALOME_CORBA_EXCEPTION
( "ConnectedElements_i::SetThreshold(): invalid vertex study entry", SALOME::BAD_PARAM );