projection on a TopoDS_Face

Hi I want to projet a point on a TopoDS_Face and strictly in this face.

I use this code :

TopoDS_Face face; // Obtain the bounds of the face BRepGProp_Face aBRepGProp_Face; aBRepGProp_Face.Load(face); aBRepGProp_Face.Bounds(U1,U2,V1,V2);

// project on the face GeomAPI_ProjectPointOnSurf aProjector; const Handle_Geom_Surface surfaceSBFC = BRep_Tool::Surface(face); aProjector.Init(aPnt,surfaceSBFC,U1,U2,V1,V2);

if (aProjector.IsDone() &&

aProjector.NbPoints()>0)

...

But How can I set a direction for the projection ? (if I want to have a none orthogonale projection )

xavier lhomme

S. Routelous's picture

> Hi I want to projet a point on a TopoDS_Face
> and strictly in this face.

You can create a line with your point and the direction and compute the intersection between this line and the face/surface.

Stephane