1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-16 10:54:53 +03:00

0025531: Difference in intersection result on Windows and Linux platform is very significant

1. Dump of WLine is shown with more precise.
2. Equation solving with more precise.
3. Dump of Multy-line.
4. Code optimization.

Some test cases were updated in accordance with their new behaviour.

Correction of test cases for issue CR25531
This commit is contained in:
nbv 2014-12-25 18:04:55 +03:00 committed by bugmaster
parent ee5ee7db3b
commit 7c32c7c41f
19 changed files with 361 additions and 462 deletions

View File

@ -936,7 +936,6 @@ void ApproxInt_Approx::Perform(const TheISurface& ISurf,
ApproxInt_TheImpPrmSvSurfaces myImpPrmSvSurfaces(ISurf,PSurf); ApproxInt_TheImpPrmSvSurfaces myImpPrmSvSurfaces(ISurf,PSurf);
Standard_Integer nbpntbez = indicemax-indicemin; Standard_Integer nbpntbez = indicemax-indicemin;
Standard_Address ptrsvsurf = NULL;
Standard_Boolean cut = Standard_True; Standard_Boolean cut = Standard_True;
if(nbpntbez < LimRajout) if(nbpntbez < LimRajout)
myApproxBez = Standard_False; myApproxBez = Standard_False;
@ -947,7 +946,7 @@ void ApproxInt_Approx::Perform(const TheISurface& ISurf,
cut = Standard_False; cut = Standard_False;
//-- cout<<" ApproxInt : Nb de points = "<<nbpntbez<<" Pas de rajout "<<endl; //-- cout<<" ApproxInt : Nb de points = "<<nbpntbez<<" Pas de rajout "<<endl;
} }
ptrsvsurf = &myImpPrmSvSurfaces; Standard_Address ptrsvsurf = &myImpPrmSvSurfaces;
if(nbpntbez < LimRajout) myApproxBez = Standard_False; if(nbpntbez < LimRajout) myApproxBez = Standard_False;
@ -1057,6 +1056,11 @@ void ApproxInt_Approx::Perform(const TheISurface& ISurf,
imax); imax);
if(myApproxBez) { if(myApproxBez) {
myComputeLineBezier.Perform(myMultiLine); myComputeLineBezier.Perform(myMultiLine);
#ifdef OCCT_DEBUG
//myMultiLine.Dump();
#endif
if (myComputeLineBezier.NbMultiCurves() == 0) if (myComputeLineBezier.NbMultiCurves() == 0)
return; return;
myTolReached&=myComputeLineBezier.IsToleranceReached(); myTolReached&=myComputeLineBezier.IsToleranceReached();

View File

@ -117,6 +117,9 @@ is
MakeMLBetween(me; Low,High,NbPointsToInsert: Integer from Standard) MakeMLBetween(me; Low,High,NbPointsToInsert: Integer from Standard)
returns MultiLine from ApproxInt is static; returns MultiLine from ApproxInt is static;
Dump(me);
---Purpose: Dump of the current multi-line.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
fields fields

View File

@ -613,3 +613,16 @@ const {
} }
//====================================================================== //======================================================================
void ApproxInt_MultiLine::Dump() const
{
TColgp_Array1OfPnt anArr1(1, 1);
TColgp_Array1OfPnt2d anArr2(1, 2);
for(Standard_Integer ind = FirstPoint(); ind <= LastPoint(); ind++)
{
Value(ind, anArr1, anArr2);
printf("%4d [%+10.20f %+10.20f %+10.20f] [%+10.20f %+10.20f] [%+10.20f %+10.20f]\n",
ind, anArr1(1).X(), anArr1(1).Y(), anArr1(1).Z(), anArr2(1).X(),anArr2(1).Y(),anArr2(2).X(),anArr2(2).Y());
}
}

View File

@ -127,5 +127,8 @@ is
---C++:inline ---C++:inline
returns Status from Approx; returns Status from Approx;
Dump(myclass; ML: TheMultiLine);
---Purpose: Dump of the current multi-line.
end MultiLineTool; end MultiLineTool;

View File

@ -115,4 +115,9 @@ inline TheMultiLine ApproxInt_MultiLineTool::MakeMLBetween(const TheMultiLine& M
return(ML.MakeMLBetween(I1,I2,NbPMin)); return(ML.MakeMLBetween(I1,I2,NbPMin));
} }
inline void ApproxInt_MultiLineTool::Dump(const TheMultiLine& ML)
{
ML.Dump();
}
//================================================================================ //================================================================================

View File

