// Copyright (c) 1995-1999 Matra Datavision // Copyright (c) 1999-2012 OPEN CASCADE SAS // // The content of this file is subject to the Open CASCADE Technology Public // License Version 6.5 (the "License"). You may not use the content of this file // except in compliance with the License. Please obtain a copy of the License // at http://www.opencascade.org and read it completely before using this file. // // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. // // The Original Code and all software distributed under the License is // distributed on an "AS IS" basis, without warranty of any kind, and the // Initial Developer hereby disclaims all such warranties, including without // limitation, any warranties of merchantability, fitness for a particular // purpose or non-infringement. Please see the License for the specific terms // and conditions governing the rights and limitations under the License. //============================================================================ //======================================================= IntAna2d_Outils.cxx //============================================================================ #include #include MyDirectPolynomialRoots::MyDirectPolynomialRoots(const Standard_Real A4, const Standard_Real A3, const Standard_Real A2, const Standard_Real A1, const Standard_Real A0) { //-- cout<<" IntAna2d : A4..A0 "< tol || val[nbsol]<-tol) { PbPossible = Standard_True; } nbsol++; } if(nbp & 1) PbPossible = Standard_True; } else { PbPossible = Standard_True; } //-- On recherche le plus petit coeff entre A4 et A0 if(PbPossible) { // Modified by Sergey KHROMOV - Thu Oct 24 12:45:35 2002 Begin Standard_Real anAMin = RealLast(); Standard_Real anAMax = -1; Standard_Real anEps = RealEpsilon(); for (i = 0; i < 5; i++) { anAMin = Min(anAMin, Max(anAA[i], anEps)); anAMax = Max(anAMax, Max(anAA[i], anEps)); } anEps = Min(1.e-4, Epsilon(1000.*anAMax/anAMin)); // Modified by Sergey KHROMOV - Thu Oct 24 15:46:24 2002 End math_DirectPolynomialRoots MATH_A4321(A4,A3,A2,A1); if(MATH_A4321.IsDone()) { nbp = MATH_A4321.NbSolutions(); //-- On Ajoute les valeurs au tableau for(i=1;i<=nbp;i++) { Standard_Real x = MATH_A4321.Value(i); Standard_Boolean Add = Standard_True; for(j=0;j4) { same=1; nbsol=0; } } MyDirectPolynomialRoots::MyDirectPolynomialRoots(const Standard_Real A2, const Standard_Real A1, const Standard_Real A0) { //-- cout<<" IntAna2d : A2..A0 "<1;i--) { Standard_Boolean Non_Egalite=Standard_True; for(j=i-1;(j>0) && Non_Egalite;j--) { // <--- Deja Teste ---> // | 1 |2 | | J | |I-1| I |I+1| |NPTS| // | 1 |2 | | J | |I-1|XXX|I+1| |NPTS| // | 1 |2 | | J | |I-1|I+1|I+2| |NPTS| if(Points_Confondus(pts[i-1].Value().X(), pts[i-1].Value().Y(), pts[j-1].Value().X(), pts[j-1].Value().Y())) { Standard_Integer k; Non_Egalite=Standard_False; for(k=i;k