GetSubShapeIndices() from the last function
GEOM::ListOfLong_var anIndices = new GEOM::ListOfLong;
if(!_impl->IsMainShape()) {
- Handle(GEOM_Function) aFunction = _impl->GetFunction(1); //Get Sub-shape function (always the first (and last) one)
+ Handle(GEOM_Function) aFunction = _impl->GetLastFunction(); //Get Sub-shape function (always the first (and last) one)
if(aFunction.IsNull()) return anIndices._retn();
GEOM_ISubShape ISS(aFunction);
Handle(TColStd_HArray1OfInteger) anArray = ISS.GetIndices();