@ -750,31 +750,45 @@ stCoeffsValue::stCoeffsValue( const gp_Cylinder& theCyl1,
}aFoundCouple = COENONE; }aFoundCouple = COENONE;
Standard_Real aDetV1V2 = mVecC1.X()*mVecC2.Y()-mVecC1.Y()*mVecC2.X(); Standard_Real aDetV1V2 = 0.0;
if(Abs(aDetV1V2) < aNulValue) const Standard_Real aDelta1 = mVecC1.X()*mVecC2.Y()-mVecC1.Y()*mVecC2.X(); //1-2
const Standard_Real aDelta2 = mVecC1.Y()*mVecC2.Z()-mVecC1.Z()*mVecC2.Y(); //2-3
const Standard_Real aDelta3 = mVecC1.X()*mVecC2.Z()-mVecC1.Z()*mVecC2.X(); //1-3
const Standard_Real anAbsD1 = Abs(aDelta1); //1-2
const Standard_Real anAbsD2 = Abs(aDelta2); //2-3
const Standard_Real anAbsD3 = Abs(aDelta3); //1-3
if(anAbsD1 >= anAbsD2)
{ {
aDetV1V2 = mVecC1.Y()*mVecC2.Z()-mVecC1.Z()*mVecC2.Y(); if(anAbsD3 > anAbsD1)
if(Abs(aDetV1V2) < aNulValue)
{
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;
}
} }
else else
{ {
aFoundCouple = COE12; aFoundCouple = COE12;
aDetV1V2 = aDelta1;
}
}
else
{
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) switch(aFoundCouple)
@ -1504,6 +1518,10 @@ static void SeekAdditionalPoints( const IntSurf_Quadric& theQuad1,
gp_Pnt aPInt(0.5*(aP1.XYZ() + aP2.XYZ())); 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; IntSurf_PntOn2S anIP;
if(isTheReverse) if(isTheReverse)
{ {
@ -1632,10 +1650,14 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1,
theSlin.Clear(); theSlin.Clear();
theSPnt.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 aPeriod = 2.0*M_PI;
const Standard_Real aStepMin = theTol2D, const Standard_Real aStepMin = theTol2D,
aStepMax = (aUSurf1l-aUSurf1f)/IntToReal(aNbPoints); aStepMax = (aUSurf1l-aUSurf1f)/IntToReal(aNbPoints);
const Standard_Integer aNbWLines = 2;
const stCoeffsValue anEquationCoeffs(aCyl1, aCyl2); const stCoeffsValue anEquationCoeffs(aCyl1, aCyl2);
@ -1843,7 +1865,9 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1,
if(Precision::IsInfinite(aU1f[aCurInterval]) && Precision::IsInfinite(aU1l[aCurInterval])) if(Precision::IsInfinite(aU1f[aCurInterval]) && Precision::IsInfinite(aU1l[aCurInterval]))
continue; 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]; Standard_Real anUf = aU1f[aCurInterval], anUl = aU1l[aCurInterval];
const Standard_Boolean isDeltaPeriod = IsEqual(anUl-anUf, aPeriod); const Standard_Boolean isDeltaPeriod = IsEqual(anUl-anUf, aPeriod);
@ -1853,15 +1877,23 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1,
while(anUf < anUl) while(anUf < anUl)
{ {
Handle(IntSurf_LineOn2S) aL2S1 = new IntSurf_LineOn2S(); Standard_Real aU2[aNbWLines], aV1[aNbWLines], aV2[aNbWLines];
Handle(IntSurf_LineOn2S) aL2S2 = new IntSurf_LineOn2S(); Standard_Integer aWLFindStatus[aNbWLines];
Standard_Real aV1Prev[aNbWLines], aV2Prev[aNbWLines];
Standard_Real anArccosFactor[aNbWLines] = {1.0, -1.0};
Standard_Boolean isAddingWLEnabled[aNbWLines];
Handle(IntPatch_WLine) aWLine1 = new IntPatch_WLine(aL2S1, Standard_False); Handle(IntSurf_LineOn2S) aL2S[aNbWLines];
Handle(IntPatch_WLine) aWLine2 = new IntPatch_WLine(aL2S2, Standard_False); Handle(IntPatch_WLine) aWLine[aNbWLines];
for(Standard_Integer i = 0; i < aNbWLines; i++)
Standard_Integer aWL1FindStatus = 0, aWL2FindStatus = 0; {
Standard_Boolean isAddingWL1Enabled = Standard_True, aL2S[i] = new IntSurf_LineOn2S();
isAddingWL2Enabled = Standard_True; 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 anU1 = anUf;
@ -1869,10 +1901,6 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1,
for(Standard_Integer i = 0; i < aNbCritPointsMax; i++) for(Standard_Integer i = 0; i < aNbCritPointsMax; i++)
aCriticalDelta[i] = anU1 - anU1crit[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; Standard_Boolean isFirst = Standard_True;
while(anU1 <= anUl) while(anU1 <= anUl)
@ -1889,8 +1917,8 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1,
//already existing WLine. Consequently, it is necessary //already existing WLine. Consequently, it is necessary
//to forbid building new line in this case. //to forbid building new line in this case.
isAddingWL1Enabled = !isAddedIntoWL1; for(Standard_Integer i = 0; i < aNbWLines; i++)
isAddingWL2Enabled = !isAddedIntoWL2; isAddingWLEnabled[i] = !isAddedIntoWL[i];
} }
} }
@ -1899,8 +1927,10 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1,
if((anU1 - anU1crit[i])*aCriticalDelta[i] < 0.0) if((anU1 - anU1crit[i])*aCriticalDelta[i] < 0.0)
{ {
anU1 = anU1crit[i]; anU1 = anU1crit[i];
aWL1FindStatus = 2;
aWL2FindStatus = 2; for(Standard_Integer i = 0; i < aNbWLines; i++)
aWLFindStatus[i] = 2;
break; break;
} }
} }
@ -1913,147 +1943,108 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1,
if(anArg + 1.0 < aNulValue) if(anArg + 1.0 < aNulValue)
anArg = -1.0; anArg = -1.0;
Standard_Real aU21 = anEquationCoeffs.mFI2 + acos(anArg); for(Standard_Integer i = 0; i < aNbWLines; i++)
InscribePoint(aUSurf2f, aUSurf2l, aU21, theTol2D, aPeriod, Standard_False); {
const Standard_Integer aNbPntsWL = aWLine[i].IsNull() ? 0 :
aWLine[i]->Curve()->NbPoints();
aU2[i] = anEquationCoeffs.mFI2 + anArccosFactor[i]*acos(anArg);
InscribePoint(aUSurf2f, aUSurf2l, aU2[i], theTol2D, aPeriod, Standard_False);
const Standard_Integer aNbPntsWL1 = aWLine1.IsNull() ? 0 : if(aNbPntsWL == 0)
aWLine1->Curve()->NbPoints(); {//the line has not contained any points yet
if(aNbPntsWL1 == 0)
{//the line have not contained any points yet
if(((aUSurf2l - aUSurf2f) >= aPeriod) && if(((aUSurf2l - aUSurf2f) >= aPeriod) &&
((Abs(aU21-aUSurf2f) < theTol2D) || (Abs(aU21-aUSurf2l) < theTol2D))) ((Abs(aU2[i] - aUSurf2f) < theTol2D) ||
(Abs(aU2[i]-aUSurf2l) < theTol2D)))
{ {
const Standard_Real anU1Temp = anU1 + aStepMin; const Standard_Real anU1Temp = anU1 + aStepMin;
Standard_Real anArgTemp = anEquationCoeffs.mB * Standard_Real anArgTemp = anEquationCoeffs.mB *
cos(anU1Temp - anEquationCoeffs.mFI1) + anEquationCoeffs.mC; cos(anU1Temp - anEquationCoeffs.mFI1) +
anEquationCoeffs.mC;
if(aNulValue > 1.0 - anArg) if(aNulValue > 1.0 - anArgTemp)
anArg = 1.0; anArgTemp = 1.0;
if(anArg + 1.0 < aNulValue)
anArg = -1.0; if(anArgTemp + 1.0 < aNulValue)
anArgTemp = -1.0;
Standard_Real aU2Temp = anEquationCoeffs.mFI2 +
anArccosFactor[i]*acos(anArgTemp);
Standard_Real aU2Temp = anEquationCoeffs.mFI2 + acos(anArgTemp);
InscribePoint(aUSurf2f, aUSurf2l, aU2Temp, theTol2D, aPeriod, Standard_False); InscribePoint(aUSurf2f, aUSurf2l, aU2Temp, theTol2D, aPeriod, Standard_False);
if(2.0*Abs(aU2Temp - aU21) > aPeriod)
if(2.0*Abs(aU2Temp - aU2[i]) > aPeriod)
{ {
if(aU2Temp > aU21) if(aU2Temp > aU2[i])
aU21 += aPeriod; aU2[i] += aPeriod;
else else
aU21 -= aPeriod; aU2[i] -= aPeriod;
} }
} }
} }
if(aNbPntsWL1 > 0) if(aNbPntsWL > 0)
{//end of the line
if(((aUSurf2l - aUSurf2f) >= aPeriod) &&
((Abs(aU21-aUSurf2f) < theTol2D) || (Abs(aU21-aUSurf2l) < theTol2D)))
{ {
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; Standard_Real aU2prev = 0.0, aV2prev = 0.0;
if(isTheReverse) if(isTheReverse)
aWLine1->Curve()->Value(aNbPntsWL1).ParametersOnS1(aU2prev, aV2prev); aWLine[i]->Curve()->Value(aNbPntsWL).ParametersOnS1(aU2prev, aV2prev);
else else
aWLine1->Curve()->Value(aNbPntsWL1).ParametersOnS2(aU2prev, aV2prev); aWLine[i]->Curve()->Value(aNbPntsWL).ParametersOnS2(aU2prev, aV2prev);
if(2.0*Abs(aU2prev - aU21) > aPeriod) if(2.0*Abs(aU2prev - aU2[i]) > aPeriod)
{ {
if(aU2prev > aU21) if(aU2prev > aU2[i])
aU21 += aPeriod; aU2[i] += aPeriod;
else else
aU21 -= aPeriod; aU2[i] -= aPeriod;
} }
} }
} }
Standard_Real aU22 = anEquationCoeffs.mFI2 - acos(anArg); aV1[i] = anEquationCoeffs.mK21 * sin(aU2[i]) +
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.mK11 * sin(anU1) +
anEquationCoeffs.mL21 * cos(aU21) + anEquationCoeffs.mL21 * cos(aU2[i]) +
anEquationCoeffs.mL11 * cos(anU1) + anEquationCoeffs.mM1; anEquationCoeffs.mL11 * cos(anU1) + anEquationCoeffs.mM1;
const Standard_Real aV12 = anEquationCoeffs.mK21 * sin(aU22) +
anEquationCoeffs.mK11 * sin(anU1) + aV2[i] = anEquationCoeffs.mK22 * sin(aU2[i]) +
anEquationCoeffs.mL21 * cos(aU22) +
anEquationCoeffs.mL11 * cos(anU1) + anEquationCoeffs.mM1;
const Standard_Real aV21 = anEquationCoeffs.mK22 * sin(aU21) +
anEquationCoeffs.mK12 * sin(anU1) + anEquationCoeffs.mK12 * sin(anU1) +
anEquationCoeffs.mL22 * cos(aU21) + anEquationCoeffs.mL22 * cos(aU2[i]) +
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; anEquationCoeffs.mL12 * cos(anU1) + anEquationCoeffs.mM2;
if(isFirst) if(isFirst)
{ {
aV11Prev = aV11; aV1Prev[i] = aV1[i];
aV12Prev = aV12; aV2Prev[i] = aV2[i];
aV21Prev = aV21; }
aV22Prev = aV22; }//for(Standard_Integer i = 0; i < aNbWLines; i++)
isFirst = Standard_False; isFirst = Standard_False;
//Looking for points into WLine
Standard_Boolean isBroken = Standard_False;
for(Standard_Integer i = 0; i < aNbWLines; i++)
{
if(!isAddingWLEnabled[i])
{
aV1Prev[i] = aV1[i];
aV2Prev[i] = aV2[i];
if(aWLFindStatus[i] == 2)
isBroken = Standard_True;
continue;
} }
if(isAddingWL1Enabled) if( ((aUSurf2f-aU2[i]) <= theTol2D) && ((aU2[i]-aUSurf2l) <= theTol2D) &&
{ ((aVSurf1f - aV1[i]) <= theTol2D) && ((aV1[i] - aVSurf1l) <= theTol2D) &&
if( ((aUSurf2f-aU21) <= theTol2D) && ((aVSurf2f - aV2[i]) <= theTol2D) && ((aV2[i] - aVSurf2l) <= theTol2D))
((aU21-aUSurf2l) <= theTol2D) &&
((aVSurf1f - aV11) <= theTol2D) &&
((aV11 - aVSurf1l) <= theTol2D) &&
((aVSurf2f - aV21) <= theTol2D) && ((aV21 - aVSurf2l) <= theTol2D))
{ {
Standard_Boolean isForce = Standard_False; Standard_Boolean isForce = Standard_False;
if(!aWL1FindStatus) if(!aWLFindStatus[i])
{ {
Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False; Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
@ -2062,242 +2053,156 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1,
isForce = Standard_True; isForce = Standard_True;
} }
AddBoundaryPoint(theQuad1, theQuad2, aWLine1, anEquationCoeffs, AddBoundaryPoint( theQuad1, theQuad2, aWLine[i], anEquationCoeffs,
theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod, theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod,
aNulValue, anU1, aU21, aV11, aV11Prev, aNulValue, anU1, aU2[i], aV1[i], aV1Prev[i],
aV21, aV21Prev, isTheReverse, aV2[i], aV2Prev[i], isTheReverse,
1.0, isForce, isFound1, isFound2); anArccosFactor[i], isForce, isFound1, isFound2);
if(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, if(AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
gp_Pnt2d(anU1, aV11), gp_Pnt2d(aU21, aV21), gp_Pnt2d(anU1, aV1[i]), gp_Pnt2d(aU2[i], aV2[i]),
aUSurf1f, aUSurf1l, aPeriod, aUSurf1f, aUSurf1l, aPeriod,
aWLine1->Curve(), theTol3D, theTol2D, isForce)) aWLine[i]->Curve(), theTol3D, theTol2D, isForce))
{ {
if(!aWL1FindStatus) if(!aWLFindStatus[i])
{ {
aWL1FindStatus = 1; aWLFindStatus[i] = 1;
} }
} }
} }
} }
else else
{ {
if(aWL1FindStatus == 1) if(aWLFindStatus[i] == 1)
{ {
Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False; Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
AddBoundaryPoint(theQuad1, theQuad2, aWLine1, anEquationCoeffs, AddBoundaryPoint( theQuad1, theQuad2, aWLine[i], anEquationCoeffs,
theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod, theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod,
aNulValue, anU1, aU21, aV11, aV11Prev, aNulValue, anU1, aU2[i], aV1[i], aV1Prev[i],
aV21, aV21Prev, isTheReverse, aV2[i], aV2Prev[i], isTheReverse,
1.0, Standard_False, isFound1, isFound2); anArccosFactor[i], Standard_False, isFound1, isFound2);
if(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;
if(((aUSurf2l - aUSurf2f) >= aPeriod) && (Abs(anU1-aUSurf1l) < theTol2D))
{
isForce = Standard_True;
}
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)) aV1Prev[i] = aV1[i];
{ aV2Prev[i] = aV2[i];
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, if(aWLFindStatus[i] == 2)
theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod, isBroken = Standard_True;
aNulValue, anU1, aU22, aV12, aV12Prev, }//for(Standard_Integer i = 0; i < aNbWLines; i++)
aV22, aV22Prev, isTheReverse,
-1.0, Standard_False, isFound1, isFound2);
if(isFound1 || isFound2) if(isBroken)
aWL2FindStatus = 2; //start a new line
}
}
}
aV11Prev = aV11;
aV12Prev = aV12;
aV21Prev = aV21;
aV22Prev = aV22;
if((aWL1FindStatus == 2) || (aWL2FindStatus == 2))
{//current lines are filled. Go to the next lines {//current lines are filled. Go to the next lines
anUf = anU1; anUf = anU1;
break; 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.mK1 * sin(anU1 - anEquationCoeffs.mFIV1) +
anEquationCoeffs.mL1 * anEquationCoeffs.mB * sin(aU21 - anEquationCoeffs.mPSIV1) * anEquationCoeffs.mL1 * anEquationCoeffs.mB * sin(aU2[i] - anEquationCoeffs.mPSIV1) *
sin(anU1 - anEquationCoeffs.mFI1)/sin(aU21-anEquationCoeffs.mFI2) : 0.0, sin(anU1 - anEquationCoeffs.mFI1)/sin(aU2[i]-anEquationCoeffs.mFI2) : 0.0,
aFact2 = !IsEqual(sin(aU22-anEquationCoeffs.mFI2), 0.0) ? aFact2 = !IsEqual(sin(aU2[i]-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.mK2 * sin(anU1 - anEquationCoeffs.mFIV2) + anEquationCoeffs.mK2 * sin(anU1 - anEquationCoeffs.mFIV2) +
anEquationCoeffs.mL2 * anEquationCoeffs.mB * sin(aU21 - anEquationCoeffs.mPSIV2) * anEquationCoeffs.mL2 * anEquationCoeffs.mB * sin(aU2[i] - anEquationCoeffs.mPSIV2) *
sin(anU1 - anEquationCoeffs.mFI1)/sin(aU21 - anEquationCoeffs.mFI2) : 0.0; sin(anU1 - anEquationCoeffs.mFI1)/sin(aU2[i] - 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;
Standard_Real aDeltaV2 = (aVSurf2l - aVSurf2f)/IntToReal(aNbPoints); Standard_Real aDeltaV1 = (aVSurf1l - aVSurf1f)/IntToReal(aNbPoints),
aDeltaV2 = (aVSurf2l - aVSurf2f)/IntToReal(aNbPoints);
if((aV21 < aVSurf2f) && (aFact1 < 0.0)) if((aV1[i] < aVSurf1f) && (aFact1 < 0.0))
{//Make close to aVSurf2f by increasing anU1 (for the 1st line) {//Make close to aVSurf1f by increasing anU1
aDeltaV2 = Min(aDeltaV2, Abs(aV21-aVSurf2f)); aDeltaV1 = Min(aDeltaV1, Abs(aV1[i]-aVSurf1f));
} }
if((aV22 < aVSurf2f) && (aFact2 < 0.0)) if((aV1[i] > aVSurf1l) && (aFact1 > 0.0))
{//Make close to aVSurf1f by increasing anU1 (for the 2nd line) {//Make close to aVSurf1l by increasing anU1
aDeltaV2 = Min(aDeltaV2, Abs(aV22-aVSurf2f)); aDeltaV1 = Min(aDeltaV1, Abs(aV1[i]-aVSurf1l));
} }
if((aV21 > aVSurf2l) && (aFact1 > 0.0)) if((aV2[i] < aVSurf2f) && (aFact2 < 0.0))
{//Make close to aVSurf1l by increasing anU1 (for the 1st line) {//Make close to aVSurf2f by increasing anU1
aDeltaV2 = Min(aDeltaV2, Abs(aV21-aVSurf2l)); aDeltaV2 = Min(aDeltaV2, Abs(aV2[i]-aVSurf2f));
} }
if((aV22 > aVSurf2l) && (aFact2 > 0.0)) if((aV2[i] > aVSurf2l) && (aFact2 > 0.0))
{//Make close to aVSurf1l by increasing anU1 (for the 1st line) {//Make close to aVSurf2l by increasing anU1
aDeltaV2 = Min(aDeltaV2, Abs(aV22-aVSurf1l)); aDeltaV2 = Min(aDeltaV2, Abs(aV2[i]-aVSurf1l));
} }
aDeltaU1L1 = !IsEqual(aFact1,0.0)? Abs(aDeltaV2/aFact1) : aStepMax; aDeltaU1V1 = !IsEqual(aFact1,0.0)? Abs(aDeltaV1/aFact1) : aStepMax;
aDeltaU1L2 = !IsEqual(aFact2,0.0)? Abs(aDeltaV2/aFact2) : aStepMax; aDeltaU1V2 = !IsEqual(aFact2,0.0)? Abs(aDeltaV2/aFact2) : aStepMax;
const Standard_Real aDeltaU1V2 = Min(aDeltaU1L1, aDeltaU1L2); if(aDeltaU1V1 < aStepU1)
aStepU1 = aDeltaU1V1;
Standard_Real aDeltaU1 = Min(aDeltaU1V1, aDeltaU1V2); if(aDeltaU1V2 < aStepU1)
aStepU1 = aDeltaU1V2;
}
if(aDeltaU1 < aStepMin) if(aStepU1 < aStepMin)
aDeltaU1 = aStepMin; aStepU1 = aStepMin;
if(aDeltaU1 > aStepMax) if(aStepU1 > aStepMax)
aDeltaU1 = aStepMax; aStepU1 = aStepMax;
anU1 += aDeltaU1; anU1 += aStepU1;
const Standard_Real aDiff = anU1 - anUl; const Standard_Real aDiff = anU1 - anUl;
if((0.0 < aDiff) && (aDiff < aDeltaU1-Precision::PConfusion())) if((0.0 < aDiff) && (aDiff < aStepU1-Precision::PConfusion()))
anU1 = anUl; anU1 = anUl;
anUf = anU1; anUf = anU1;
if(aWLine1->NbPnts() != 1) for(Standard_Integer i = 0; i < aNbWLines; i++)
isAddedIntoWL1 = Standard_False; {
if(aWLine[i]->NbPnts() != 1)
if(aWLine2->NbPnts() != 1) isAddedIntoWL[i] = Standard_False;
isAddedIntoWL2 = Standard_False; }
} }
if((aWLine1->NbPnts() == 1) && (!isAddedIntoWL1)) for(Standard_Integer i = 0; i < aNbWLines; i++)
{
if((aWLine[i]->NbPnts() == 1) && (!isAddedIntoWL[i]))
{ {
isTheEmpty = Standard_False; isTheEmpty = Standard_False;
Standard_Real u1, v1, u2, v2; Standard_Real u1, v1, u2, v2;
aWLine1->Point(1).Parameters(u1, v1, u2, v2); aWLine[i]->Point(1).Parameters(u1, v1, u2, v2);
IntPatch_Point aP; IntPatch_Point aP;
aP.SetParameter(u1); aP.SetParameter(u1);
aP.SetParameters(u1, v1, u2, v2); aP.SetParameters(u1, v1, u2, v2);
aP.SetTolerance(theTol3D); aP.SetTolerance(theTol3D);
aP.SetValue(aWLine1->Point(1).Value()); aP.SetValue(aWLine[i]->Point(1).Value());
theSPnt.Append(aP); theSPnt.Append(aP);
} }
else if(aWLine1->NbPnts() > 1) else if(aWLine[i]->NbPnts() > 1)
{ {
Standard_Boolean isGood = Standard_True; Standard_Boolean isGood = Standard_True;
if(aWLine1->NbPnts() == 2) if(aWLine[i]->NbPnts() == 2)
{ {
const IntSurf_PntOn2S& aPf = aWLine1->Point(1); const IntSurf_PntOn2S& aPf = aWLine[i]->Point(1);
const IntSurf_PntOn2S& aPl = aWLine1->Point(2); const IntSurf_PntOn2S& aPl = aWLine[i]->Point(2);
if(aPf.IsSame(aPl, Precision::Confusion())) if(aPf.IsSame(aPl, Precision::Confusion()))
isGood = Standard_False; isGood = Standard_False;
@ -2306,61 +2211,19 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1,
if(isGood) if(isGood)
{ {
isTheEmpty = Standard_False; isTheEmpty = Standard_False;
isAddedIntoWL1 = Standard_True; isAddedIntoWL[i] = Standard_True;
SeekAdditionalPoints( theQuad1, theQuad2, aWLine1->Curve(), SeekAdditionalPoints( theQuad1, theQuad2, aWLine[i]->Curve(),
anEquationCoeffs, aNbPoints, aUSurf2f, aUSurf2l, anEquationCoeffs, aNbPoints, aUSurf2f, aUSurf2l,
theTol2D, aPeriod, 1.0, isTheReverse); theTol2D, aPeriod, anArccosFactor[i], isTheReverse);
aWLine1->ComputeVertexParameters(theTol3D); aWLine[i]->ComputeVertexParameters(theTol3D);
theSlin.Append(aWLine1); theSlin.Append(aWLine[i]);
} }
} }
else else
{ {
isAddedIntoWL1 = Standard_False; isAddedIntoWL[i] = 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)
{
const IntSurf_PntOn2S& aPf = aWLine2->Point(1);
const IntSurf_PntOn2S& aPl = aWLine2->Point(2);
if(aPf.IsSame(aPl, Precision::Confusion()))
isGood = Standard_False;
}
if(isGood)
{
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);
}
}
else
{
isAddedIntoWL2 = Standard_False;
} }
} }
} }
@ -2556,8 +2419,6 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1,
if(hasBeenRemoved) if(hasBeenRemoved)
aNumOfLine1--; aNumOfLine1--;
//aWLine1->ComputeVertexParameters(theTol3D);
} }
}//if(theSlin.Length() > 0) }//if(theSlin.Length() > 0)

