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
#17336 [CEA 17333] Mesh offset generates a segmentation violation
[modules/smesh.git]
/
src
/
StdMeshers_I
/
StdMeshers_ImportSource2D_i.cxx
diff --git
a/src/StdMeshers_I/StdMeshers_ImportSource2D_i.cxx
b/src/StdMeshers_I/StdMeshers_ImportSource2D_i.cxx
index dc61b9cdd9ea22b3bd8e94e3abc2e418ef1d6665..c42c50f1666afeed57c9b09fc5154193d284c1f4 100644
(file)
--- a/
src/StdMeshers_I/StdMeshers_ImportSource2D_i.cxx
+++ b/
src/StdMeshers_I/StdMeshers_ImportSource2D_i.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
6
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
9
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
@@
-20,7
+20,7
@@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// SMESH SMESH_I : idl implementation based on 'SMESH' unit's c
al
sses
+// SMESH SMESH_I : idl implementation based on 'SMESH' unit's c
la
sses
// File : StdMeshers_ImportSource2D_i.cxx
// Module : SMESH
//
// File : StdMeshers_ImportSource2D_i.cxx
// Module : SMESH
//
@@
-50,13
+50,11
@@
using namespace std;
//=============================================================================
StdMeshers_ImportSource2D_i::StdMeshers_ImportSource2D_i( PortableServer::POA_ptr thePOA,
//=============================================================================
StdMeshers_ImportSource2D_i::StdMeshers_ImportSource2D_i( PortableServer::POA_ptr thePOA,
- int theStudyId,
::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA )
{
myBaseImpl = new ::StdMeshers_ImportSource2D( theGenImpl->GetANewId(),
::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA )
{
myBaseImpl = new ::StdMeshers_ImportSource2D( theGenImpl->GetANewId(),
- theStudyId,
theGenImpl );
_groupEntries = new SMESH::string_array();
}
theGenImpl );
_groupEntries = new SMESH::string_array();
}
@@
-86,7
+84,6
@@
void StdMeshers_ImportSource2D_i::SetSourceFaces(const SMESH::ListOfGroups& grou
{
std::vector<SMESH_Group*> smesh_groups;
std::vector<string> entries;
{
std::vector<SMESH_Group*> smesh_groups;
std::vector<string> entries;
- SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy();
for ( CORBA::ULong i = 0; i < groups.length(); ++i )
if ( SMESH_GroupBase_i* gp_i = SMESH::DownCast<SMESH_GroupBase_i*>( groups[i] ))
{
for ( CORBA::ULong i = 0; i < groups.length(); ++i )
if ( SMESH_GroupBase_i* gp_i = SMESH::DownCast<SMESH_GroupBase_i*>( groups[i] ))
{
@@
-94,7
+91,7
@@
void StdMeshers_ImportSource2D_i::SetSourceFaces(const SMESH::ListOfGroups& grou
THROW_SALOME_CORBA_EXCEPTION("Wrong group type", SALOME::BAD_PARAM);
smesh_groups.push_back( gp_i->GetSmeshGroup() );
THROW_SALOME_CORBA_EXCEPTION("Wrong group type", SALOME::BAD_PARAM);
smesh_groups.push_back( gp_i->GetSmeshGroup() );
- SALOMEDS::SObject_var so = SMESH_Gen_i::ObjectToSObject(
study,
groups[i]);
+ SALOMEDS::SObject_var so = SMESH_Gen_i::ObjectToSObject(groups[i]);
if ( !so->_is_nil())
{
CORBA::String_var entry = so->GetID();
if ( !so->_is_nil())
{
CORBA::String_var entry = so->GetID();
@@
-168,14
+165,13
@@
char* StdMeshers_ImportSource2D_i::SaveTo()
std::ostringstream os;
os << " " << _groupEntries->length();
std::ostringstream os;
os << " " << _groupEntries->length();
- SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy();
for ( CORBA::ULong i = 0; i < _groupEntries->length(); ++i )
{
// entry
os << " " << _groupEntries[i];
// id
for ( CORBA::ULong i = 0; i < _groupEntries->length(); ++i )
{
// entry
os << " " << _groupEntries[i];
// id
- SALOMEDS::SObject_var groupSO =
study
->FindObjectID( _groupEntries[i] );
+ SALOMEDS::SObject_var groupSO =
SMESH_Gen_i::getStudyServant()
->FindObjectID( _groupEntries[i] );
CORBA::Object_var groupObj;
if ( !groupSO->_is_nil() ) {
groupObj = groupSO->GetObject();
CORBA::Object_var groupObj;
if ( !groupSO->_is_nil() ) {
groupObj = groupSO->GetObject();