Building face from wire infinite loop

I am trying to build a face from the attached wire but BRepBuilderAPI_MakeFace seems to be stuck in an infinite loop. What can be the problem?.

Dominik Schopper's picture

The problem may be that your wire is not plane (I think this is mandatory for using BRepBuilderAPI_MakeFace).

Check out this or if your wire is supposed to be plane try using this constructor

BRepBuilderAPI_MakeFace::BRepBuilderAPI_MakeFace(const gp_Pln &P, const TopoDS_Wire &W, const Standard_Boolean Inside = Standard_True) 	

that takes a plane as an argument. This should be the plane your wire should lie in.

sero.mirzakhanyan_146681's picture

I don't think BRepBuilderAPI_MakeFace is only for planar faces, from documentation .

Find a surface from the wire and make a face. if <OnlyPlane> is true, the computed surface will be a plane. If it is not possible to find a plane, the flag NotDone will be set.      

And attached you can see a face I got from using the class.