mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +03:00
0030944: [Regression to 7.0.0] Modeling Algorithms - Intersection curves between pair of faces are not found
IntPatch_ImpPrmIntersection.cxx: treatment of coinciding lines is improved IntWalk_IWalking_1.gxx: bug correction bug30944 : test case added
This commit is contained in:
parent
4c7a3faef5
commit
9c4214b416
@ -3138,6 +3138,8 @@ Standard_Boolean IsCoincide(IntPatch_TheSurfFunction& theFunc,
|
|||||||
const Standard_Real theToler2D,
|
const Standard_Real theToler2D,
|
||||||
const Standard_Real thePeriod) // Period of parametric surface in direction which is perpendicular to theArc direction.
|
const Standard_Real thePeriod) // Period of parametric surface in direction which is perpendicular to theArc direction.
|
||||||
{
|
{
|
||||||
|
const Standard_Real aCoeffs[] = { 0.02447174185, 0.09549150281, 0.20610737385, 0.34549150281, /*Sin(x)*Sin(x)*/
|
||||||
|
0.5, 0.65450849719, 0.79389262615 };
|
||||||
if(theLine->ArcType() == IntPatch_Restriction)
|
if(theLine->ArcType() == IntPatch_Restriction)
|
||||||
{//Restriction-restriction processing
|
{//Restriction-restriction processing
|
||||||
const Handle(IntPatch_RLine)& aRL2 = Handle(IntPatch_RLine)::DownCast(theLine);
|
const Handle(IntPatch_RLine)& aRL2 = Handle(IntPatch_RLine)::DownCast(theLine);
|
||||||
@ -3226,13 +3228,13 @@ Standard_Boolean IsCoincide(IntPatch_TheSurfFunction& theFunc,
|
|||||||
|
|
||||||
const Standard_Real aUl = aPmin.X(), aVl = aPmin.Y();
|
const Standard_Real aUl = aPmin.X(), aVl = aPmin.Y();
|
||||||
|
|
||||||
const Standard_Integer aNbPoints = 4;
|
Standard_Real aU, aV;
|
||||||
const Standard_Real aStepU = (aUl - aUf)/aNbPoints,
|
Standard_Real dU = aUl - aUf, dV = aVl - aVf;
|
||||||
aStepV = (aVl - aVf)/aNbPoints;
|
for(Standard_Integer i = 0; i < 7; i++)
|
||||||
|
|
||||||
Standard_Real aU = aUf+aStepU, aV = aVf+aStepV;
|
|
||||||
for(Standard_Integer i = 1; i < aNbPoints; i++)
|
|
||||||
{
|
{
|
||||||
|
aU = aUf + aCoeffs[i] * dU;
|
||||||
|
aV = aVf + aCoeffs[i] * dV;
|
||||||
|
|
||||||
aX.Value(1) = aU;
|
aX.Value(1) = aU;
|
||||||
aX.Value(2) = aV;
|
aX.Value(2) = aV;
|
||||||
|
|
||||||
@ -3241,13 +3243,10 @@ Standard_Boolean IsCoincide(IntPatch_TheSurfFunction& theFunc,
|
|||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Abs(aVal(1)) > theToler3D)
|
if(Abs(theFunc.Root()) > theToler3D)
|
||||||
{
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
aU += aStepU;
|
|
||||||
aV += aStepV;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ static Standard_Boolean IsTangentExtCheck(TheIWFunction& theFunc,
|
|||||||
if(!theFunc.Value(aX, aVal))
|
if(!theFunc.Value(aX, aVal))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(aVal(1) > aTol)
|
if(Abs(theFunc.Root()) > aTol)
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,6 +13,10 @@ explode b
|
|||||||
explode b_1 v
|
explode b_1 v
|
||||||
settolerance b_1_1 0.005
|
settolerance b_1_1 0.005
|
||||||
|
|
||||||
|
# workaround - increate the tolerance value of the edge to fill the gap between section curves
|
||||||
|
explode b_2 e
|
||||||
|
settolerance b_2_5 0.0005
|
||||||
|
|
||||||
bclearobjects
|
bclearobjects
|
||||||
bcleartools
|
bcleartools
|
||||||
|
|
||||||
|
30
tests/bugs/modalg_7/bug30944
Normal file
30
tests/bugs/modalg_7/bug30944
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
puts "================"
|
||||||
|
puts "0030944: Modeling Algorithms - Intersection curves between pair of faces are not found"
|
||||||
|
puts "================"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
set MaxTol 2.e-7
|
||||||
|
set GoodNbCurv 12
|
||||||
|
|
||||||
|
restore [locate_data_file bug27469_shapes.brep] b
|
||||||
|
explode b
|
||||||
|
explode b_1 f
|
||||||
|
explode b_2 f
|
||||||
|
set log [bopcurves b_1_2 b_2_3 -2d]
|
||||||
|
|
||||||
|
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
|
||||||
|
|
||||||
|
if {${Toler} > ${MaxTol}} {
|
||||||
|
puts "Error: Tolerance is too big!"
|
||||||
|
}
|
||||||
|
|
||||||
|
if {${NbCurv} != ${GoodNbCurv}} {
|
||||||
|
puts "Error: Curve Number is bad!"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
smallview
|
||||||
|
donly b_1_2 b_2_3
|
||||||
|
eval display [directory c_*]
|
||||||
|
fit
|
||||||
|
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user