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

// trying to avoid regressions

This commit is contained in:
dpasukhi
2023-02-09 10:37:17 +00:00
parent 180044d16d
commit 16aa247f86
4 changed files with 31 additions and 31 deletions

View File

@@ -252,7 +252,7 @@ TopoDS_Shape IGESToBRep_BRepEntity::TransferEdge
Standard_Real dist2f = p2.Distance ( pf );
Standard_Real dist1l = p1.Distance ( pl );
Standard_Real dist2l = p2.Distance ( pl );
if ( V1.IsSame(V2) || dist1f + dist2l <= dist1l + dist2f + (Precision::Confusion() / GetUnitFactor()) ) {
if ( V1.IsSame(V2) || dist1f + dist2l <= dist1l + dist2f + Precision::Confusion() ) {
//:77 if (BRepTools::Compare(V1, Vf)) //the part 'else' only if, in fact, edge should be reversed
V1.Orientation(TopAbs_FORWARD);
B.Add(E,V1);

View File

@@ -388,7 +388,7 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::TransferConicArc
t1 = ElCLib::Parameter(parab, startPoint);
t2 = ElCLib::Parameter(parab, endPoint);
if (Abs(t1 - t2) <= Precision::Confusion() / GetUnitFactor()) { // t1 = t2
if (Abs(t1 - t2) <= Precision::Confusion()) { // t1 = t2
Message_Msg msg1160("IGES_1160");
SendWarning(st, msg1160);
//AddWarning(st, "The trim of the parabola is not correct.");
@@ -415,8 +415,8 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::TransferConicArc
t1 = ElCLib::Parameter(elips, startPoint);
t2 = ElCLib::Parameter(elips, endPoint);
if (t2 < t1 && (t1 -t2) > Precision::Confusion()/ GetUnitFactor()) t2 += 2.*M_PI;
if (Abs(t1 - t2) <= Precision::Confusion() / GetUnitFactor()) { // t1 = t2
if (t2 < t1 && (t1 -t2) > Precision::Confusion()) t2 += 2.*M_PI;
if (Abs(t1 - t2) <= Precision::Confusion()) { // t1 = t2
Message_Msg msg1160("IGES_1160");
SendWarning(st, msg1160);
//AddWarning(st, "The trim of the ellipse is not correct, the result will be a ellipse.");
@@ -435,7 +435,7 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::TransferConicArc
res = new Geom_Hyperbola(frame, majorRadius, minorRadius);
//pdn taking PConfusion for parameters.
if (Abs(t1 - t2) <= Precision::PConfusion() / GetUnitFactor()) { // t1 = t2
if (Abs(t1 - t2) <= Precision::PConfusion()) { // t1 = t2
Message_Msg msg1160("IGES_1160");
SendWarning(st, msg1160);
}
@@ -512,7 +512,7 @@ Handle(Geom2d_Curve) IGESToBRep_BasicCurve::Transfer2dConicArc
//#60 rln 29.12.98 PRO17015
//if ( (Abs(a-c) <= GetEpsGeom()) && (Abs(b) < GetEpsCoeff()))
Standard_Real eps2 = (Precision::PConfusion() * Precision::PConfusion()) / GetUnitFactor();
Standard_Real eps2 = Precision::PConfusion() * Precision::PConfusion();
if ( (Abs(a-c) <= eps2) && (Abs(b) < eps2)) {
// =================
@@ -531,8 +531,8 @@ Handle(Geom2d_Curve) IGESToBRep_BasicCurve::Transfer2dConicArc
t1 = ElCLib::Parameter(circ, startPoint);
t2 = ElCLib::Parameter(circ, endPoint);
if (t2 < t1 && (t1 -t2) > Precision::PConfusion() / GetUnitFactor()) t2 += 2.*M_PI;
if (Abs(t1 - t2) <= Precision::PConfusion() / GetUnitFactor()) { // t1 = t2
if (t2 < t1 && (t1 -t2) > Precision::PConfusion()) t2 += 2.*M_PI;
if (Abs(t1 - t2) <= Precision::PConfusion()) { // t1 = t2
Message_Msg msg1160("IGES_1160");
SendWarning(st, msg1160);
}
@@ -563,7 +563,7 @@ Handle(Geom2d_Curve) IGESToBRep_BasicCurve::Transfer2dConicArc
t1 = ElCLib::Parameter(parab, startPoint);
t2 = ElCLib::Parameter(parab, endPoint);
if (Abs(t1 - t2) <= Precision::PConfusion()/ GetUnitFactor()) { // t1 = t2
if (Abs(t1 - t2) <= Precision::PConfusion()) { // t1 = t2
Message_Msg msg1160("IGES_1160");
SendWarning(st, msg1160);
}
@@ -593,8 +593,8 @@ Handle(Geom2d_Curve) IGESToBRep_BasicCurve::Transfer2dConicArc
t1 = ElCLib::Parameter(elips, startPoint);
t2 = ElCLib::Parameter(elips, endPoint);
if (t2 < t1 && (t1 - t2) > Precision::PConfusion() / GetUnitFactor()) t2 += 2.*M_PI;
if (Abs(t1 - t2) <= Precision::PConfusion() / GetUnitFactor()) { // t1 = t2
if (t2 < t1 && (t1 - t2) > Precision::PConfusion()) t2 += 2.*M_PI;
if (Abs(t1 - t2) <= Precision::PConfusion()) { // t1 = t2
Message_Msg msg1160("IGES_1160");
SendWarning(st, msg1160);
}
@@ -614,7 +614,7 @@ Handle(Geom2d_Curve) IGESToBRep_BasicCurve::Transfer2dConicArc
t1 = ElCLib::Parameter(hpr, startPoint);
t2 = ElCLib::Parameter(hpr, endPoint);
if (Abs(t1 - t2) <= Precision::PConfusion() / GetUnitFactor()) { // t1 = t2
if (Abs(t1 - t2) <= Precision::PConfusion()) { // t1 = t2
Message_Msg msg1160("IGES_1160");
SendWarning(st, msg1160);
}
@@ -684,7 +684,7 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::TransferCircularArc
t2 = ElCLib::Parameter(circ, endPoint);
if ( st->IsClosed() && t1>=GetEpsGeom()) t2 = t1 + 2.*M_PI;
if (!st->IsClosed() && fabs(t1 - t2) <=Precision::PConfusion() / GetUnitFactor()) {
if (!st->IsClosed() && fabs(t1 - t2) <=Precision::PConfusion()) {
// micro-arc
// cky 27 Aout 1996 : t2-t1 vaut distance(start,end)/rayon
t2 = t1 + startPoint.Distance(endPoint)/st->Radius();
@@ -757,7 +757,7 @@ Handle(Geom2d_Curve) IGESToBRep_BasicCurve::Transfer2dCircularArc
t2 = ElCLib::Parameter(circ, endPoint);
if ( st->IsClosed() && t1>=GetEpsGeom()) t2 = t1 + 2.*M_PI;
if (!st->IsClosed() && fabs(t1 -t2) <= Precision::PConfusion() / GetUnitFactor()) {
if (!st->IsClosed() && fabs(t1 -t2) <= Precision::PConfusion()) {
// micro-arc
// cky 27 Aout 1996 : t2-t1 vaut distance(start,end)/rayon
t2 = t1 + startPoint.Distance(endPoint)/st->Radius();
@@ -819,7 +819,7 @@ Handle(Geom_BSplineCurve) IGESToBRep_BasicCurve::TransferSplineCurve
// Checking C2 and C1 continuity :
// ===============================
IGESConvGeom::IncreaseCurveContinuity (resconv, Min(Precision::Confusion() / GetUnitFactor(),epsgeom), GetContinuity());
IGESConvGeom::IncreaseCurveContinuity (resconv, Min(Precision::Confusion(),epsgeom), GetContinuity());
return resconv;
}
@@ -844,7 +844,7 @@ Handle(Geom2d_BSplineCurve) IGESToBRep_BasicCurve::Transfer2dSplineCurve
// =================
// The same Presision as in BSpline 2d is used
Standard_Real epsGeom = GetEpsGeom();
SetEpsGeom(Precision::PConfusion() / GetUnitFactor());
SetEpsGeom(Precision::PConfusion());
Handle(Geom_BSplineCurve) res3d = TransferSplineCurve(st);
SetEpsGeom(epsGeom);
if (res3d.IsNull())
@@ -1040,7 +1040,7 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::TransferBSplineCurve
Epsilon(WeightReference) && polynomial;
//:39 by abv 15.12.97
Standard_Real weight = start->Weight(i);
if ( weight < (Precision::PConfusion() / GetUnitFactor())) {
if ( weight < Precision::PConfusion() ) {
Message_Msg msg1215("IGES_1215");
SendFail(start, msg1215);
// Some weights are not positive
@@ -1104,11 +1104,11 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::TransferBSplineCurve
// skl 21.02.2002 (exception in OCC133 and for file
// "/dn04/OS/USINOR/UIdev/src/IsoLim/dat/igs/ps1002-v5.igs")
Handle(Geom_BSplineCurve) BSplineRes2 = BSplineRes;
if (((Udeb-First)>-Precision::PConfusion() / GetUnitFactor() &&
(Last-Ufin)>-Precision::PConfusion() / GetUnitFactor()) && Udeb<=Ufin ) {
if (((Udeb-First)>-Precision::PConfusion() &&
(Last-Ufin)>-Precision::PConfusion()) && Udeb<=Ufin ) {
try {
OCC_CATCH_SIGNALS
if (Abs(Ufin-Udeb) > Precision::PConfusion() / GetUnitFactor())
if (Abs(Ufin-Udeb) > Precision::PConfusion())
BSplineRes->Segment(Udeb, Ufin);
res = BSplineRes;
}
@@ -1249,7 +1249,7 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::TransferLine
// modif du 15/10/97 : test moins severe
// beaucoup de points confondus a GetEpsGeom()*GetUnitFactor()
if (!Ps.IsEqual(Pe,Precision::Confusion() / (3 * GetUnitFactor()))) { //:l3 abv 11 Jan 99: GetEpsGeom()*GetUnitFactor()/10.)) {
if (!Ps.IsEqual(Pe,Precision::Confusion() / GetUnitFactor())) { //:l3 abv 11 Jan 99: GetEpsGeom()*GetUnitFactor()/10.)) {
gp_Lin line(Ps, gp_Dir(gp_Vec(Ps,Pe)));
Standard_Real t1 = ElCLib::Parameter(line, Ps);
Standard_Real t2 = ElCLib::Parameter(line, Pe);
@@ -1299,7 +1299,7 @@ Handle(Geom2d_Curve) IGESToBRep_BasicCurve::Transfer2dLine
start->EndPoint().Y());
}
if (!beg.IsEqual(end,Precision::PConfusion() / (2 * GetUnitFactor()))) { //:l3 abv 11 Jan 99: GetEpsCoeff())) {
if (!beg.IsEqual(end,Precision::PConfusion() / GetUnitFactor())) { //:l3 abv 11 Jan 99: GetEpsCoeff())) {
gp_Lin2d line2d(beg, gp_Dir2d(gp_Vec2d(beg,end)));
Standard_Real t1 = ElCLib::Parameter(line2d, beg);
Standard_Real t2 = ElCLib::Parameter(line2d, end);
@@ -1447,7 +1447,7 @@ Handle(Geom_BSplineCurve) IGESToBRep_BasicCurve::TransferCopiousData
res = new Geom_BSplineCurve(Pole, Knot, Mult, Degree);
IGESConvGeom::IncreaseCurveContinuity (res, Max(GetEpsGeom()/10.,Precision::Confusion() / (3 * GetUnitFactor())), GetContinuity());
IGESConvGeom::IncreaseCurveContinuity (res, Max(GetEpsGeom()/10.,Precision::Confusion()), GetContinuity());
return res;
}
@@ -1550,6 +1550,6 @@ Handle(Geom2d_BSplineCurve) IGESToBRep_BasicCurve::Transfer2dCopiousData(const H
Standard_Real epsGeom = GetEpsGeom();
Standard_Real anUVResolution = GetUVResolution();
IGESConvGeom::IncreaseCurveContinuity (res, Max(Precision::Confusion() / (3 * GetUnitFactor()),epsGeom*anUVResolution), GetContinuity());
IGESConvGeom::IncreaseCurveContinuity (res, Max(Precision::Confusion(),epsGeom*anUVResolution), GetContinuity());
return res;
}

View File

@@ -325,7 +325,7 @@ Handle(Geom_CylindricalSurface) IGESToBRep_BasicSurface::TransferRigthCylindrica
Handle(IGESGeom_Direction) refdir = start->ReferenceDir();
gp_Dir Dir = gp_Dir(refdir->Value());
gp_Dir vc = Dir^ax;
if(vc.XYZ().Modulus() < Precision::Confusion() / (3 * GetUnitFactor())) {
if(vc.XYZ().Modulus() < Precision::Confusion()) {
return res;
}
@@ -368,7 +368,7 @@ Handle(Geom_ConicalSurface) IGESToBRep_BasicSurface::TransferRigthConicalSurface
// Direction Reading Error : Null IGESEntity
return res;
}
if (angle < Precision::Confusion() / GetUnitFactor() ||angle > M_PI/2.) {
if (angle < Precision::Confusion()||angle > M_PI/2.) {
return res;
}
if (radius < 0) {
@@ -386,7 +386,7 @@ Handle(Geom_ConicalSurface) IGESToBRep_BasicSurface::TransferRigthConicalSurface
Handle(IGESGeom_Direction) refdir = start->ReferenceDir();
gp_Dir Dir = gp_Dir(refdir->Value());
gp_Dir vc = Dir^ax;
if(vc.XYZ().Modulus() < Precision::Confusion() / (3 * GetUnitFactor())) {
if(vc.XYZ().Modulus() < Precision::Confusion()) {
return res;
}
@@ -441,7 +441,7 @@ Handle(Geom_SphericalSurface) IGESToBRep_BasicSurface::TransferSphericalSurface
Handle(IGESGeom_Direction) refdir = start->ReferenceDir();
gp_Dir Dir = gp_Dir(refdir->Value());
gp_Dir vc = Dir^ax;
if(vc.XYZ().Modulus() < Precision::Confusion() / (3 * GetUnitFactor())) {
if(vc.XYZ().Modulus() < Precision::Confusion()) {
return res;
}
@@ -497,7 +497,7 @@ Handle(Geom_ToroidalSurface) IGESToBRep_BasicSurface::TransferToroidalSurface
Handle(IGESGeom_Direction) refdir = start->ReferenceDir();
gp_Dir Dir = gp_Dir(refdir->Value());
gp_Dir vc = Dir^ax;
if(vc.XYZ().Modulus() < Precision::Confusion() / (3 * GetUnitFactor())) {
if(vc.XYZ().Modulus() < Precision::Confusion()) {
return res;
}
@@ -852,7 +852,7 @@ Handle(Geom_BSplineSurface) IGESToBRep_BasicSurface::TransferBSplineSurface
<= Epsilon(WeightReference)) && polynomial;
//:39 by abv 15.12.97
Standard_Real weight = start->Weight(i,j);
if ( weight < Precision::PConfusion() / GetUnitFactor()) {
if ( weight < Precision::PConfusion() ) {
Message_Msg msg1215("IGES_1215");
SendFail (start, msg1215); // Some weights are not positive.
return res;

View File

@@ -148,7 +148,7 @@ void IGESToBRep_CurveAndSurface::UpdateMinMaxTol()
//#74 rln 11.03.99 S4135: Setting maximum tolerances according to
//static parameter
myMaxTol = Max (Interface_Static::RVal ("read.maxprecision.val"), myEpsGeom * myUnitFactor);
myMinTol = Precision::Confusion() * GetUnitFactor();
myMinTol = Precision::Confusion();
}
//=======================================================================