//-------------------------------------------------------------------------------------------------- public bool ScreenToPoint(Pln plane, int screenX, int screenY, out Pnt resultPnt) { try { double xv = 0, yv = 0, zv = 0; double vx = 0, vy = 0, vz = 0; V3dView.Convert(screenX, screenY, ref xv, ref yv, ref zv); V3dView.Proj(ref vx, ref vy, ref vz); gp_Lin line = new gp_Lin(new Pnt(xv, yv, zv), new Dir(vx, vy, vz)); IntAna_IntConicQuad intersection = new IntAna_IntConicQuad(line, plane, Precision.Angular(), 0, 0); if (intersection.IsDone() && !intersection.IsParallel() && intersection.NbPoints() > 0) { resultPnt = intersection.Point(1); return(true); } } catch (Exception) { Debug.Assert(false); } resultPnt = new Pnt(); return(false); }