View File

@ -1071,7 +1071,7 @@ void IntPatch_WLine::Dump() const {
for(i=1;i<=nbp;i++) { for(i=1;i<=nbp;i++) {
Standard_Real u1,v1,u2,v2; Standard_Real u1,v1,u2,v2;
Point(i).Parameters(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, i,
Point(i).Value().X(), Point(i).Value().X(),
Point(i).Value().Y(), Point(i).Value().Y(),

View File

@ -40,5 +40,8 @@ if { ${mistake} != 0 } {
puts "OK ${BugNumber}" puts "OK ${BugNumber}"
} }
set 2dviewer 0 vinit
vdisplay c s result p_2
vfit
set only_screen 1

View File

@ -42,5 +42,8 @@ if { ${mistake} != 0 } {
puts "OK ${BugNumber}" puts "OK ${BugNumber}"
} }
set 2dviewer 0 vinit
vdisplay c s result p_1
vfit
set only_screen 1

View File

@ -22,7 +22,7 @@ bbuild r
checkshape r checkshape r
# 2. geometry # 2. geometry
set MaxTol 3.0e-6 set MaxTol 5.0e-7
set log [bopcurves b1 b2] set log [bopcurves b1 b2]
mksurface s1 b1 mksurface s1 b1
@ -52,7 +52,7 @@ for {set i 1} {$i <= ${NbCurv}} {incr i} {
xdistcs c_$i s1 ${U1} ${U2} 100 xdistcs c_$i s1 ${U1} ${U2} 100
set Log2 [dlog get] set Log2 [dlog get]
set List2 [split ${Log2} {TD= \t\n}] set List2 [split ${Log2} {TD= \t\n}]
set Tolerance 1.6e-5 set Tolerance 1.6e-6
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
catch {checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}} 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 xdistcs c_$i s2 ${U1} ${U2} 100
set Log2 [dlog get] set Log2 [dlog get]
set List2 [split ${Log2} {TD= \t\n}] set List2 [split ${Log2} {TD= \t\n}]
set Tolerance 1.6e-5 set Tolerance 1.6e-6
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
catch {checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}} catch {checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}}

