Get Adaptor3d_HCurveOnSurface from edge.

I want to create Plate surface from the edges. And I found GeomPlate_BuildPlateSurface class where I need array of Adaptor3d_HCurveOnSurface curves. But I can't find any good sample how simply convert Geom_Curve to the Adaptor3d_HCurveOnSurface.
I just can get Geom_Curve :
 Standard_Real f, l;     
 Handle(Geom_Curve) curve = BRep_Tool::Curve(edge,f,l);
I know about some adapter, but I can't find how to resolve my issue  in documentation.

Volodymyr vvv's picture

Actually I tried this way:
Handle(GeomPlate_CurveConstraint) convertCurve (Handle(Geom_Curve) curve)
Standard_Integer n_points = 30;
Standard_Real tol_3d = 1e-4;

GeomAdaptor_HCurve hcurveadapt (curve);
const Handle(GeomAdaptor_HCurve)& aHC = new GeomAdaptor_HCurve(hcurveadapt);
Handle (GeomPlate_CurveConstraint) aConst = new GeomPlate_CurveConstraint (aHC, 0, n_points, tol_3d);

return aConst;

But I don't now is n_points value is correct.
And also I'm interesting is it enough two GeomPlate_CurveConstraint to create Plate surface?

Volodymyr vvv's picture

And I want ask is I create surface in right way.

so at first a create GeomPlate_BuildPlateSurface object:
const Standard_Integer Degree = 3;
const Standard_Integer NbPtsOnCur = 10;
const Standard_Integer NbIter = 3;
const Standard_Real Confusion = 1.e-7;

GeomPlate_BuildPlateSurface plateSurf (Degree,NbPtsOnCur,NbIter);

then I add to the builder created constraint curves: plateSurf.Add(convertCurve(curve));
(convertCurve method from my previous comment)

and then I try get Geom_Surface from the builder:
Handle(Geom_Surface) surf = plateSurf.SurfInit();

And I have an error when I try get face from that surface:
TopoDS_Face face = BRepBuilderAPI_MakeFace(surf,Confusion);