mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 10:08:35 +05:00
Changes for bug 0020019 from Mantis.
This commit is contained in:
parent
c2c6485e21
commit
7a2e53f1b9
@ -362,27 +362,30 @@ void GEOM_Gen_i::CreateAndPublishGroup(SALOMEDS::Study_ptr theStudy,
|
|||||||
GEOM::GEOM_Object_ptr GrObj =
|
GEOM::GEOM_Object_ptr GrObj =
|
||||||
GOp->CreateGroup( theMainShape, SeqS.Value(1).ShapeType() );
|
GOp->CreateGroup( theMainShape, SeqS.Value(1).ShapeType() );
|
||||||
AddInStudy(theStudy, GrObj, GrName, theMainShape._retn());
|
AddInStudy(theStudy, GrObj, GrName, theMainShape._retn());
|
||||||
|
CORBA::String_var GrEntry = GrObj->GetEntry();
|
||||||
|
Handle(GEOM_Object) HGrObj = _impl->GetObject(GrObj->GetStudyID(), GrEntry);
|
||||||
// add named objects
|
// add named objects
|
||||||
Handle(GEOM_Object) anObj;
|
//Handle(GEOM_Object) anObj;
|
||||||
for(int i=1; i<=SeqS.Length(); i++) {
|
for(int i=1; i<=SeqS.Length(); i++) {
|
||||||
TopoDS_Shape aValue = SeqS.Value(i);
|
TopoDS_Shape aValue = SeqS.Value(i);
|
||||||
anArray = new TColStd_HArray1OfInteger(1,1);
|
//anArray = new TColStd_HArray1OfInteger(1,1);
|
||||||
Standard_Integer anIndex = anIndices.FindIndex(aValue);
|
Standard_Integer anIndex = anIndices.FindIndex(aValue);
|
||||||
anArray->SetValue(1, anIndex);
|
//anArray->SetValue(1, anIndex);
|
||||||
anObj = GEOM_Engine::GetEngine()->AddObject(aMainShape->GetDocID(), GEOM_SUBSHAPE);
|
GOp->AddObject(GrObj,anIndex);
|
||||||
if (anObj.IsNull()) continue;
|
//anObj = GEOM_Engine::GetEngine()->AddObject(aMainShape->GetDocID(), GEOM_SUBSHAPE);
|
||||||
Handle(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
|
//if (anObj.IsNull()) continue;
|
||||||
if (aFunction.IsNull()) continue;
|
//Handle(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
|
||||||
GEOM_ISubShape aSSI(aFunction);
|
//if (aFunction.IsNull()) continue;
|
||||||
aSSI.SetMainShape(aMainShape->GetLastFunction());
|
//GEOM_ISubShape aSSI(aFunction);
|
||||||
aSSI.SetIndices(anArray);
|
//aSSI.SetMainShape(aMainShape->GetLastFunction());
|
||||||
aFunction->SetValue(aValue);
|
//aSSI.SetIndices(anArray);
|
||||||
GOp->UnionIDs(GrObj, anIndex);
|
//aFunction->SetValue(aValue);
|
||||||
SALOMEDS::SObject_var aResultSO;
|
//GOp->UnionIDs(GrObj, anIndex);
|
||||||
TCollection_AsciiString anEntry;
|
//SALOMEDS::SObject_var aResultSO;
|
||||||
TDF_Tool::Entry(anObj->GetEntry(),anEntry);
|
//TCollection_AsciiString anEntry;
|
||||||
GEOM::GEOM_Object_var aGObj = GetObject(anObj->GetDocID(), anEntry.ToCString());
|
//TDF_Tool::Entry(anObj->GetEntry(),anEntry);
|
||||||
AddInStudy(theStudy, aGObj._retn(), SeqN.Value(i).ToCString(), GrObj);
|
//GEOM::GEOM_Object_var aGObj = GetObject(anObj->GetDocID(), anEntry.ToCString());
|
||||||
|
//AddInStudy(theStudy, aGObj._retn(), SeqN.Value(i).ToCString(), GrObj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user