Creating a TopoDS_Face from non-planar wires or edges


I am currently trying to make a TopoDS_Face from edges. I have a TopoDS_Shape and extract a layer or slice to form a new TopoDS_Shape. From there I need to convert it to a TopoDS_Face. I have tried extracting the edges via TopExp_Explorer, making the edges into wires via BRepBuilderAPI_MakeWire, and then making the wires into a face via BRepBuilderAPI_MakeFace. This never turned out correctly. I know the edges are all there because I have displayed them and the slice and they match. I believe it has something to do with the construction of the wires. When I go to display the wires, it only displays a part of the layer, such as a hole. I think it has something to do with the construction of wires that are not connected, but I do not know how to go about testing for this.

I have also heard about using BRepFill_Filling for non-planar wires, but I have not been able to get that to work.

Any help on creating the face or testing to see if two wires are connected would be greatly appreciated. If you need any more information just let me know.

Thank you in advance,

jelle's picture

a screencap would be insightful

dustinspecker's picture

I have attached an image. I hope it's detailed enough to help explain the situation. The white is the slices being made and displayed. I need to convert each slice into a face.

Thank you.