diff --git a/src/ApproxInt/ApproxInt_Approx.gxx b/src/ApproxInt/ApproxInt_Approx.gxx index 23d4b03d9c..6b90d71292 100644 --- a/src/ApproxInt/ApproxInt_Approx.gxx +++ b/src/ApproxInt/ApproxInt_Approx.gxx @@ -936,7 +936,6 @@ void ApproxInt_Approx::Perform(const TheISurface& ISurf, ApproxInt_TheImpPrmSvSurfaces myImpPrmSvSurfaces(ISurf,PSurf); Standard_Integer nbpntbez = indicemax-indicemin; - Standard_Address ptrsvsurf = NULL; Standard_Boolean cut = Standard_True; if(nbpntbez < LimRajout) myApproxBez = Standard_False; @@ -947,7 +946,7 @@ void ApproxInt_Approx::Perform(const TheISurface& ISurf, cut = Standard_False; //-- cout<<" ApproxInt : Nb de points = "<= anAbsD2) { - aDetV1V2 = mVecC1.Y()*mVecC2.Z()-mVecC1.Z()*mVecC2.Y(); - if(Abs(aDetV1V2) < aNulValue) + if(anAbsD3 > anAbsD1) { - aDetV1V2 = mVecC1.X()*mVecC2.Z()-mVecC1.Z()*mVecC2.X(); - if(Abs(aDetV1V2) < aNulValue) - { - Standard_Failure::Raise("Error. Exception in divide by zerro (IntCyCyTrim)!!!!"); - } - else - { - aFoundCouple = COE13; - } + aFoundCouple = COE13; + aDetV1V2 = aDelta3; } else { - aFoundCouple = COE23; + aFoundCouple = COE12; + aDetV1V2 = aDelta1; } } else { - aFoundCouple = COE12; + if(anAbsD3 > anAbsD2) + { + aFoundCouple = COE13; + aDetV1V2 = aDelta3; + } + else + { + aFoundCouple = COE23; + aDetV1V2 = aDelta2; + } + } + + if(Abs(aDetV1V2) < aNulValue) + { + Standard_Failure::Raise("Error. Exception in divide by zerro (IntCyCyTrim)!!!!"); } switch(aFoundCouple) @@ -1504,6 +1518,10 @@ static void SeekAdditionalPoints( const IntSurf_Quadric& theQuad1, gp_Pnt aPInt(0.5*(aP1.XYZ() + aP2.XYZ())); +#ifdef OCCT_DEBUG + //cout << "|P1Pi| = " << aP1.SquareDistance(aPInt) << "; |P2Pi| = " << aP2.SquareDistance(aPInt) << endl; +#endif + IntSurf_PntOn2S anIP; if(isTheReverse) { @@ -1632,11 +1650,15 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1, theSlin.Clear(); theSPnt.Clear(); - const Standard_Integer aNbPoints = Min(Max(200, RealToInt(20.0*aCyl1.Radius())), 2000); + const Standard_Integer aNbMaxPoints = 2000; + const Standard_Integer aNbMinPoints = 200; + const Standard_Integer aNbPoints = Min(Max(aNbMinPoints, + RealToInt(20.0*aCyl1.Radius())), aNbMaxPoints); const Standard_Real aPeriod = 2.0*M_PI; const Standard_Real aStepMin = theTol2D, aStepMax = (aUSurf1l-aUSurf1f)/IntToReal(aNbPoints); - + const Standard_Integer aNbWLines = 2; + const stCoeffsValue anEquationCoeffs(aCyl1, aCyl2); //Boundaries @@ -1843,7 +1865,9 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1, if(Precision::IsInfinite(aU1f[aCurInterval]) && Precision::IsInfinite(aU1l[aCurInterval])) continue; - Standard_Boolean isAddedIntoWL1 = Standard_False, isAddedIntoWL2 = Standard_False; + Standard_Boolean isAddedIntoWL[aNbWLines]; + for(Standard_Integer i = 0; i < aNbWLines; i++) + isAddedIntoWL[i] = Standard_False; Standard_Real anUf = aU1f[aCurInterval], anUl = aU1l[aCurInterval]; const Standard_Boolean isDeltaPeriod = IsEqual(anUl-anUf, aPeriod); @@ -1853,26 +1877,30 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1, while(anUf < anUl) { - Handle(IntSurf_LineOn2S) aL2S1 = new IntSurf_LineOn2S(); - Handle(IntSurf_LineOn2S) aL2S2 = new IntSurf_LineOn2S(); - - Handle(IntPatch_WLine) aWLine1 = new IntPatch_WLine(aL2S1, Standard_False); - Handle(IntPatch_WLine) aWLine2 = new IntPatch_WLine(aL2S2, Standard_False); - - Standard_Integer aWL1FindStatus = 0, aWL2FindStatus = 0; - Standard_Boolean isAddingWL1Enabled = Standard_True, - isAddingWL2Enabled = Standard_True; + Standard_Real aU2[aNbWLines], aV1[aNbWLines], aV2[aNbWLines]; + Standard_Integer aWLFindStatus[aNbWLines]; + Standard_Real aV1Prev[aNbWLines], aV2Prev[aNbWLines]; + Standard_Real anArccosFactor[aNbWLines] = {1.0, -1.0}; + Standard_Boolean isAddingWLEnabled[aNbWLines]; + Handle(IntSurf_LineOn2S) aL2S[aNbWLines]; + Handle(IntPatch_WLine) aWLine[aNbWLines]; + for(Standard_Integer i = 0; i < aNbWLines; i++) + { + aL2S[i] = new IntSurf_LineOn2S(); + aWLine[i] = new IntPatch_WLine(aL2S[i], Standard_False); + aWLFindStatus[i] = 0; + isAddingWLEnabled[i] = Standard_True; + aU2[i] = aV1[i] = aV2[i] = 0.0; + aV1Prev[i] = aV2Prev[i] = 0.0; + } + Standard_Real anU1 = anUf; Standard_Real aCriticalDelta[aNbCritPointsMax]; for(Standard_Integer i = 0; i < aNbCritPointsMax; i++) aCriticalDelta[i] = anU1 - anU1crit[i]; - Standard_Real aV11Prev = 0.0, - aV12Prev = 0.0, - aV21Prev = 0.0, - aV22Prev = 0.0; Standard_Boolean isFirst = Standard_True; while(anU1 <= anUl) @@ -1889,8 +1917,8 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1, //already existing WLine. Consequently, it is necessary //to forbid building new line in this case. - isAddingWL1Enabled = !isAddedIntoWL1; - isAddingWL2Enabled = !isAddedIntoWL2; + for(Standard_Integer i = 0; i < aNbWLines; i++) + isAddingWLEnabled[i] = !isAddedIntoWL[i]; } } @@ -1899,8 +1927,10 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1, if((anU1 - anU1crit[i])*aCriticalDelta[i] < 0.0) { anU1 = anU1crit[i]; - aWL1FindStatus = 2; - aWL2FindStatus = 2; + + for(Standard_Integer i = 0; i < aNbWLines; i++) + aWLFindStatus[i] = 2; + break; } } @@ -1913,147 +1943,108 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1, if(anArg + 1.0 < aNulValue) anArg = -1.0; - Standard_Real aU21 = anEquationCoeffs.mFI2 + acos(anArg); - InscribePoint(aUSurf2f, aUSurf2l, aU21, theTol2D, aPeriod, Standard_False); - - - const Standard_Integer aNbPntsWL1 = aWLine1.IsNull() ? 0 : - aWLine1->Curve()->NbPoints(); - if(aNbPntsWL1 == 0) - {//the line have not contained any points yet - if(((aUSurf2l - aUSurf2f) >= aPeriod) && - ((Abs(aU21-aUSurf2f) < theTol2D) || (Abs(aU21-aUSurf2l) < theTol2D))) - { - const Standard_Real anU1Temp = anU1 + aStepMin; - Standard_Real anArgTemp = anEquationCoeffs.mB * - cos(anU1Temp - anEquationCoeffs.mFI1) + anEquationCoeffs.mC; - - if(aNulValue > 1.0 - anArg) - anArg = 1.0; - if(anArg + 1.0 < aNulValue) - anArg = -1.0; - - Standard_Real aU2Temp = anEquationCoeffs.mFI2 + acos(anArgTemp); - InscribePoint(aUSurf2f, aUSurf2l, aU2Temp, theTol2D, aPeriod, Standard_False); - if(2.0*Abs(aU2Temp - aU21) > aPeriod) - { - if(aU2Temp > aU21) - aU21 += aPeriod; - else - aU21 -= aPeriod; - } - } - } - - if(aNbPntsWL1 > 0) - {//end of the line - if(((aUSurf2l - aUSurf2f) >= aPeriod) && - ((Abs(aU21-aUSurf2f) < theTol2D) || (Abs(aU21-aUSurf2l) < theTol2D))) - { - Standard_Real aU2prev = 0.0, aV2prev = 0.0; - if(isTheReverse) - aWLine1->Curve()->Value(aNbPntsWL1).ParametersOnS1(aU2prev, aV2prev); - else - aWLine1->Curve()->Value(aNbPntsWL1).ParametersOnS2(aU2prev, aV2prev); - - if(2.0*Abs(aU2prev - aU21) > aPeriod) - { - if(aU2prev > aU21) - aU21 += aPeriod; - else - aU21 -= aPeriod; - } - } - } - - Standard_Real aU22 = anEquationCoeffs.mFI2 - acos(anArg); - InscribePoint(aUSurf2f, aUSurf2l, aU22, theTol2D, aPeriod, Standard_False); - - const Standard_Integer aNbPntsWL2 = aWLine2.IsNull() ? 0 : - aWLine2->Curve()->NbPoints(); - if(aNbPntsWL2 == 0) - {//the line have not contained any points yet - if(((aUSurf2l - aUSurf2f) >= aPeriod) && - ((Abs(aU22-aUSurf2f) < theTol2D) || (Abs(aU22-aUSurf2l) < theTol2D))) - { - const Standard_Real anU1Temp = anU1 + aStepMin; - Standard_Real anArgTemp = anEquationCoeffs.mB * - cos(anU1Temp - anEquationCoeffs.mFI1) + anEquationCoeffs.mC; - - if(aNulValue > 1.0 - anArg) - anArg = 1.0; - if(anArg + 1.0 < aNulValue) - anArg = -1.0; - - Standard_Real aU2Temp = anEquationCoeffs.mFI2 - acos(anArgTemp); - InscribePoint(aUSurf2f, aUSurf2l, aU2Temp, theTol2D, aPeriod, Standard_False); - if(2.0*Abs(aU2Temp - aU22) > aPeriod) - { - if(aU2Temp > aU21) - aU22 += aPeriod; - else - aU22 -= aPeriod; - } - } - } - - if(aNbPntsWL2 > 0) - {//end of the line - if(((aUSurf2l - aUSurf2f) >= aPeriod) && - ((Abs(aU22-aUSurf2f) < theTol2D) || (Abs(aU22-aUSurf2l) < theTol2D))) - { - Standard_Real aU2prev = 0.0, aV2prev = 0.0; - if(isTheReverse) - aWLine2->Curve()->Value(aNbPntsWL2).ParametersOnS1(aU2prev, aV2prev); - else - aWLine2->Curve()->Value(aNbPntsWL2).ParametersOnS2(aU2prev, aV2prev); - - if(2.0*Abs(aU2prev - aU22) > aPeriod) - { - if(aU2prev > aU22) - aU22 += aPeriod; - else - aU22 -= aPeriod; - } - } - } - - const Standard_Real aV11 = anEquationCoeffs.mK21 * sin(aU21) + - anEquationCoeffs.mK11 * sin(anU1) + - anEquationCoeffs.mL21 * cos(aU21) + - anEquationCoeffs.mL11 * cos(anU1) + anEquationCoeffs.mM1; - const Standard_Real aV12 = anEquationCoeffs.mK21 * sin(aU22) + - anEquationCoeffs.mK11 * sin(anU1) + - anEquationCoeffs.mL21 * cos(aU22) + - anEquationCoeffs.mL11 * cos(anU1) + anEquationCoeffs.mM1; - const Standard_Real aV21 = anEquationCoeffs.mK22 * sin(aU21) + - anEquationCoeffs.mK12 * sin(anU1) + - anEquationCoeffs.mL22 * cos(aU21) + - anEquationCoeffs.mL12 * cos(anU1) + anEquationCoeffs.mM2; - const Standard_Real aV22 = anEquationCoeffs.mK22 * sin(aU22) + - anEquationCoeffs.mK12 * sin(anU1) + - anEquationCoeffs.mL22 * cos(aU22) + - anEquationCoeffs.mL12 * cos(anU1) + anEquationCoeffs.mM2; - - if(isFirst) + for(Standard_Integer i = 0; i < aNbWLines; i++) { - aV11Prev = aV11; - aV12Prev = aV12; - aV21Prev = aV21; - aV22Prev = aV22; - isFirst = Standard_False; - } + const Standard_Integer aNbPntsWL = aWLine[i].IsNull() ? 0 : + aWLine[i]->Curve()->NbPoints(); + aU2[i] = anEquationCoeffs.mFI2 + anArccosFactor[i]*acos(anArg); - if(isAddingWL1Enabled) + InscribePoint(aUSurf2f, aUSurf2l, aU2[i], theTol2D, aPeriod, Standard_False); + + if(aNbPntsWL == 0) + {//the line has not contained any points yet + if(((aUSurf2l - aUSurf2f) >= aPeriod) && + ((Abs(aU2[i] - aUSurf2f) < theTol2D) || + (Abs(aU2[i]-aUSurf2l) < theTol2D))) + { + const Standard_Real anU1Temp = anU1 + aStepMin; + Standard_Real anArgTemp = anEquationCoeffs.mB * + cos(anU1Temp - anEquationCoeffs.mFI1) + + anEquationCoeffs.mC; + + if(aNulValue > 1.0 - anArgTemp) + anArgTemp = 1.0; + + if(anArgTemp + 1.0 < aNulValue) + anArgTemp = -1.0; + + Standard_Real aU2Temp = anEquationCoeffs.mFI2 + + anArccosFactor[i]*acos(anArgTemp); + + InscribePoint(aUSurf2f, aUSurf2l, aU2Temp, theTol2D, aPeriod, Standard_False); + + if(2.0*Abs(aU2Temp - aU2[i]) > aPeriod) + { + if(aU2Temp > aU2[i]) + aU2[i] += aPeriod; + else + aU2[i] -= aPeriod; + } + } + } + + if(aNbPntsWL > 0) + { + if(((aUSurf2l - aUSurf2f) >= aPeriod) && + ((Abs(aU2[i] - aUSurf2f) < theTol2D) || + (Abs(aU2[i]-aUSurf2l) < theTol2D))) + {//end of the line + Standard_Real aU2prev = 0.0, aV2prev = 0.0; + if(isTheReverse) + aWLine[i]->Curve()->Value(aNbPntsWL).ParametersOnS1(aU2prev, aV2prev); + else + aWLine[i]->Curve()->Value(aNbPntsWL).ParametersOnS2(aU2prev, aV2prev); + + if(2.0*Abs(aU2prev - aU2[i]) > aPeriod) + { + if(aU2prev > aU2[i]) + aU2[i] += aPeriod; + else + aU2[i] -= aPeriod; + } + } + } + + aV1[i] = anEquationCoeffs.mK21 * sin(aU2[i]) + + anEquationCoeffs.mK11 * sin(anU1) + + anEquationCoeffs.mL21 * cos(aU2[i]) + + anEquationCoeffs.mL11 * cos(anU1) + anEquationCoeffs.mM1; + + aV2[i] = anEquationCoeffs.mK22 * sin(aU2[i]) + + anEquationCoeffs.mK12 * sin(anU1) + + anEquationCoeffs.mL22 * cos(aU2[i]) + + anEquationCoeffs.mL12 * cos(anU1) + anEquationCoeffs.mM2; + + if(isFirst) + { + aV1Prev[i] = aV1[i]; + aV2Prev[i] = aV2[i]; + } + }//for(Standard_Integer i = 0; i < aNbWLines; i++) + + isFirst = Standard_False; + + //Looking for points into WLine + Standard_Boolean isBroken = Standard_False; + for(Standard_Integer i = 0; i < aNbWLines; i++) { - if( ((aUSurf2f-aU21) <= theTol2D) && - ((aU21-aUSurf2l) <= theTol2D) && - ((aVSurf1f - aV11) <= theTol2D) && - ((aV11 - aVSurf1l) <= theTol2D) && - ((aVSurf2f - aV21) <= theTol2D) && ((aV21 - aVSurf2l) <= theTol2D)) + if(!isAddingWLEnabled[i]) + { + aV1Prev[i] = aV1[i]; + aV2Prev[i] = aV2[i]; + + if(aWLFindStatus[i] == 2) + isBroken = Standard_True; + + continue; + } + + if( ((aUSurf2f-aU2[i]) <= theTol2D) && ((aU2[i]-aUSurf2l) <= theTol2D) && + ((aVSurf1f - aV1[i]) <= theTol2D) && ((aV1[i] - aVSurf1l) <= theTol2D) && + ((aVSurf2f - aV2[i]) <= theTol2D) && ((aV2[i] - aVSurf2l) <= theTol2D)) { Standard_Boolean isForce = Standard_False; - if(!aWL1FindStatus) + if(!aWLFindStatus[i]) { Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False; @@ -2062,306 +2053,178 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1, isForce = Standard_True; } - AddBoundaryPoint(theQuad1, theQuad2, aWLine1, anEquationCoeffs, + AddBoundaryPoint( theQuad1, theQuad2, aWLine[i], anEquationCoeffs, theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod, - aNulValue, anU1, aU21, aV11, aV11Prev, - aV21, aV21Prev, isTheReverse, - 1.0, isForce, isFound1, isFound2); + aNulValue, anU1, aU2[i], aV1[i], aV1Prev[i], + aV2[i], aV2Prev[i], isTheReverse, + anArccosFactor[i], isForce, isFound1, isFound2); if(isFound1 || isFound2) { - aWL1FindStatus = 1; + aWLFindStatus[i] = 1; } } - if((aWL1FindStatus != 2) || (aWLine1->NbPnts() >= 1)) + if(( aWLFindStatus[i] != 2) || (aWLine[i]->NbPnts() >= 1)) { if(AddPointIntoWL(theQuad1, theQuad2, isTheReverse, - gp_Pnt2d(anU1, aV11), gp_Pnt2d(aU21, aV21), - aUSurf1f, aUSurf1l, aPeriod, - aWLine1->Curve(), theTol3D, theTol2D, isForce)) + gp_Pnt2d(anU1, aV1[i]), gp_Pnt2d(aU2[i], aV2[i]), + aUSurf1f, aUSurf1l, aPeriod, + aWLine[i]->Curve(), theTol3D, theTol2D, isForce)) { - if(!aWL1FindStatus) + if(!aWLFindStatus[i]) { - aWL1FindStatus = 1; + aWLFindStatus[i] = 1; } } } } else { - if(aWL1FindStatus == 1) + if(aWLFindStatus[i] == 1) { Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False; - AddBoundaryPoint(theQuad1, theQuad2, aWLine1, anEquationCoeffs, + AddBoundaryPoint( theQuad1, theQuad2, aWLine[i], anEquationCoeffs, theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod, - aNulValue, anU1, aU21, aV11, aV11Prev, - aV21, aV21Prev, isTheReverse, - 1.0, Standard_False, isFound1, isFound2); + aNulValue, anU1, aU2[i], aV1[i], aV1Prev[i], + aV2[i], aV2Prev[i], isTheReverse, + anArccosFactor[i], Standard_False, isFound1, isFound2); if(isFound1 || isFound2) - aWL1FindStatus = 2; //start a new line + aWLFindStatus[i] = 2; //start a new line } } - } - - if(isAddingWL2Enabled) - { - if( ((aUSurf2f-aU22) <= theTol2D) && - ((aU22-aUSurf2l) <= theTol2D) && - ((aVSurf1f - aV12) <= theTol2D) && - ((aV12 - aVSurf1l) <= theTol2D) && - ((aVSurf2f - aV22) <= theTol2D) && - ((aV22 - aVSurf2l) <= theTol2D)) - { - Standard_Boolean isForce = Standard_False; - if(!aWL2FindStatus) - { - Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False; + aV1Prev[i] = aV1[i]; + aV2Prev[i] = aV2[i]; - if(((aUSurf2l - aUSurf2f) >= aPeriod) && (Abs(anU1-aUSurf1l) < theTol2D)) - { - isForce = Standard_True; - } + if(aWLFindStatus[i] == 2) + isBroken = Standard_True; + }//for(Standard_Integer i = 0; i < aNbWLines; i++) - AddBoundaryPoint(theQuad1, theQuad2, aWLine2, anEquationCoeffs, - theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod, - aNulValue, anU1, aU22, aV12, aV12Prev, - aV22, aV22Prev, isTheReverse, - -1.0, isForce, isFound1, isFound2); - - if(isFound1 || isFound2) - { - aWL2FindStatus = 1; - } - } - - if((aWL2FindStatus != 2) || (aWLine2->NbPnts() >= 1)) - { - if(AddPointIntoWL(theQuad1, theQuad2, isTheReverse, - gp_Pnt2d(anU1, aV12), gp_Pnt2d(aU22, aV22), - aUSurf1f, aUSurf1l, aPeriod, - aWLine2->Curve(), theTol3D, theTol2D, isForce)) - { - if(!aWL2FindStatus) - { - aWL2FindStatus = 1; - } - } - } - } - else - { - if(aWL2FindStatus == 1) - { - Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False; - - AddBoundaryPoint(theQuad1, theQuad2, aWLine2, anEquationCoeffs, - theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod, - aNulValue, anU1, aU22, aV12, aV12Prev, - aV22, aV22Prev, isTheReverse, - -1.0, Standard_False, isFound1, isFound2); - - if(isFound1 || isFound2) - aWL2FindStatus = 2; //start a new line - } - } - } - - aV11Prev = aV11; - aV12Prev = aV12; - aV21Prev = aV21; - aV22Prev = aV22; - - if((aWL1FindStatus == 2) || (aWL2FindStatus == 2)) + if(isBroken) {//current lines are filled. Go to the next lines anUf = anU1; break; } - Standard_Real aFact1 = !IsEqual(sin(aU21 - anEquationCoeffs.mFI2), 0.0) ? + //Step computing + + Standard_Real aStepU1 = aStepMax; + + for(Standard_Integer i = 0; i < aNbWLines; i++) + { + Standard_Real aDeltaU1V1 = aStepU1, aDeltaU1V2 = aStepU1; + + Standard_Real aFact1 = !IsEqual(sin(aU2[i] - anEquationCoeffs.mFI2), 0.0) ? anEquationCoeffs.mK1 * sin(anU1 - anEquationCoeffs.mFIV1) + - anEquationCoeffs.mL1 * anEquationCoeffs.mB * sin(aU21 - anEquationCoeffs.mPSIV1) * - sin(anU1 - anEquationCoeffs.mFI1)/sin(aU21-anEquationCoeffs.mFI2) : 0.0, - aFact2 = !IsEqual(sin(aU22-anEquationCoeffs.mFI2), 0.0) ? - anEquationCoeffs.mK1 * sin(anU1 - anEquationCoeffs.mFIV1) + - anEquationCoeffs.mL1 * anEquationCoeffs.mB * sin(aU22 - anEquationCoeffs.mPSIV1) * - sin(anU1 - anEquationCoeffs.mFI1)/sin(aU22-anEquationCoeffs.mFI2) : 0.0; - - Standard_Real aDeltaV1 = (aVSurf1l - aVSurf1f)/IntToReal(aNbPoints); - - if((aV11 < aVSurf1f) && (aFact1 < 0.0)) - {//Make close to aVSurf1f by increasing anU1 (for the 1st line) - aDeltaV1 = Min(aDeltaV1, Abs(aV11-aVSurf1f)); - } - - if((aV12 < aVSurf1f) && (aFact2 < 0.0)) - {//Make close to aVSurf1f by increasing anU1 (for the 2nd line) - aDeltaV1 = Min(aDeltaV1, Abs(aV12-aVSurf1f)); - } - - if((aV11 > aVSurf1l) && (aFact1 > 0.0)) - {//Make close to aVSurf1l by increasing anU1 (for the 1st line) - aDeltaV1 = Min(aDeltaV1, Abs(aV11-aVSurf1l)); - } - - if((aV12 > aVSurf1l) && (aFact2 > 0.0)) - {//Make close to aVSurf1l by increasing anU1 (for the 1st line) - aDeltaV1 = Min(aDeltaV1, Abs(aV12-aVSurf1l)); - } - - Standard_Real aDeltaU1L1 = !IsEqual(aFact1,0.0)? Abs(aDeltaV1/aFact1) : aStepMax, - aDeltaU1L2 = !IsEqual(aFact2,0.0)? Abs(aDeltaV1/aFact2) : aStepMax; - - const Standard_Real aDeltaU1V1 = Min(aDeltaU1L1, aDeltaU1L2); - - /////////////////////////// - aFact1 = !IsEqual(sin(aU21-anEquationCoeffs.mFI2), 0.0) ? + anEquationCoeffs.mL1 * anEquationCoeffs.mB * sin(aU2[i] - anEquationCoeffs.mPSIV1) * + sin(anU1 - anEquationCoeffs.mFI1)/sin(aU2[i]-anEquationCoeffs.mFI2) : 0.0, + aFact2 = !IsEqual(sin(aU2[i]-anEquationCoeffs.mFI2), 0.0) ? anEquationCoeffs.mK2 * sin(anU1 - anEquationCoeffs.mFIV2) + - anEquationCoeffs.mL2 * anEquationCoeffs.mB * sin(aU21 - anEquationCoeffs.mPSIV2) * - sin(anU1 - anEquationCoeffs.mFI1)/sin(aU21 - anEquationCoeffs.mFI2) : 0.0; - aFact2 = !IsEqual(sin(aU22-anEquationCoeffs.mFI2), 0.0) ? - anEquationCoeffs.mK2 * sin(anU1 - anEquationCoeffs.mFIV2) + - anEquationCoeffs.mL2 * anEquationCoeffs.mB * sin(aU22 - anEquationCoeffs.mPSIV2) * - sin(anU1 - anEquationCoeffs.mFI1)/sin(aU22 - anEquationCoeffs.mFI2) : 0.0; + anEquationCoeffs.mL2 * anEquationCoeffs.mB * sin(aU2[i] - anEquationCoeffs.mPSIV2) * + sin(anU1 - anEquationCoeffs.mFI1)/sin(aU2[i] - anEquationCoeffs.mFI2) : 0.0; + + Standard_Real aDeltaV1 = (aVSurf1l - aVSurf1f)/IntToReal(aNbPoints), + aDeltaV2 = (aVSurf2l - aVSurf2f)/IntToReal(aNbPoints); + + if((aV1[i] < aVSurf1f) && (aFact1 < 0.0)) + {//Make close to aVSurf1f by increasing anU1 + aDeltaV1 = Min(aDeltaV1, Abs(aV1[i]-aVSurf1f)); + } + + if((aV1[i] > aVSurf1l) && (aFact1 > 0.0)) + {//Make close to aVSurf1l by increasing anU1 + aDeltaV1 = Min(aDeltaV1, Abs(aV1[i]-aVSurf1l)); + } + + if((aV2[i] < aVSurf2f) && (aFact2 < 0.0)) + {//Make close to aVSurf2f by increasing anU1 + aDeltaV2 = Min(aDeltaV2, Abs(aV2[i]-aVSurf2f)); + } + + if((aV2[i] > aVSurf2l) && (aFact2 > 0.0)) + {//Make close to aVSurf2l by increasing anU1 + aDeltaV2 = Min(aDeltaV2, Abs(aV2[i]-aVSurf1l)); + } + + aDeltaU1V1 = !IsEqual(aFact1,0.0)? Abs(aDeltaV1/aFact1) : aStepMax; + aDeltaU1V2 = !IsEqual(aFact2,0.0)? Abs(aDeltaV2/aFact2) : aStepMax; + + if(aDeltaU1V1 < aStepU1) + aStepU1 = aDeltaU1V1; + + if(aDeltaU1V2 < aStepU1) + aStepU1 = aDeltaU1V2; + } + + if(aStepU1 < aStepMin) + aStepU1 = aStepMin; - Standard_Real aDeltaV2 = (aVSurf2l - aVSurf2f)/IntToReal(aNbPoints); + if(aStepU1 > aStepMax) + aStepU1 = aStepMax; - if((aV21 < aVSurf2f) && (aFact1 < 0.0)) - {//Make close to aVSurf2f by increasing anU1 (for the 1st line) - aDeltaV2 = Min(aDeltaV2, Abs(aV21-aVSurf2f)); - } - - if((aV22 < aVSurf2f) && (aFact2 < 0.0)) - {//Make close to aVSurf1f by increasing anU1 (for the 2nd line) - aDeltaV2 = Min(aDeltaV2, Abs(aV22-aVSurf2f)); - } - - if((aV21 > aVSurf2l) && (aFact1 > 0.0)) - {//Make close to aVSurf1l by increasing anU1 (for the 1st line) - aDeltaV2 = Min(aDeltaV2, Abs(aV21-aVSurf2l)); - } - - if((aV22 > aVSurf2l) && (aFact2 > 0.0)) - {//Make close to aVSurf1l by increasing anU1 (for the 1st line) - aDeltaV2 = Min(aDeltaV2, Abs(aV22-aVSurf1l)); - } - - aDeltaU1L1 = !IsEqual(aFact1,0.0)? Abs(aDeltaV2/aFact1) : aStepMax; - aDeltaU1L2 = !IsEqual(aFact2,0.0)? Abs(aDeltaV2/aFact2) : aStepMax; - - const Standard_Real aDeltaU1V2 = Min(aDeltaU1L1, aDeltaU1L2); - - Standard_Real aDeltaU1 = Min(aDeltaU1V1, aDeltaU1V2); - - if(aDeltaU1 < aStepMin) - aDeltaU1 = aStepMin; - - if(aDeltaU1 > aStepMax) - aDeltaU1 = aStepMax; - - anU1 += aDeltaU1; + anU1 += aStepU1; const Standard_Real aDiff = anU1 - anUl; - if((0.0 < aDiff) && (aDiff < aDeltaU1-Precision::PConfusion())) + if((0.0 < aDiff) && (aDiff < aStepU1-Precision::PConfusion())) anU1 = anUl; anUf = anU1; - if(aWLine1->NbPnts() != 1) - isAddedIntoWL1 = Standard_False; - - if(aWLine2->NbPnts() != 1) - isAddedIntoWL2 = Standard_False; - } - - if((aWLine1->NbPnts() == 1) && (!isAddedIntoWL1)) - { - isTheEmpty = Standard_False; - Standard_Real u1, v1, u2, v2; - aWLine1->Point(1).Parameters(u1, v1, u2, v2); - IntPatch_Point aP; - aP.SetParameter(u1); - aP.SetParameters(u1, v1, u2, v2); - aP.SetTolerance(theTol3D); - aP.SetValue(aWLine1->Point(1).Value()); - - theSPnt.Append(aP); - } - else if(aWLine1->NbPnts() > 1) - { - Standard_Boolean isGood = Standard_True; - - if(aWLine1->NbPnts() == 2) + for(Standard_Integer i = 0; i < aNbWLines; i++) { - const IntSurf_PntOn2S& aPf = aWLine1->Point(1); - const IntSurf_PntOn2S& aPl = aWLine1->Point(2); - - if(aPf.IsSame(aPl, Precision::Confusion())) - isGood = Standard_False; + if(aWLine[i]->NbPnts() != 1) + isAddedIntoWL[i] = Standard_False; } + } - if(isGood) + for(Standard_Integer i = 0; i < aNbWLines; i++) + { + if((aWLine[i]->NbPnts() == 1) && (!isAddedIntoWL[i])) { isTheEmpty = Standard_False; - isAddedIntoWL1 = Standard_True; - SeekAdditionalPoints( theQuad1, theQuad2, aWLine1->Curve(), - anEquationCoeffs, aNbPoints, aUSurf2f, aUSurf2l, - theTol2D, aPeriod, 1.0, isTheReverse); + Standard_Real u1, v1, u2, v2; + aWLine[i]->Point(1).Parameters(u1, v1, u2, v2); + IntPatch_Point aP; + aP.SetParameter(u1); + aP.SetParameters(u1, v1, u2, v2); + aP.SetTolerance(theTol3D); + aP.SetValue(aWLine[i]->Point(1).Value()); - aWLine1->ComputeVertexParameters(theTol3D); - theSlin.Append(aWLine1); + theSPnt.Append(aP); } - } - else - { - isAddedIntoWL1 = Standard_False; - } - - if((aWLine2->NbPnts() == 1) && (!isAddedIntoWL2)) - { - isTheEmpty = Standard_False; - Standard_Real u1, v1, u2, v2; - aWLine2->Point(1).Parameters(u1, v1, u2, v2); - IntPatch_Point aP; - aP.SetParameter(u1); - aP.SetParameters(u1, v1, u2, v2); - aP.SetTolerance(theTol3D); - aP.SetValue(aWLine2->Point(1).Value()); - - theSPnt.Append(aP); - } - else if(aWLine2->NbPnts() > 1) - { - Standard_Boolean isGood = Standard_True; - if(aWLine2->NbPnts() == 2) + else if(aWLine[i]->NbPnts() > 1) { - const IntSurf_PntOn2S& aPf = aWLine2->Point(1); - const IntSurf_PntOn2S& aPl = aWLine2->Point(2); + Standard_Boolean isGood = Standard_True; - if(aPf.IsSame(aPl, Precision::Confusion())) - isGood = Standard_False; + if(aWLine[i]->NbPnts() == 2) + { + const IntSurf_PntOn2S& aPf = aWLine[i]->Point(1); + const IntSurf_PntOn2S& aPl = aWLine[i]->Point(2); + + if(aPf.IsSame(aPl, Precision::Confusion())) + isGood = Standard_False; + } + + if(isGood) + { + isTheEmpty = Standard_False; + isAddedIntoWL[i] = Standard_True; + SeekAdditionalPoints( theQuad1, theQuad2, aWLine[i]->Curve(), + anEquationCoeffs, aNbPoints, aUSurf2f, aUSurf2l, + theTol2D, aPeriod, anArccosFactor[i], isTheReverse); + + aWLine[i]->ComputeVertexParameters(theTol3D); + theSlin.Append(aWLine[i]); + } } - - if(isGood) + else { - isTheEmpty = Standard_False; - isAddedIntoWL2 = Standard_True; - - SeekAdditionalPoints(theQuad1, theQuad2, aWLine2->Curve(), - anEquationCoeffs, aNbPoints, aUSurf2f, aUSurf2l, - theTol2D, aPeriod, -1.0, isTheReverse); - - aWLine2->ComputeVertexParameters(theTol3D); - theSlin.Append(aWLine2); + isAddedIntoWL[i] = Standard_False; } } - else - { - isAddedIntoWL2 = Standard_False; - } } } @@ -2556,8 +2419,6 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1, if(hasBeenRemoved) aNumOfLine1--; - - //aWLine1->ComputeVertexParameters(theTol3D); } }//if(theSlin.Length() > 0) diff --git a/src/IntPatch/IntPatch_WLine.cxx b/src/IntPatch/IntPatch_WLine.cxx index 28a313fea8..e82ffda21c 100644 --- a/src/IntPatch/IntPatch_WLine.cxx +++ b/src/IntPatch/IntPatch_WLine.cxx @@ -1071,7 +1071,7 @@ void IntPatch_WLine::Dump() const { for(i=1;i<=nbp;i++) { Standard_Real u1,v1,u2,v2; Point(i).Parameters(u1,v1,u2,v2); - printf("%4d [%+5.8e %+5.8e %+5.8e] [%+5.8e %+5.8e] [%+5.8e %+5.8e]\n", + printf("%4d [%+10.20f %+10.20f %+10.20f] [%+10.20f %+10.20f] [%+10.20f %+10.20f]\n", i, Point(i).Value().X(), Point(i).Value().Y(), diff --git a/tests/bugs/modalg_1/bug16517_1 b/tests/bugs/modalg_1/bug16517_1 index bb2ddb036b..1f38705802 100755 --- a/tests/bugs/modalg_1/bug16517_1 +++ b/tests/bugs/modalg_1/bug16517_1 @@ -40,5 +40,8 @@ if { ${mistake} != 0 } { puts "OK ${BugNumber}" } -set 2dviewer 0 +vinit +vdisplay c s result p_2 +vfit +set only_screen 1 diff --git a/tests/bugs/modalg_1/bug16517_2 b/tests/bugs/modalg_1/bug16517_2 index 6a1e214c0c..d09cfe3f74 100755 --- a/tests/bugs/modalg_1/bug16517_2 +++ b/tests/bugs/modalg_1/bug16517_2 @@ -42,5 +42,8 @@ if { ${mistake} != 0 } { puts "OK ${BugNumber}" } -set 2dviewer 0 +vinit +vdisplay c s result p_1 +vfit +set only_screen 1 diff --git a/tests/bugs/modalg_5/bug24915 b/tests/bugs/modalg_5/bug24915 index 1b2951c5ad..adba90f4e3 100755 --- a/tests/bugs/modalg_5/bug24915 +++ b/tests/bugs/modalg_5/bug24915 @@ -22,7 +22,7 @@ bbuild r checkshape r # 2. geometry -set MaxTol 3.0e-6 +set MaxTol 5.0e-7 set log [bopcurves b1 b2] mksurface s1 b1 @@ -52,7 +52,7 @@ for {set i 1} {$i <= ${NbCurv}} {incr i} { xdistcs c_$i s1 ${U1} ${U2} 100 set Log2 [dlog get] set List2 [split ${Log2} {TD= \t\n}] - set Tolerance 1.6e-5 + set Tolerance 1.6e-6 set Limit_Tol 1.0e-7 set D_good 0. catch {checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}} @@ -62,7 +62,7 @@ for {set i 1} {$i <= ${NbCurv}} {incr i} { xdistcs c_$i s2 ${U1} ${U2} 100 set Log2 [dlog get] set List2 [split ${Log2} {TD= \t\n}] - set Tolerance 1.6e-5 + set Tolerance 1.6e-6 set Limit_Tol 1.0e-7 set D_good 0. catch {checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}} diff --git a/tests/bugs/modalg_5/bug25292_15 b/tests/bugs/modalg_5/bug25292_15 index 12b386fc1a..5d4d3d1faa 100644 --- a/tests/bugs/modalg_5/bug25292_15 +++ b/tests/bugs/modalg_5/bug25292_15 @@ -79,7 +79,7 @@ if {${ind} >= 0} { xdistcs res s1 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -89,7 +89,7 @@ if {${ind} >= 0} { xdistcs res s2 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -119,7 +119,7 @@ if {${ind} >= 0} { xdistcs res_$ic s1 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -129,7 +129,7 @@ if {${ind} >= 0} { xdistcs res_$ic s2 0 1 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} diff --git a/tests/bugs/modalg_5/bug25292_16 b/tests/bugs/modalg_5/bug25292_16 index 4cacd66e1a..62fb6b039b 100644 --- a/tests/bugs/modalg_5/bug25292_16 +++ b/tests/bugs/modalg_5/bug25292_16 @@ -80,7 +80,7 @@ if {${ind} >= 0} { xdistcs res s1 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -90,7 +90,7 @@ if {${ind} >= 0} { xdistcs res s2 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -120,7 +120,7 @@ if {${ind} >= 0} { xdistcs res_$ic s1 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -130,7 +130,7 @@ if {${ind} >= 0} { xdistcs res_$ic s2 0 1 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} diff --git a/tests/bugs/modalg_5/bug25292_25 b/tests/bugs/modalg_5/bug25292_25 index 3e4f25f5bc..1ca2d190b3 100644 --- a/tests/bugs/modalg_5/bug25292_25 +++ b/tests/bugs/modalg_5/bug25292_25 @@ -80,7 +80,7 @@ if {${ind} >= 0} { xdistcs res s1 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 1.1e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -90,7 +90,7 @@ if {${ind} >= 0} { xdistcs res s2 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 1.1e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -120,7 +120,7 @@ if {${ind} >= 0} { xdistcs res_$ic s1 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 1.1e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -130,7 +130,7 @@ if {${ind} >= 0} { xdistcs res_$ic s2 0 1 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 1.1e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} diff --git a/tests/bugs/modalg_5/bug25292_26 b/tests/bugs/modalg_5/bug25292_26 index 9415b69007..eb41d95fe1 100644 --- a/tests/bugs/modalg_5/bug25292_26 +++ b/tests/bugs/modalg_5/bug25292_26 @@ -80,7 +80,7 @@ if {${ind} >= 0} { xdistcs res s1 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 1.1e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -90,7 +90,7 @@ if {${ind} >= 0} { xdistcs res s2 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 1.1e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -120,7 +120,7 @@ if {${ind} >= 0} { xdistcs res_$ic s1 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 1.1e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -130,7 +130,7 @@ if {${ind} >= 0} { xdistcs res_$ic s2 0 1 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 1.1e-7 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} diff --git a/tests/bugs/modalg_5/bug25292_31 b/tests/bugs/modalg_5/bug25292_31 index 36499ea553..ed1b9dac5e 100644 --- a/tests/bugs/modalg_5/bug25292_31 +++ b/tests/bugs/modalg_5/bug25292_31 @@ -24,7 +24,7 @@ set log [bopcurves f1 f2 -2d] regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv #This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid. -set MaxTol 3.e-4 +set MaxTol 1.0e-8 #This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid. set GoodNbCurv 1 @@ -70,8 +70,8 @@ for {set i 1} {$i <= ${NbCurv}} {incr i} { xdistcs c_$i s1 ${U1} ${U2} 10 set Log2 [dlog get] set List2 [split ${Log2} {TD= \t\n}] - set Tolerance MaxTol - set Limit_Tol 1.0e-7 + set Tolerance 1.0e-7 + set Limit_Tol 1.0e-8 set D_good 0. checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol} @@ -80,8 +80,8 @@ for {set i 1} {$i <= ${NbCurv}} {incr i} { xdistcs c_$i s2 ${U1} ${U2} 10 set Log2 [dlog get] set List2 [split ${Log2} {TD= \t\n}] - set Tolerance MaxTol - set Limit_Tol 1.0e-7 + set Tolerance 1.0e-7 + set Limit_Tol 1.0e-8 set D_good 0. checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol} } diff --git a/tests/bugs/modalg_5/bug25292_32 b/tests/bugs/modalg_5/bug25292_32 index cca229e95b..5dad932ed7 100644 --- a/tests/bugs/modalg_5/bug25292_32 +++ b/tests/bugs/modalg_5/bug25292_32 @@ -1,5 +1,3 @@ -puts "TODO OCC25331 Debian60-64: Error: Tolerance is too big!" - puts "================" puts "OCC25292" puts "================" @@ -26,7 +24,7 @@ set log [bopcurves f2 f1 -2d] regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv #This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid. -set MaxTol 3.e-4 +set MaxTol 1.0e-8 #This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid. set GoodNbCurv 1 @@ -72,8 +70,8 @@ for {set i 1} {$i <= ${NbCurv}} {incr i} { xdistcs c_$i s1 ${U1} ${U2} 10 set Log2 [dlog get] set List2 [split ${Log2} {TD= \t\n}] - set Tolerance MaxTol - set Limit_Tol 1.0e-7 + set Tolerance 1.0e-7 + set Limit_Tol 1.0e-8 set D_good 0. checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol} @@ -82,8 +80,8 @@ for {set i 1} {$i <= ${NbCurv}} {incr i} { xdistcs c_$i s2 ${U1} ${U2} 10 set Log2 [dlog get] set List2 [split ${Log2} {TD= \t\n}] - set Tolerance MaxTol - set Limit_Tol 1.0e-7 + set Tolerance 1.0e-7 + set Limit_Tol 1.0e-8 set D_good 0. checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol} } diff --git a/tests/bugs/modalg_5/bug25292_35 b/tests/bugs/modalg_5/bug25292_35 index 910a61ccbd..31e92872df 100644 --- a/tests/bugs/modalg_5/bug25292_35 +++ b/tests/bugs/modalg_5/bug25292_35 @@ -82,7 +82,7 @@ if {${ind} >= 0} { xdistcs res s1 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-4 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -92,7 +92,7 @@ if {${ind} >= 0} { xdistcs res s2 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-4 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -122,7 +122,7 @@ if {${ind} >= 0} { xdistcs res_$ic s1 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-4 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -132,7 +132,7 @@ if {${ind} >= 0} { xdistcs res_$ic s2 0 1 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-4 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} diff --git a/tests/bugs/modalg_5/bug25292_36 b/tests/bugs/modalg_5/bug25292_36 index f1011277f5..340567c185 100644 --- a/tests/bugs/modalg_5/bug25292_36 +++ b/tests/bugs/modalg_5/bug25292_36 @@ -82,7 +82,7 @@ if {${ind} >= 0} { xdistcs res s1 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-4 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -92,7 +92,7 @@ if {${ind} >= 0} { xdistcs res s2 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-4 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -122,7 +122,7 @@ if {${ind} >= 0} { xdistcs res_$ic s1 ${U1} ${U2} 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-4 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} @@ -132,7 +132,7 @@ if {${ind} >= 0} { xdistcs res_$ic s2 0 1 10 set Log1 [dlog get] set List1 [split ${Log1} {TD= \t\n}] - set Tolerance 3.0e-4 + set Tolerance 1.0e-7 set Limit_Tol 1.0e-7 set D_good 0. checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} diff --git a/tests/bugs/modalg_5/bug25488 b/tests/bugs/modalg_5/bug25488 index 4a937ac459..d3fb0b87f6 100644 --- a/tests/bugs/modalg_5/bug25488 +++ b/tests/bugs/modalg_5/bug25488 @@ -6,10 +6,16 @@ puts "" # Wrong result of two trimmed cylinders intersection ###################################################### -set Tolerance 3.0e-7 +set Tolerance 1.1e-7 set D_good 0. set Limit_Tol 1.0e-7 +puts "##############################" +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!" +puts "##############################" +puts "" +puts "" + restore [locate_data_file OCC25488_sb1_1t.draw] sb1 restore [locate_data_file OCC25488_sb2_1t.draw] sb2