Intersect FACE with a hole and a EDGE

Hi,

I'm trying to cut a FACE, that has a hole, using a EDGE.
BRepAlgoAPI_Section returns me 2 EDGES. Then I add this 2 EDGES into BRepFeat_SplitShape.
But I had an Exception in the Build().

Could someone help me? Is there a special way to cut a Face with a hole?!

Regards,

Bearloga's picture

The cutting edge input for SplitShape should have pcurve on the cut face. To enable computing pcurves, use the method ComputePCurveOn1 when making section by BRepAlgoAPI_Section.

tmacedo29's picture

Hi Bearloga,

Thank You for your answer!

I think it's already being done on my code:

BRepAlgoAPI_Section cut (FaceWithHole, E ,Standard_False);
cut.Approximation(Standard_True);
cut.ComputePCurveOn1(Standard_True);
cut.Build();
if (cut.IsDone())
{
BRepFeat_SplitShape sp;
sp.Init( aFaceWithHole );

TopTools_ListIteratorOfListOfShape it (cut.SectionEdges());
while (it.More())
{
sp.Add(TopoDS::Edge(it.Value()), TopoDS::Face(aFaceWithHole));
it.Next();
}
sp.Build();
}

Could it be another problem?

Regards,

tmacedo29's picture

just another information

I got this message on my output window: erreur Spliter : pas de chainage du wire

Regards,

Bearloga's picture

I think you incorrectly use section algo. It can be used to find intersection between two surfaces only. An edge cannot be one of the shapes to intersect. So, the section algo gives empty result in your case.