mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +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:
parent
3db496cbf6
commit
d94d85fabc
@ -2172,10 +2172,23 @@ void CalculPtsInterTriEdgeCoplanaires2(const Standard_Integer TriSurfID,
|
|||||||
IntPolyh_StartPoint &SP2,
|
IntPolyh_StartPoint &SP2,
|
||||||
Standard_Integer &NbPoints)
|
Standard_Integer &NbPoints)
|
||||||
{
|
{
|
||||||
IntPolyh_Point TestParalleles;
|
Standard_Real aDE, aDC;
|
||||||
TestParalleles.Cross(Edge,Cote);
|
//
|
||||||
|
gp_Vec aVE(Edge.X(), Edge.Y(), Edge.Z());
|
||||||
if(sqrt(TestParalleles.SquareModulus())>MyConfusionPrecision) {
|
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
|
///Edge and side are not parallel
|
||||||
IntPolyh_Point Per;
|
IntPolyh_Point Per;
|
||||||
Per.Cross(NormaleTri,Cote);
|
Per.Cross(NormaleTri,Cote);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user