1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

0027008: Visualization - polygonal selection algorithm does not work with MeshVS_Mesh

- correct calculation of normals for SelectMgr_TriangularFrustum;
- test case for issue #27008
This commit is contained in:
vpa
2016-10-28 15:03:38 +03:00
committed by apn
parent bc9a61ec69
commit d4507e82ba
2 changed files with 31 additions and 4 deletions

View File

@@ -27,13 +27,13 @@ namespace
void computeFrustumNormals (const gp_Vec* theEdges, gp_Vec* theNormals)
{
// V0V1
theNormals[0] = theEdges[0].Crossed (theEdges[1]);
theNormals[0] = theEdges[0].Crossed (theEdges[3]);
// V1V2
theNormals[1] = theEdges[1].Crossed (theEdges[2]);
theNormals[1] = theEdges[1].Crossed (theEdges[4]);
// V0V2
theNormals[2] = theEdges[0].Crossed (theEdges[2]);
theNormals[2] = theEdges[0].Crossed (theEdges[5]);
// Near
theNormals[3] = theEdges[3].Crossed (theEdges[5]);
theNormals[3] = theEdges[3].Crossed (theEdges[4]);
// Far
theNormals[4] = -theNormals[3];
}