1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0024770: On attached shape command "bfillds -s" hangs in Test Harness on the long time. In debug mode exception is raised.

Vectors are normalized before calculation of an angle.
This commit is contained in:
emv 2014-04-08 11:32:38 +04:00 committed by abv
parent 3db496cbf6
commit d94d85fabc

View File

@ -2171,11 +2171,24 @@ void CalculPtsInterTriEdgeCoplanaires2(const Standard_Integer TriSurfID,
IntPolyh_StartPoint &SP1,
IntPolyh_StartPoint &SP2,
Standard_Integer &NbPoints)
{
IntPolyh_Point TestParalleles;
TestParalleles.Cross(Edge,Cote);
if(sqrt(TestParalleles.SquareModulus())>MyConfusionPrecision) {
{
Standard_Real aDE, aDC;
//
gp_Vec aVE(Edge.X(), Edge.Y(), Edge.Z());
gp_Vec aVC(Cote.X(), Cote.Y(), Cote.Z());
//
aDE = aVE.SquareMagnitude();
aDC = aVC.SquareMagnitude();
//
if (aDE > SquareMyConfusionPrecision) {
aVE.Divide(aDE);
}
//
if (aDC > SquareMyConfusionPrecision) {
aVC.Divide(aDC);
}
//
if (!aVE.IsParallel(aVC, MyConfusionPrecision)) {
///Edge and side are not parallel
IntPolyh_Point Per;
Per.Cross(NormaleTri,Cote);