Standard_Integer LevelOfIterWithoutAppend = -1;
//
- const Standard_Real aTol[4] = { Epsilon(u1max - u1min),
- Epsilon(v1max - v1min),
- Epsilon(u2max - u2min),
- Epsilon(v2max - v2min)};
+ const Standard_Real aTol[4] = { Epsilon(UM1 - Um1),
+ Epsilon(VM1 - Vm1),
+ Epsilon(UM2 - Um2),
+ Epsilon(VM2 - Vm2)};
Arrive = Standard_False;
while(!Arrive) //010
{
Standard_Real aNewPnt[4], anAbsParamDist[4];
myIntersectionOn2S.Point().Parameters(aNewPnt[0], aNewPnt[1], aNewPnt[2], aNewPnt[3]);
- const Standard_Real aParMin[4] = {u1min, v1min, u2min, v2min};
- const Standard_Real aParMax[4] = {u1max, v1max, u2max, v2max};
+ const Standard_Real aParMin[4] = {Um1, Vm1, Um2, Vm2};
+ const Standard_Real aParMax[4] = {UM1, VM1, UM2, VM2};
for(Standard_Integer i = 0; i < 4; i++)
{
aNewPnt[i] = aParMax[i];
}
- 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)
+ if (aNewPnt[0] < Um1 || aNewPnt[0] > UM1 ||
+ aNewPnt[1] < Vm1 || aNewPnt[1] > VM1 ||
+ aNewPnt[2] < Um2 || aNewPnt[2] > UM2 ||
+ 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],
--- /dev/null
+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