mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 17:30:35 +05:00
PAL13473 (Build repetitive mesh):
Set shape to all meshes before hypo assignation
This commit is contained in:
parent
b25e607851
commit
48578200ac
@ -2389,6 +2389,32 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
|
||||
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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2414,6 +2440,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
|
||||
::SMESH_Mesh& myLocMesh = myNewMeshImpl->GetImpl();
|
||||
SMESHDS_Mesh* mySMESHDSMesh = myLocMesh.GetMeshDS();
|
||||
|
||||
GEOM::GEOM_Object_var aShapeObject = myNewMeshImpl->GetShapeToMesh();
|
||||
bool hasData = false;
|
||||
|
||||
// get mesh old id
|
||||
@ -2439,31 +2466,6 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
|
||||
}
|
||||
}
|
||||
|
||||
// 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 );
|
||||
|
Loading…
Reference in New Issue
Block a user