Re: Highliting problem (is a ComputeDepth probrem?)

I think it's a problem in Select3D_Projector.

Select3D_SensitiveTriangulation::ComputeDepth require a EyeLine in global coordinate, but Select3D_Projector::Shoot return not like that in my test.

I think this problem is Select3D_Projector::Proj use myView, but Select3D_Projector::Shoot use myInvTrasf.

I try to write a patch of this problem. Please tell me is my understanding is OK or Not?

gp_Lin Select3D_Projector::Shoot
(const Standard_Real X,
const Standard_Real Y) const
gp_Lin L;

#ifdef MY_OCC1576
Standard_Real Xout,Yout, Zout, px,py,pz;
Standard_Integer XPix, YPix;
// projection plane Xv,Yv into the pixel point Xp,Yp
myView->Convert( X,Y, XPix,YPix);
// projected point Xp,Yp into a point of the reference frame of the view defined by X,Y,Z.
myView->Convert( XPix,YPix, Xout,Yout,Zout );
// Proj is negative?
myView->Proj( px, py, pz );
L = gp_Lin(gp_Pnt(Xout,Yout,Zout),
if (myPersp) {
L = gp_Lin(gp_Pnt(0,0, myFocus),
else {
L = gp_Lin(gp_Pnt(X,Y,0),
#ifdef MY_OCC1576
return L;

Francois Lauzon's picture

it seems to be working, I try it here with some models, but I can't tell you if your understanding is ok, because I don't know about the internal of 3d selection/highlighting.