View File

@ -79,7 +79,7 @@ if {${ind} >= 0} {
xdistcs res s1 ${U1} ${U2} 10 xdistcs res s1 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -89,7 +89,7 @@ if {${ind} >= 0} {
xdistcs res s2 ${U1} ${U2} 10 xdistcs res s2 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -119,7 +119,7 @@ if {${ind} >= 0} {
xdistcs res_$ic s1 ${U1} ${U2} 10 xdistcs res_$ic s1 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -129,7 +129,7 @@ if {${ind} >= 0} {
xdistcs res_$ic s2 0 1 10 xdistcs res_$ic s2 0 1 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}

View File

@ -80,7 +80,7 @@ if {${ind} >= 0} {
xdistcs res s1 ${U1} ${U2} 10 xdistcs res s1 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -90,7 +90,7 @@ if {${ind} >= 0} {
xdistcs res s2 ${U1} ${U2} 10 xdistcs res s2 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -120,7 +120,7 @@ if {${ind} >= 0} {
xdistcs res_$ic s1 ${U1} ${U2} 10 xdistcs res_$ic s1 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -130,7 +130,7 @@ if {${ind} >= 0} {
xdistcs res_$ic s2 0 1 10 xdistcs res_$ic s2 0 1 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}

View File

@ -80,7 +80,7 @@ if {${ind} >= 0} {
xdistcs res s1 ${U1} ${U2} 10 xdistcs res s1 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 1.1e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -90,7 +90,7 @@ if {${ind} >= 0} {
xdistcs res s2 ${U1} ${U2} 10 xdistcs res s2 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 1.1e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -120,7 +120,7 @@ if {${ind} >= 0} {
xdistcs res_$ic s1 ${U1} ${U2} 10 xdistcs res_$ic s1 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 1.1e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -130,7 +130,7 @@ if {${ind} >= 0} {
xdistcs res_$ic s2 0 1 10 xdistcs res_$ic s2 0 1 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 1.1e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}

View File

@ -80,7 +80,7 @@ if {${ind} >= 0} {
xdistcs res s1 ${U1} ${U2} 10 xdistcs res s1 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 1.1e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -90,7 +90,7 @@ if {${ind} >= 0} {
xdistcs res s2 ${U1} ${U2} 10 xdistcs res s2 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 1.1e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -120,7 +120,7 @@ if {${ind} >= 0} {
xdistcs res_$ic s1 ${U1} ${U2} 10 xdistcs res_$ic s1 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 1.1e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -130,7 +130,7 @@ if {${ind} >= 0} {
xdistcs res_$ic s2 0 1 10 xdistcs res_$ic s2 0 1 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 1.1e-7 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}

View File

@ -24,7 +24,7 @@ set log [bopcurves f1 f2 -2d]
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv 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. #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. #This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid.
set GoodNbCurv 1 set GoodNbCurv 1
@ -70,8 +70,8 @@ for {set i 1} {$i <= ${NbCurv}} {incr i} {
xdistcs c_$i s1 ${U1} ${U2} 10 xdistcs c_$i s1 ${U1} ${U2} 10
set Log2 [dlog get] set Log2 [dlog get]
set List2 [split ${Log2} {TD= \t\n}] set List2 [split ${Log2} {TD= \t\n}]
set Tolerance MaxTol set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-8
set D_good 0. set D_good 0.
checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol} 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 xdistcs c_$i s2 ${U1} ${U2} 10
set Log2 [dlog get] set Log2 [dlog get]
set List2 [split ${Log2} {TD= \t\n}] set List2 [split ${Log2} {TD= \t\n}]
set Tolerance MaxTol set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-8
set D_good 0. set D_good 0.
checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
} }

View File

@ -1,5 +1,3 @@
puts "TODO OCC25331 Debian60-64: Error: Tolerance is too big!"
puts "================" puts "================"
puts "OCC25292" puts "OCC25292"
puts "================" 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 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. #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. #This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid.
set GoodNbCurv 1 set GoodNbCurv 1
@ -72,8 +70,8 @@ for {set i 1} {$i <= ${NbCurv}} {incr i} {
xdistcs c_$i s1 ${U1} ${U2} 10 xdistcs c_$i s1 ${U1} ${U2} 10
set Log2 [dlog get] set Log2 [dlog get]
set List2 [split ${Log2} {TD= \t\n}] set List2 [split ${Log2} {TD= \t\n}]
set Tolerance MaxTol set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-8
set D_good 0. set D_good 0.
checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol} 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 xdistcs c_$i s2 ${U1} ${U2} 10
set Log2 [dlog get] set Log2 [dlog get]
set List2 [split ${Log2} {TD= \t\n}] set List2 [split ${Log2} {TD= \t\n}]
set Tolerance MaxTol set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-8
set D_good 0. set D_good 0.
checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
} }

View File

@ -82,7 +82,7 @@ if {${ind} >= 0} {
xdistcs res s1 ${U1} ${U2} 10 xdistcs res s1 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-4 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -92,7 +92,7 @@ if {${ind} >= 0} {
xdistcs res s2 ${U1} ${U2} 10 xdistcs res s2 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-4 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -122,7 +122,7 @@ if {${ind} >= 0} {
xdistcs res_$ic s1 ${U1} ${U2} 10 xdistcs res_$ic s1 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-4 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -132,7 +132,7 @@ if {${ind} >= 0} {
xdistcs res_$ic s2 0 1 10 xdistcs res_$ic s2 0 1 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-4 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}

View File

@ -82,7 +82,7 @@ if {${ind} >= 0} {
xdistcs res s1 ${U1} ${U2} 10 xdistcs res s1 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-4 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -92,7 +92,7 @@ if {${ind} >= 0} {
xdistcs res s2 ${U1} ${U2} 10 xdistcs res s2 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-4 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -122,7 +122,7 @@ if {${ind} >= 0} {
xdistcs res_$ic s1 ${U1} ${U2} 10 xdistcs res_$ic s1 ${U1} ${U2} 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-4 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
@ -132,7 +132,7 @@ if {${ind} >= 0} {
xdistcs res_$ic s2 0 1 10 xdistcs res_$ic s2 0 1 10
set Log1 [dlog get] set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}] set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 3.0e-4 set Tolerance 1.0e-7
set Limit_Tol 1.0e-7 set Limit_Tol 1.0e-7
set D_good 0. set D_good 0.
checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol} checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}

View File

@ -6,10 +6,16 @@ puts ""
# Wrong result of two trimmed cylinders intersection # Wrong result of two trimmed cylinders intersection
###################################################### ######################################################
set Tolerance 3.0e-7 set Tolerance 1.1e-7
set D_good 0. set D_good 0.
set Limit_Tol 1.0e-7 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_sb1_1t.draw] sb1
restore [locate_data_file OCC25488_sb2_1t.draw] sb2 restore [locate_data_file OCC25488_sb2_1t.draw] sb2