SetErrorCode(KO);
if(theGroup.IsNull()) return;
- Handle(GEOM_Function) aFunction = theGroup->GetFunction(1);
+ Handle(GEOM_Function) aFunction = theGroup->GetLastFunction();
if(aFunction.IsNull()) return;
GEOM_ISubShape aSSI (aFunction);
}
}
aNewSeq->SetValue(aLength+1, theSubShapeID);
- aSSI.SetIndices(aNewSeq);
+ if ( aFunction->IsLastFuntion() ) {
+ aSSI.SetIndices(aNewSeq);
+ }
+ else {
+ aFunction = theGroup->AddFunction( GEOM_Object::GetSubShapeID(), 0, true );
+ GEOM_ISubShape aSSI2 (aFunction);
+ aSSI2.SetIndices(aNewSeq);
+ aSSI2.SetMainShape( aSSI.GetMainShape() );
+ }
}
// As we do not recompute here our group, lets mark it as Modified
SetErrorCode(KO);
if(theGroup.IsNull()) return;
- Handle(GEOM_Function) aFunction = theGroup->GetFunction(1);
+ Handle(GEOM_Function) aFunction = theGroup->GetLastFunction();
if(aFunction.IsNull()) return;
GEOM_ISubShape aSSI(aFunction);
}
}
- aSSI.SetIndices(aNewSeq);
+ if ( aFunction->IsLastFuntion() ) {
+ aSSI.SetIndices(aNewSeq);
+ }
+ else {
+ aFunction = theGroup->AddFunction( GEOM_Object::GetSubShapeID(), 0, true );
+ GEOM_ISubShape aSSI2 (aFunction);
+ aSSI2.SetIndices(aNewSeq);
+ aSSI2.SetMainShape( aSSI.GetMainShape() );
+ }
// As we do not recompute here our group, lets mark it as Modified
TDF_Label aLabel = aSSI.GetMainShape()->GetOwnerEntry();
return;
}
- Handle(GEOM_Function) aFunction = theGroup->GetFunction(1);
+ Handle(GEOM_Function) aFunction = theGroup->GetLastFunction();
if (aFunction.IsNull()) return;
GEOM_ISubShape aSSI (aFunction);
for (; aNewIDsIter.More(); aNewIDsIter.Next(), k++) {
aNewSeq->SetValue(k, aNewIDsIter.Value());
}
-
- aSSI.SetIndices(aNewSeq);
-
+ if ( aFunction->IsLastFuntion() ) {
+ aSSI.SetIndices(aNewSeq);
+ }
+ else {
+ aFunction = theGroup->AddFunction( GEOM_Object::GetSubShapeID(), 0, true );
+ GEOM_ISubShape aSSI2 (aFunction);
+ aSSI2.SetIndices(aNewSeq);
+ aSSI2.SetMainShape(aMainShapeFunc);
+ }
// As we do not recompute here our group, lets mark it as Modified
Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape
theGroup->SetTic(aTic - 1);
}
//Make a Python command
- Handle(GEOM_Object) aLatest = GEOM::GetCreatedLast(theSubShapes);
- aLatest = GEOM::GetCreatedLast(aLatest, theGroup);
- Handle(GEOM_Function) aLastFunc = aLatest->GetLastFunction();
-
- GEOM::TPythonDump pd (aLastFunc, /*append=*/true);
+ GEOM::TPythonDump pd (aFunction, /*append=*/true);
pd << "geompy.UnionList(" << theGroup << ", [";
for (i = 1; i <= aLen; i++) {
return;
}
- Handle(GEOM_Function) aFunction = theGroup->GetFunction(1);
+ Handle(GEOM_Function) aFunction = theGroup->GetLastFunction();
if (aFunction.IsNull()) return;
GEOM_ISubShape aSSI (aFunction);
aNewSeq->SetValue(1, -1);
}
- aSSI.SetIndices(aNewSeq);
-
+ if ( aFunction->IsLastFuntion() ) {
+ aSSI.SetIndices(aNewSeq);
+ }
+ else {
+ aFunction = theGroup->AddFunction( GEOM_Object::GetSubShapeID(), 0, true );
+ GEOM_ISubShape aSSI2 (aFunction);
+ aSSI2.SetIndices(aNewSeq);
+ aSSI2.SetMainShape(aMainShapeFunc);
+ }
// As we do not recompute here our group, lets mark it as Modified
Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape
theGroup->SetTic(aTic - 1);
}
//Make a Python command
- Handle(GEOM_Object) aLatest = GEOM::GetCreatedLast(theSubShapes);
- aLatest = GEOM::GetCreatedLast(aLatest, theGroup);
- Handle(GEOM_Function) aLastFunc = aLatest->GetLastFunction();
-
- GEOM::TPythonDump pd (aLastFunc, /*append=*/true);
+ GEOM::TPythonDump pd (aFunction, /*append=*/true);
pd << "geompy.DifferenceList(" << theGroup << ", [";
for (i = 1; i <= aLen; i++) {
return;
}
- Handle(GEOM_Function) aFunction = theGroup->GetFunction(1);
+ Handle(GEOM_Function) aFunction = theGroup->GetLastFunction();
if (aFunction.IsNull()) return;
GEOM_ISubShape aSSI (aFunction);
for (; aNewIDsIter.More(); aNewIDsIter.Next(), k++) {
aNewSeq->SetValue(k, aNewIDsIter.Value());
}
-
- aSSI.SetIndices(aNewSeq);
-
+ if ( aFunction->IsLastFuntion() ) {
+ aSSI.SetIndices(aNewSeq);
+ }
+ else {
+ aFunction = theGroup->AddFunction( GEOM_Object::GetSubShapeID(), 0, true );
+ GEOM_ISubShape aSSI2 (aFunction);
+ aSSI2.SetIndices(aNewSeq);
+ aSSI2.SetMainShape(aMainShapeFunc);
+ }
// As we do not recompute here our group, lets mark it as Modified
Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape
theGroup->SetTic(aTic - 1);
return;
}
- Handle(GEOM_Function) aFunction = theGroup->GetFunction(1);
+ Handle(GEOM_Function) aFunction = theGroup->GetLastFunction();
if (aFunction.IsNull()) return;
GEOM_ISubShape aSSI (aFunction);
aNewSeq = new TColStd_HArray1OfInteger(1,1);
aNewSeq->SetValue(1, -1);
}
-
- aSSI.SetIndices(aNewSeq);
-
+ if ( aFunction->IsLastFuntion() ) {
+ aSSI.SetIndices(aNewSeq);
+ }
+ else {
+ aFunction = theGroup->AddFunction( GEOM_Object::GetSubShapeID(), 0, true );
+ GEOM_ISubShape aSSI2 (aFunction);
+ aSSI2.SetIndices(aNewSeq);
+ aSSI2.SetMainShape(aMainShapeFunc);
+ }
// As we do not recompute here our group, lets mark it as Modified
Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape
theGroup->SetTic(aTic - 1);
if(theGroup.IsNull()) return NULL;
- Handle(GEOM_Function) aFunction = theGroup->GetFunction(1);
+ Handle(GEOM_Function) aFunction = theGroup->GetLastFunction();
if(aFunction.IsNull()) return NULL;
GEOM_ISubShape aSSI(aFunction);