I am trying to build a surface form the points of a mesh. This works very well except for some special mehes. Sometimes I get a result like the on in the image attached. This problem occurs if the mesh represents a surface that is "curved". In the image the blue surface. What can I do to avoid this problem? It seems, that the algorithm tries to build a surface between the points on the opposite side of the mesh.
Here is the code i use:
Handle(GeomPlate_PointConstraint) PCont = new GeomPlate_PointConstraint(point,0);
Standard_Real dmax, Tol;
dmax = Max(0.0001,10*bpsurf.G0Error());
Handle(Geom_Surface) surf = mapp.Surface();