Shape split Fail

i need to perform a face splitting.
So i have a TopoDS_Face, a wire (built by projection on the face).
TopoDS_Shape prism = BRepPrimAPI_MakePrism(wire,faceDir,bInfinite,bCopy,bCanonize);

i try to create an infinite prism.
I use the prism with BRepAlgoAPI_Section to find the intersection between the 2 shapes and perform the splitting using BRepFeat_SplitShape

Here is a bit of code:

gp_dir faceDir=(... normal of the face i need to split);

//wire is a TopoDS_Wire created by curve projection on the surface of face

TopoDS_Shape prism = BRepPrimAPI_MakePrism(wire,faceDir,bInfinite,bCopy,bCanonize);

BRepAlgoAPI_Section aSecAlgo (face, prism);
BRepFeat_SplitShape aSplitter(face);

// add splitting edges
//TopoDS_Iterator its(aSecAlgo);
TopoDS_Iterator its(wire);
int iEdge=0;
for (; its.More(); its.Next())
const TopoDS_Edge& aEdge = TopoDS::Edge(its.Value());

// determine an ancestor face of this edge
TopoDS_Face aFace;
if (aSecAlgo.HasAncestorFaceOn2(aEdge, aFace))
aSplitter.Add (aEdge, aFace);


if iEdge is >0 I retrieve the left faces and so on.

But (here ise the problem) I have iEdge=0!

Any hint?

alexandre's picture

have you found a solution to your problem?
if so, I'm interested as well

Davide Canalia's picture

I had to use a semiinfinite prism.
Cause i was not able to have it working with infinite prism.
I'm still working on it. ASAP i'll post a solution