mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-12 17:50:35 +05:00
Fix cmake compilation problem.
This commit is contained in:
parent
14b6ec1909
commit
a94dbd7745
@ -669,7 +669,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream,
|
|||||||
// Find the current Study and StudyBuilder
|
// Find the current Study and StudyBuilder
|
||||||
SALOMEDS::Study_var aStudy = theObject->GetStudy();
|
SALOMEDS::Study_var aStudy = theObject->GetStudy();
|
||||||
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
|
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
|
||||||
|
SALOMEDS::SObject_var aNewSO;
|
||||||
// Retrieve a TopoDS_Shape from byte stream
|
// Retrieve a TopoDS_Shape from byte stream
|
||||||
TopoDS_Shape aTopology;
|
TopoDS_Shape aTopology;
|
||||||
std::istringstream aStreamedBrep((char*) &theStream[0]);
|
std::istringstream aStreamedBrep((char*) &theStream[0]);
|
||||||
@ -677,11 +677,10 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream,
|
|||||||
try {
|
try {
|
||||||
BRepTools::Read(aTopology, aStreamedBrep, aBuilder);
|
BRepTools::Read(aTopology, aStreamedBrep, aBuilder);
|
||||||
} catch (Standard_Failure) {
|
} catch (Standard_Failure) {
|
||||||
return false;
|
return aNewSO._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
// SObject of the created shape is theObject or new Child of Component if theObject == geom component
|
// SObject of the created shape is theObject or new Child of Component if theObject == geom component
|
||||||
SALOMEDS::SObject_var aNewSO;
|
|
||||||
if (strcmp(theObject->GetFatherComponent()->GetID(),theObject->GetID()) == 0) {
|
if (strcmp(theObject->GetFatherComponent()->GetID(),theObject->GetID()) == 0) {
|
||||||
aNewSO = aStudyBuilder->NewObject(theObject);
|
aNewSO = aStudyBuilder->NewObject(theObject);
|
||||||
} else aNewSO = SALOMEDS::SObject::_duplicate(theObject);
|
} else aNewSO = SALOMEDS::SObject::_duplicate(theObject);
|
||||||
|
Loading…
Reference in New Issue
Block a user