My goal seems to be easy to develop, but I cannot get it. Also, my doubts do not help me.
Ok, I have got two planar faces (wall and roof, again). User can pick point over the faces defining a wire and maybe there are transitions along the faces. To calculate the point on the edge that join the wall and the roof is easy when the wire goes from one to another plane. But sometimes that join is not an edge but a circular plane (fillet).
This is when I have to project an edge (one point from one face and the other point from the other face) to that plane, and this is what I want to achieve.
For doing so, I am trying with this code, unsuccesfully.
Standard_Real first_p, last_p;
first_p = last_p = 0;
Handle(Geom_Curve) aCurve = GC_MakeSegment(prevVertex->GetPoint(), vertex->GetPoint());
Handle(Geom_Surface) aSurface = BRep_Tool::Surface(profile->GetFace(plane));
Handle(Geom_Curve) projection = GeomProjLib::Project(aCurve, aSurface);
mkWire.Add(BRepBuilderAPI_MakeEdge(projection, projection->FirstParameter(), projection->LastParameter()));
result = (mkWire.IsDone() == Standard_True);
if (result) joinWired = mkWire.Wire();
-How can I select projection direction? That data is not provided and I think a gp_Dir is neccesary. My results are too strange.
-How can I restrict the result to the original face? I think the key are the first and last parameters, but my results are going over my face limits (over the whole surface)
if doubt is not very clear, please tell me and I will provide some screenshots.