For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

3D Points From Mouse Click

Saneesh Kumar's picture

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,

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

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.