3D Points From Mouse Click

Hi, Can anybody tell me how to get the X Y Z points(gp_Pnt) when i click some where on the screen. I understand we get only two values from the screen. can we identify the plane in which we are clicking. I see the code of taking xMin and yMin in the "OnLButtonDown" function. but i need the "Z" value also Thanks in advance, Saneesh

Peter Zbinden's picture

Hi Saneesh,

You can use the method V3d_View.Convert(...) with the mouse x and y as input parameter and x,y,z as return parameter.

Hope that helps.

Saneesh Kumar's picture

Thanks for the Help Peter let me work on that

DKGH's picture

Did it work?