mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-06-05 11:24:17 +03:00
0029994: Misprint in IntWalk_PWalking::Perform(...) method
In the fragment if (aNewPnt[0] < u1min || aNewPnt[0] > u1max || aNewPnt[1] < v1min || aNewPnt[1] > v1max || aNewPnt[2] < u2min || aNewPnt[2] > u2max || aNewPnt[3] < v2min || aNewPnt[3] > v2max) { break; // Out of borders, handle this later. } the parameters are compared with values obtained by IntPolyh_MaillageAffinage algorithm and do not have any relations to the domain boundaries. This misprint has been eliminated.
This commit is contained in:
parent
94783b5111
commit
6487fb1c9c
@ -758,10 +758,10 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
|
|||||||
Standard_Integer LevelOfIterWithoutAppend = -1;
|
Standard_Integer LevelOfIterWithoutAppend = -1;
|
||||||
//
|
//
|
||||||
|
|
||||||
const Standard_Real aTol[4] = { Epsilon(u1max - u1min),
|
const Standard_Real aTol[4] = { Epsilon(UM1 - Um1),
|
||||||
Epsilon(v1max - v1min),
|
Epsilon(VM1 - Vm1),
|
||||||
Epsilon(u2max - u2min),
|
Epsilon(UM2 - Um2),
|
||||||
Epsilon(v2max - v2min)};
|
Epsilon(VM2 - Vm2)};
|
||||||
Arrive = Standard_False;
|
Arrive = Standard_False;
|
||||||
while(!Arrive) //010
|
while(!Arrive) //010
|
||||||
{
|
{
|
||||||
@ -853,8 +853,8 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
|
|||||||
|
|
||||||
Standard_Real aNewPnt[4], anAbsParamDist[4];
|
Standard_Real aNewPnt[4], anAbsParamDist[4];
|
||||||
myIntersectionOn2S.Point().Parameters(aNewPnt[0], aNewPnt[1], aNewPnt[2], aNewPnt[3]);
|
myIntersectionOn2S.Point().Parameters(aNewPnt[0], aNewPnt[1], aNewPnt[2], aNewPnt[3]);
|
||||||
const Standard_Real aParMin[4] = {u1min, v1min, u2min, v2min};
|
const Standard_Real aParMin[4] = {Um1, Vm1, Um2, Vm2};
|
||||||
const Standard_Real aParMax[4] = {u1max, v1max, u2max, v2max};
|
const Standard_Real aParMax[4] = {UM1, VM1, UM2, VM2};
|
||||||
|
|
||||||
for(Standard_Integer i = 0; i < 4; i++)
|
for(Standard_Integer i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
@ -864,12 +864,13 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
|
|||||||
aNewPnt[i] = aParMax[i];
|
aNewPnt[i] = aParMax[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aNewPnt[0] < u1min || aNewPnt[0] > u1max ||
|
if (aNewPnt[0] < Um1 || aNewPnt[0] > UM1 ||
|
||||||
aNewPnt[1] < v1min || aNewPnt[1] > v1max ||
|
aNewPnt[1] < Vm1 || aNewPnt[1] > VM1 ||
|
||||||
aNewPnt[2] < u2min || aNewPnt[2] > u2max ||
|
aNewPnt[2] < Um2 || aNewPnt[2] > UM2 ||
|
||||||
aNewPnt[3] < v2min || aNewPnt[3] > v2max)
|
aNewPnt[3] < Vm2 || aNewPnt[3] > VM2)
|
||||||
{
|
{
|
||||||
break; // Out of borders, handle this later.
|
// Out of borders, process it later.
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
myIntersectionOn2S.ChangePoint().SetValue(aNewPnt[0],
|
myIntersectionOn2S.ChangePoint().SetValue(aNewPnt[0],
|
||||||
|
63
tests/bugs/modalg_7/bug29994
Normal file
63
tests/bugs/modalg_7/bug29994
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "0029994: Misprint in IntWalk_PWalking::Perform(...) method"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
foreach a [directory res*] {unset $a}
|
||||||
|
|
||||||
|
torus s1 185.793144150183 -13 70.9931441501827 0 -1 0 0 0 -1 27.0094480547676 0.25
|
||||||
|
restore [locate_data_file bug29994_s2.draw] s2
|
||||||
|
|
||||||
|
intersect res s1 s2 1.0e-4
|
||||||
|
|
||||||
|
if { [info exists res] } {
|
||||||
|
#Only variable "res" exists
|
||||||
|
renamevar res res_1
|
||||||
|
}
|
||||||
|
|
||||||
|
bclearobjects
|
||||||
|
bcleartools
|
||||||
|
|
||||||
|
set ic 1
|
||||||
|
set AllowRepeat 1
|
||||||
|
while { $AllowRepeat != 0 } {
|
||||||
|
if { ![info exists res_$ic] } {
|
||||||
|
set AllowRepeat 0
|
||||||
|
} else {
|
||||||
|
bounds res_$ic U1 U2
|
||||||
|
|
||||||
|
if {[dval U2-U1] < 1.0e-9} {
|
||||||
|
puts "Error: Wrong curve's range!"
|
||||||
|
}
|
||||||
|
|
||||||
|
xdistcs res_$ic s1 U1 U2 100 2.0e-7
|
||||||
|
xdistcs res_$ic s2 U1 U2 100 2.0e-7
|
||||||
|
|
||||||
|
mkedge ee res_$ic
|
||||||
|
baddobjects ee
|
||||||
|
incr ic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
incr ic -1
|
||||||
|
|
||||||
|
if { $ic == 1 } {
|
||||||
|
puts "OK: good number of curves!"
|
||||||
|
checklength res_1 -l 0.70541045554962345 -eps 1.0e-3
|
||||||
|
} else {
|
||||||
|
puts "Error: Incorrect number of curves in intersection result!"
|
||||||
|
bfillds
|
||||||
|
bbuild result
|
||||||
|
|
||||||
|
# Check gaps between edges in result
|
||||||
|
checksection result -r 2
|
||||||
|
checkmaxtol result -min_tol 2.0e-7
|
||||||
|
checknbshapes result -edge 1 -vertex 2
|
||||||
|
}
|
||||||
|
|
||||||
|
smallview
|
||||||
|
don res_*
|
||||||
|
fit
|
||||||
|
disp s1 s2
|
||||||
|
|
||||||
|
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user