out parameter (Handle) problem

Hello,

I have a little problem with an out parameter of my function:

HRESULT intersect(const TopoDS_Shell& masterShell,const TopoDS_Shell& childShell, Handle (TopTools_)&);

The two shells are input parameters and I put the result of the intersection of them in the "wireSeq" parameter. Inside the function is valid with all the wires of the intersection. But if I want to use the wires outside the function, the wireSeq is empty???

Here's how I use the function:

Handle (TopTools_HSequenceOfShape) wireSequence;
wireSequence = new TopTools_HSequenceOfShape;

Intersector intersector;
intersector.intersect(shell1,shell2,wireSequence);
// inside wireSequence->Length e.g. 2

const int length = wireSequence->Length(); // it's 0

Thanks
Simon

samscore's picture

Sorry, the function is this (cut instead of copy - please, opencascade team make posts editable :-)

HRESULT intersect(const TopoDS_Shell& masterShell,const TopoDS_Shell& childShell, Handle (TopTools_HSequenceOfShape)& wireSeq);

Inside the function "wireSeq" is valid with all the wires of the intersection. ?

samscore's picture

I had simply another HSequenceOfShape in which I saved my results. with the input parameter as HSequenceOfShape everything works :-)