string iorString = GetORB()->object_to_string( myNewMesh );
int newId = myStudyContext->findId( iorString );
myStudyContext->mapOldToNew( id, newId );
+
+ // try to read and set reference to shape
+ GEOM::GEOM_Object_var aShapeObject;
+ if ( aTopGroup->ExistInternalObject( "Ref on shape" ) ) {
+ // load mesh "Ref on shape" - it's an entry to SObject
+ aDataset = new HDFdataset( "Ref on shape", aTopGroup );
+ aDataset->OpenOnDisk();
+ size = aDataset->GetSize();
+ char* refFromFile = new char[ size ];
+ aDataset->ReadFromDisk( refFromFile );
+ aDataset->CloseOnDisk();
+ if ( strlen( refFromFile ) > 0 ) {
+ SALOMEDS::SObject_var shapeSO = myCurrentStudy->FindObjectID( refFromFile );
+
+ // Make sure GEOM data are loaded first
+ //loadGeomData( shapeSO->GetFatherComponent() );
+
+ CORBA::Object_var shapeObject = SObjectToObject( shapeSO );
+ if ( !CORBA::is_nil( shapeObject ) ) {
+ aShapeObject = GEOM::GEOM_Object::_narrow( shapeObject );
+ if ( !aShapeObject->_is_nil() )
+ myNewMeshImpl->SetShape( aShapeObject );
+ }
+ }
+ }
+
}
}
}
::SMESH_Mesh& myLocMesh = myNewMeshImpl->GetImpl();
SMESHDS_Mesh* mySMESHDSMesh = myLocMesh.GetMeshDS();
+ GEOM::GEOM_Object_var aShapeObject = myNewMeshImpl->GetShapeToMesh();
bool hasData = false;
// get mesh old id
}
}
- // try to read and set reference to shape
- GEOM::GEOM_Object_var aShapeObject;
- if ( aTopGroup->ExistInternalObject( "Ref on shape" ) ) {
- // load mesh "Ref on shape" - it's an entry to SObject
- aDataset = new HDFdataset( "Ref on shape", aTopGroup );
- aDataset->OpenOnDisk();
- size = aDataset->GetSize();
- char* refFromFile = new char[ size ];
- aDataset->ReadFromDisk( refFromFile );
- aDataset->CloseOnDisk();
- if ( strlen( refFromFile ) > 0 ) {
- SALOMEDS::SObject_var shapeSO = myCurrentStudy->FindObjectID( refFromFile );
-
- // Make sure GEOM data are loaded first
- //loadGeomData( shapeSO->GetFatherComponent() );
-
- CORBA::Object_var shapeObject = SObjectToObject( shapeSO );
- if ( !CORBA::is_nil( shapeObject ) ) {
- aShapeObject = GEOM::GEOM_Object::_narrow( shapeObject );
- if ( !aShapeObject->_is_nil() )
- myNewMeshImpl->SetShape( aShapeObject );
- }
- }
- }
-
// try to get applied algorithms
if ( aTopGroup->ExistInternalObject( "Applied Algorithms" ) ) {
aGroup = new HDFgroup( "Applied Algorithms", aTopGroup );