retrieve coordonates on a surface

I'd like to retreive the coordonates on a surface : for each given x and y I would like to know the value of z...

Simple, but how to do ?

Thanks for your help,


Sergey KHROMOV's picture

Hello, Norbert!

You shoud create a point:

gp_Pnt P(x, y, 0.);

and a direction:

gp_Dir D(0., 0., 1.);

Then create a line which is passed through this point and has given direction:

Handle (Geom_Line) l = new Geom_Line(P, D);

And then you should intersect this line with your surface using :

GeomAPI_IntCS Inters(l,S);

Best regards, Sergey.

n-asselin's picture

Thank you very much, I'll try to do this this evenening,

best rgs,